This is the mail archive of the gdb-patches@sourceware.org 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] Parse DW_AT_ranges into PSYMTABS (for childless CU, for vDSO32)


On Tue, Oct 09, 2007 at 08:02:46PM +0200, Jan Kratochvil wrote:
> DW_TAG_compile_unit has no children and it has neither DW_AT_low_pc nor
> DW_AT_high_pc but it has DW_AT_ranges instead.  So far DW_AT_ranges was not
> parsed into PSYMTABS and so this file was ignored during the debug info search
> later.  Reasons for the discontinuous vDSO32 layout/hack are in the Linux
> kernel sources.

I'm curious, why is this?  I couldn't find them in my kernel tree.

> 2007-10-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* dwarf2read.c (dwarf2_get_pc_bounds): Moved the `DW_AT_ranges' parsing
> 	code with its variables OBJFILE, CU_HEADER and OBFD into ...
> 	(dwarf2_ranges_read): ... a new function.
> 	(read_partial_die): Implemented the parsing of `DW_AT_ranges'.

This is fine.

> 2007-10-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* gdb.dwarf2/dw2-ranges.S, gdb.dwarf2/dw2-ranges.exp,
> 	gdb.dwarf2/dw2-ranges.lds: New files.

This is ugly, but mostly fine.  This bit is not:

> +# Avoid `-lm' from `lib/ada.exp' as it would fail with out `-nostdlib'.
> +# Provide BOARD for SET_BOARD_INFO.
> +set board [target_info name]
> +set_board_info mathlib ""

Actually this is from DejaGNU.  And it's global state, so you have
just made other tests behave differently depending on whether you run
this one first or not.

I bet you don't need a custom linker script and -nostdlib to test
this.  Gas must be generating the DW_AT_ranges itself regardless of
whether there's a gap.

-- 
Daniel Jacobowitz
CodeSourcery


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