Fix PR debug/24444: incorrect frame base in IA64 prologues

Alexandre Oliva aoliva@redhat.com
Tue Feb 7 23:56:00 GMT 2006


On Feb  7, 2006, Alexandre Oliva <aoliva@redhat.com> wrote:

> On Feb  6, 2006, Alexandre Oliva <aoliva@redhat.com> wrote:
>>> So, I believe this patch works correctly, though has the unfortunate
>>> effect that it will make the debug info tiny bit larger

>> Yup, that was one of the reasons for me to prefer the latter approach.

>> We *could* avoid this by using CFA-16 as DW_AT_frame_base, since
>> DW_AT_frame_base is something totally arbitrary, not necessarily the
>> CFA.  And since we're already changing DW_AT_frame_base, it couldn't
>> possibly hurt.  I'll try to come up with a patch for that tonight, if
>> we don't hear from Hans or anyone that might be authoritative on the
>> IA64 ABI.

> This patch does that.  Tested by visual inspection of the debug info
> produced for various constructs on a x86_64-linux-gnu-x-ia64-linux-gnu
> build.  Ok to install?

Sorry, the ChangeLog entry I wrote last night somehow went missing
from the patch file I posted, so I had to rewrite it :-( Here it is.

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* defaults.h (CFA_FRAME_BASE_OFFSET): Define.
	* ia64.h (CFA_FRAME_BASE_OFFSET): Override.
	* doc/tm.texi (CFA_FRAME_BASE_OFFSET): Document.
	* dwarf2out.c (build_cfa_loc): New offset parameter.  Add it
	to the result of the expression.
	(def_cfa_1): Adjust.
	(frame_pointer_cfa_offset): Rename to...
	(frame_pointer_fb_offset): ... this.  Adjust all uses.
	(convert_cfa_to_loc_list): Rename to...
	(convert_cfa_to_fb_loc_list): ... this.  New offset parameter.
	Pass it on to build_cfa_loc.
	(compute_frame_pointer_to_cfa_displacement): Rename to...
	(compute_frame_pointer_to_fb_displacement): ... this.  New
	offset parameter.  Use it in computation.
	(gen_subprogram_die): Compute cfa_fb_offset with the new
	macro, and use it to compute the fb loc list and the
	displacement.

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Secretary for FSF Latin America        http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}



More information about the Gcc-patches mailing list