Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] m32c-tdep.c: Add virtual_frame_pointer function
@ 2006-06-28 13:29 Corinna Vinschen
  2006-06-28 21:29 ` Mark Kettenis
  0 siblings, 1 reply; 9+ messages in thread
From: Corinna Vinschen @ 2006-06-28 13:29 UTC (permalink / raw)
  To: gdb-patches

Hi,

the below patch adds a virtual_frame_pointer function to m32c-tdep.c,
to avoid that legacy_virtual_frame_pointer is called from tracepoint.c,
function encode_actions().  The legacy function either expects a 
DEPRECATED_FP_REGNUM function, or it expects SP_REGNUM <= NUM_REGS,
which is not the case for the m32c code which includes serious
register banking.  The patch avoids all GDB internal errors in the
gdb.trace testsuite and allows to return PASSes for all these testcases,
except a single one (FAIL: gdb.trace/packetlen.exp: setup collect actions).

Ok to apply?


Thanks,
Corinna


	* m32c-tdep.c (m32c_virtual_frame_pointer): New function.
	(m32c_gdbarch_init): Add set_gdbarch_virtual_frame_pointer call.


Index: m32c-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m32c-tdep.c,v
retrieving revision 1.1
diff -u -p -r1.1 m32c-tdep.c
--- m32c-tdep.c	20 Apr 2006 23:18:48 -0000	1.1
+++ m32c-tdep.c	28 Jun 2006 13:20:38 -0000
@@ -2475,6 +2475,14 @@ m32c_m16c_pointer_to_address (struct typ
   return ptr;
 }
 
+void
+m32c_virtual_frame_pointer (CORE_ADDR pc,
+			    int *frame_regnum,
+			    LONGEST *frame_offset)
+{
+  *frame_regnum = SP_REGNUM;
+  *frame_offset = 0;
+}
 
 \f
 /* Initialization.  */
@@ -2539,6 +2547,8 @@ m32c_gdbarch_init (struct gdbarch_info i
   /* Trampolines.  */
   set_gdbarch_skip_trampoline_code (arch, m32c_skip_trampoline_code);
 
+  set_gdbarch_virtual_frame_pointer (arch, m32c_virtual_frame_pointer);
+
   return arch;
 }
 

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-07-13 12:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-28 13:29 [PATCH] m32c-tdep.c: Add virtual_frame_pointer function Corinna Vinschen
2006-06-28 21:29 ` Mark Kettenis
2006-06-28 21:34   ` DJ Delorie
2006-06-29  2:34   ` Daniel Jacobowitz
2006-06-29 10:51     ` Corinna Vinschen
2006-06-29 13:08       ` Corinna Vinschen
2006-07-12 19:13         ` Daniel Jacobowitz
2006-07-13 12:01           ` Corinna Vinschen
2006-06-29 13:18       ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox