This is the mail archive of the gdb-patches@sources.redhat.com 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]

RFA: i386 Linux: provide correct type for orig_eax register



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);
+ }
  
  /* 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


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