[PATCH]: Get dwarf2 working on sparc64 too.

Mark Kettenis mark.kettenis@xs4all.nl
Sat Apr 8 21:01:00 GMT 2006


> Date: Wed, 05 Apr 2006 17:15:55 -0700 (PDT)
> From: "David S. Miller" <davem@davemloft.net>
> 
> There were two problems:
> 
> 1) The sparc32 registry of the dwarf2 reg_init function has
>    to occur before osabi init, so that osabi can override
>    properly.

Duh, yes.

> 2) We have to mark the global registers as explicitly undefined.
>    Besides, they are call clobbered.
> 
>    This handles the case where gcc emits a DW_CFA_GNU_window_save,
>    which causes the gdb dwarf2 frame code to allocate a reg set out
>    to 32 registers, but it only sets up entries 8 --> 16.  We get ugly
>    warnings.

This looks wrong to me.  For one thing %g2, %g3, %g6 and %g7 are *not*
call clobbered according to SCD 2.4.1.  And I fail to see why
DW_CFA_GNU_window_save has anything to do with the global registers,
since window saves only affect the other 24 general purpose registers.

What are the ugly warnings that you're trying to fix?

> 2006-04-05  David S. Miller  <davem@sunset.davemloft.net>
> 
> 	* sparc64-linux-tdep.c (sparc64_linux_init_abi): Append dwarf2
> 	frame sniffer.
> 	* sparc-tdep.c (sparc32_gdbarch_init): Make sure to call
> 	dwarf2_frame_set_init_reg() before gdbarch_init_osabi() so
> 	that the latter can override.
> 	(sparc32_dwarf2_frame_init_reg): Mark global registers as
> 	undefined.
> 	* sparc64-tdep.c (sparc64_dwarf2_frame_init_reg): Likewise.
> 	* Makefile.in (sparc64-linux-tdep.o): Update dependencies.



More information about the Gdb-patches mailing list