This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] gdb: Handle multiple base address in debug_ranges data.

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.

Pedro Alves

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]