This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Re: Advice on fixing gdb/12528
On Wed, 16 Mar 2011 18:31:50 +0100, Paul Pluzhnikov wrote:
> On Tue, Mar 15, 2011 at 11:06 PM, Jan Kratochvil <jan.kratochvil@redhat.com> wrote:
> I think it's still (slightly) better to print offset to the start of address,
> rather than just after it.
I agree.
> How about this then:
>
> if (address == 0 && !dwarf2_per_objfile->has_section_at_zero)
> {
> /* This line table is for a function which has been
> GCd by the linker. Ignore it. PR gdb/12528 */
>
> long line_offset
> = line_ptr - bytes_read - dwarf2_per_objfile->line.buffer;
In thise case you can move the line
line_ptr += bytes_read;
below this block without having to undo the computation here.
>
> complaint (&symfile_complaints,
> _(".debug_line address at offset 0x%lx is 0 "
> "[in module %s]"),
> line_offset, cu->objfile->name);
> p_record_line = noop_record_line;
> }
But I do not think it matters much to discuss this `complaint' more.
Thanks,
Jan