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-tdep.c: Fix datatype


Hi,

the below patch is just a minor tweak.  The stack pointer offset sp_offset
stored in struct i386_frame_cache is an offset, not an address.  It looks
more correct to define it as LONGEST, not as CORE_ADDR.  Especially since
sp_offset can contain positve and negative values.


Corinna

	* i386-tdep.c (struct i386_frame_cache): Define sp_offset as LONGEST.

Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.214
diff -u -p -r1.214 i386-tdep.c
--- i386-tdep.c 11 Jun 2005 19:11:32 -0000      1.214
+++ i386-tdep.c 23 Jun 2005 16:33:04 -0000
@@ -289,7 +289,7 @@ struct i386_frame_cache
 {
   /* Base address.  */
   CORE_ADDR base;
-  CORE_ADDR sp_offset;
+  LONGEST sp_offset;
   CORE_ADDR pc;
 
   /* Saved registers.  */

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat, Inc.


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