pushed: [RFA/DWARF] constant class of DW_AT_high_pc is offset for version >=4 only.

Joel Brobecker brobecker@adacore.com
Wed Feb 26 19:45:00 GMT 2014


> gdb/ChangeLog:
> 
>         * dwarf2read.c (attr_value_as_address): New function.
>         (dwarf2_find_base_address, read_call_site_scope): Use
>         attr_value_as_address in place of DW_ADDR.
>         (dwarf2_get_pc_bounds): Use attr_value_as_address to get
>         the low and high addresses.  Slight rework of the handling
>         of the high pc being a constant form, and limit it to
>         DWARF verson 4 or higher.
>         (dwarf2_record_block_ranges): Likewise.
>         (read_partial_die): Likewise.
>         (new_symbol_full): Use attr_value_as_address in place of DW_ADDR.
> 
> gdb/testsuite/ChangeLog:
> 
>         * gdb.dwarf2/dw2-abs-hi-pc-hello-dbg.S: New file.
>         * gdb.dwarf2/dw2-abs-hi-pc-hello.c: New file.
>         * gdb.dwarf2/dw2-abs-hi-pc-world-dbg.S: New file.
>         * gdb.dwarf2/dw2-abs-hi-pc-world.c: New file.
>         * gdb.dwarf2/dw2-abs-hi-pc.c: New file.
>         * gdb.dwarf2/dw2-abs-hi-pc.exp: New file.

FYI: This patch has now been pushed.  Thanks again to MarkW for all
the insightful comments.

-- 
Joel



More information about the Gdb-patches mailing list