This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2] gdb: Handle multiple base address in debug_ranges data.
- From: Pedro Alves <palves at redhat dot com>
- To: Andrew Burgess <andrew dot burgess at embecosm dot com>, gdb-patches at sourceware dot org
- Cc: Doug Evans <xdje42 at gmail dot com>
- Date: Wed, 09 Dec 2015 12:42:18 +0000
- Subject: Re: [PATCH v2] gdb: Handle multiple base address in debug_ranges data.
- Authentication-results: sourceware.org; auth=none
- References: <81cb8e0b755217ed2ea2afdffb3a5c44421b72cd dot 1444985270 dot git dot andrew dot burgess at embecosm dot com> <20151103103505 dot GO23628 at embecosm dot com>
On 11/03/2015 10:35 AM, Andrew Burgess wrote:
> Below is a second attempt at fixing the multiple base address bug in
> the gdb DWARF parsing code.
>
> The actual fix is identical to the first patch, the big change here is
> in the testing.
>
> Gone is the x86-64 assembler example, and instead I have tried[1] to
> extend the dwarf assembler to generate sufficient information to
> trigger this bug, this required extensions to the .debug_line
> generation, and new code to handle .debug_ranges generation.
>
> I've tested this new tests on x86-64 Linux compiling as a 64-bit
> target, and when passing '-m32' to the test to compile as a 32-bit
> target.
>
> My TCL skills are pretty weak[2] so constructive guidance on how to
> improve this code would be great, alternatively if someone (anyone)
> would like to show me how easy this is, please do improve on this
> patch.
>
> Alternatively, how do you feel about letting this in ... for now.
Thanks for doing this!
I skimmed it, and it looks like the same style of code as the rest
of the Dwarf assembler, so I'd feel quite comfortable putting
this in as is.
Tiny nit:
> +Dwarf::assemble $asm_file {
> + global srcdir subdir srcfile srcfile2
> + declare_labels ranges_label;
> + declare_labels L;
> +
No need for ; at the end of those declare_labels lines.
Thanks,
Pedro Alves