This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix empty PC range psymtab<->symtab discrepancy
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 15 Mar 2011 09:45:05 -0600
- Subject: Re: [patch] Fix empty PC range psymtab<->symtab discrepancy
- References: <20110314175625.GA29782@host1.jankratochvil.net>
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> For DW_AT_high_pc DWARF-4 has the comment
Jan> The high PC value may be beyond the last valid instruction in the
Jan> executable.
Jan> which may suggest DW_AT_low_pc == DW_AT_high_pc == 0 may be valid
Jan> and it should mean the whole address space. I find such case
Jan> outside of the scope of this patch, such case already did not work
Jan> as the partial symtabs reading already ignored DIEs with
Jan> DW_AT_low_pc == DW_AT_high_pc.
I would not worry about this case at all.
The patch looks good to me.
Jan> + complaint (&symfile_complaints,
Jan> + _("DW_AT_low_pc %s is not < DW_AT_high_pc %s "
Jan> + "for DIE at 0x%x [in module %s]"),
Jan> + paddress (gdbarch, part_die->lowpc),
Jan> + paddress (gdbarch, part_die->highpc),
Jan> + part_die->offset, cu->objfile->name);
Thanks for putting this info into the complaint.
One of my minor wish-list items is that we would do this for all DWARF
complaints.
Tom