This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] i386-tdep.c: Fix datatype
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 23 Jun 2005 18:36:37 +0200
- Subject: [RFA] i386-tdep.c: Fix datatype
- Reply-to: gdb-patches at sources dot redhat dot com
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.