Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: i386 Linux: provide correct type for orig_eax register
@ 2002-01-11 14:23 Jim Blandy
  2002-01-12  5:13 ` Mark Kettenis
  0 siblings, 1 reply; 6+ messages in thread
From: Jim Blandy @ 2002-01-11 14:23 UTC (permalink / raw)
  To: gdb-patches


This fixes a failure in callfuncs.exp.

2002-01-11  Jim Blandy  <jimb@redhat.com>

	Return the correct virtual type for orig_eax.
	* i386-linux-tdep.c (i386_linux_register_virtual_type): New function.
	* config/i386/tm-linux.h (i386_linux_register_virtual_type): New
	declaration.
	(REGISTER_VIRTUAL_TYPE): Override definition in tm-i386.h; use the
	Linux-specific version.

Index: gdb/i386-linux-tdep.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/i386-linux-tdep.c,v
retrieving revision 2.7
diff -c -r2.7 i386-linux-tdep.c
*** gdb/i386-linux-tdep.c	2001/11/10 03:02:19	2.7
--- gdb/i386-linux-tdep.c	2002/01/11 21:51:28
***************
*** 64,69 ****
--- 64,79 ----
  
    return i386_register_raw_size (reg);
  }
+ 
+ struct type *
+ i386_linux_register_virtual_type (int reg)
+ {
+   /* Deal with the extra "orig_eax" pseudo register.  */
+   if (reg == I386_LINUX_ORIG_EAX_REGNUM)
+     return builtin_type_int;
+ 
+   return i386_register_virtual_type (reg);
+ }
  \f
  /* Recognizing signal handler frames.  */
  
Index: gdb/config/i386/tm-linux.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/config/i386/tm-linux.h,v
retrieving revision 1.28
diff -c -r1.28 tm-linux.h
*** gdb/config/i386/tm-linux.h	2001/11/10 03:02:20	1.28
--- gdb/config/i386/tm-linux.h	2002/01/11 21:51:28
***************
*** 60,65 ****
--- 60,69 ----
  #define REGISTER_RAW_SIZE(reg) i386_linux_register_raw_size ((reg))
  extern int i386_linux_register_raw_size (int reg);
  
+ #undef REGISTER_VIRTUAL_TYPE
+ #define REGISTER_VIRTUAL_TYPE(reg) i386_linux_register_virtual_type ((reg))
+ extern struct type *i386_linux_register_virtual_type (int reg);
+ 
  /* Linux/ELF uses stabs-in-ELF with the DWARF register numbering
     scheme by default, so we must redefine STAB_REG_TO_REGNUM.  This
     messes up the floating-point registers for a.out, but there is not


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

end of thread, other threads:[~2002-01-14 22:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-11 14:23 RFA: i386 Linux: provide correct type for orig_eax register Jim Blandy
2002-01-12  5:13 ` Mark Kettenis
2002-01-12 15:14   ` Jim Blandy
2002-01-12 15:40     ` Andrew Cagney
2002-01-14 13:58       ` Jim Blandy
2002-01-14 14:31         ` Mark Kettenis

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