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]: Get dwarf2 working on sparc64 too.


From: Mark Kettenis <mark.kettenis@xs4all.nl>
Date: Sat, 8 Apr 2006 23:00:21 +0200 (CEST)

> 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.

The code for DW_CFA_GNU_window_save explicitly initializes registers
8 and later, this leaves %g1-%g7 unintiialized.

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

The one generated here in dwarf2-frame.c:dwarf2_frame_cache():

	if (fs->regs.reg[column].how == DWARF2_FRAME_REG_UNSPECIFIED)
	  {
	    if (cache->reg[regnum].how == DWARF2_FRAME_REG_UNSPECIFIED)
	      complaint (&symfile_complaints, _("\
incomplete CFI data; unspecified registers (e.g., %s) at 0x%s"),
			 gdbarch_register_name (gdbarch, regnum),
			 paddr_nz (fs->pc));
	  }

It will be generated for every global register (other than %g0 which
we already explicitly mark on Sparc) without my change.

There is also no real reason for GCC to emit explicit entries for the
global registers.  Global registers are used as function local
temporaries and are volatile across by calls.

Given all of the above, I think my change makes sense.


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