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 Tue, Mar 15, 2011 at 2:24 PM, Jan Kratochvil
<jan.kratochvil@redhat.com> wrote:
> On Tue, 15 Mar 2011 20:27:56 +0100, Paul Pluzhnikov wrote:
>> + ? ? ? ? ? ? ? ? ? /* This line table is for a function which has been
>> + ? ? ? ? ? ? ? ? ? ? ?GCd by the linker. ?Ignore it. ?PR gdb/12528 */
>> +
>> + ? ? ? ? ? ? ? ? ? complaint (&symfile_complaints,
>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?_(".debug_line section at address 0"));
>
> ? ? ? ? ? ? ? ? ? ? ?complaint (&symfile_complaints,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? _(".debug_line offset 0x%lx uses address 0 "
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "[in module %s]"),
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (long) (line_ptr
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? - dwarf2_per_objfile->line.buffer),
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cu->objfile->name);
>
> (the offset is not right but better than nothing)
Maybe like this:
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;
complaint (&symfile_complaints,
_(".debug_line offset 0x%lx uses address 0 "
"[in module %s]"),
line_offset, cu->objfile->name);
p_record_line = noop_record_line;
}
Thanks,
--
Paul Pluzhnikov