This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH/i386newframe] Replace extract_address
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 17 May 2003 15:46:21 +0200 (CEST)
- Subject: [PATCH/i386newframe] Replace extract_address
To catch up with what Andrew has done to mainline.
Checked in.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* i386-tdep.c (i386_frame_cache, i386_sigtramp_frame_cache,
i386_extract_struct_value_address, i386_svr4_sigcontext_addr): Use
extract_unsigned_integer instead of extract_address.
* i386bsd-tdep.c (i386bsd_sigcontext_addr): Likewise.
* i386-linux-tdep.c (i386_linux_sigcontext_addr): Likewise.
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.138.2.10
diff -u -p -r1.138.2.10 i386-tdep.c
--- i386-tdep.c 10 May 2003 23:18:22 -0000 1.138.2.10
+++ i386-tdep.c 17 May 2003 13:42:17 -0000
@@ -713,7 +713,7 @@ i386_frame_cache (struct frame_info *nex
occurred. */
frame_unwind_register (next_frame, I386_EBP_REGNUM, buf);
- cache->base = extract_address (buf, 4);
+ cache->base = extract_unsigned_integer (buf, 4);
if (cache->base == 0)
return cache;
@@ -735,7 +735,7 @@ i386_frame_cache (struct frame_info *nex
functions this might work too. */
frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
- cache->base = extract_address (buf, 4) + cache->sp_offset;
+ cache->base = extract_unsigned_integer (buf, 4) + cache->sp_offset;
}
/* Now that we have the base address for the stack frame we can
@@ -886,7 +886,7 @@ i386_sigtramp_frame_cache (struct frame_
cache = i386_alloc_frame_cache ();
frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
- cache->base = extract_address (buf, 4) - 4;
+ cache->base = extract_unsigned_integer (buf, 4) - 4;
addr = tdep->sigcontext_addr (next_frame);
cache->saved_regs[I386_EIP_REGNUM] = addr + tdep->sc_pc_offset;
@@ -1200,7 +1200,7 @@ i386_extract_struct_value_address (struc
char buf[4];
regcache_cooked_read (regcache, I386_EAX_REGNUM, buf);
- return extract_address (buf, 4);
+ return extract_unsigned_integer (buf, 4);
}
@@ -1478,7 +1478,7 @@ i386_svr4_sigcontext_addr (struct frame_
CORE_ADDR sp;
frame_unwind_register (next_frame, I386_ESP_REGNUM, buf);
- sp = extract_address (buf, 4);
+ sp = extract_unsigned_integer (buf, 4);
return read_memory_unsigned_integer (sp + 8, 4);
}
Index: i386bsd-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386bsd-tdep.c,v
retrieving revision 1.13.16.1
diff -u -p -r1.13.16.1 i386bsd-tdep.c
--- i386bsd-tdep.c 19 Apr 2003 16:40:13 -0000 1.13.16.1
+++ i386bsd-tdep.c 17 May 2003 13:42:17 -0000
@@ -51,7 +51,7 @@ i386bsd_sigcontext_addr (struct frame_in
CORE_ADDR sp;
frame_unwind_register (next_frame, SP_REGNUM, buf);
- sp = extract_address (buf, 4);
+ sp = extract_unsigned_integer (buf, 4);
return read_memory_unsigned_integer (sp + 8, 4);
}
Index: i386-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-tdep.c,v
retrieving revision 1.26.2.1
diff -u -p -r1.26.2.1 i386-linux-tdep.c
--- i386-linux-tdep.c 19 Apr 2003 16:40:13 -0000 1.26.2.1
+++ i386-linux-tdep.c 17 May 2003 13:42:17 -0000
@@ -250,7 +250,7 @@ i386_linux_sigcontext_addr (struct frame
char buf[4];
frame_unwind_register (next_frame, SP_REGNUM, buf);
- sp = extract_address (buf, 4);
+ sp = extract_unsigned_integer (buf, 4);
pc = i386_linux_sigtramp_start (frame_pc_unwind (next_frame));
if (pc)
@@ -273,7 +273,7 @@ i386_linux_sigcontext_addr (struct frame
pointer to the user context is passed as the third argument
to the signal handler. */
read_memory (sp + 8, 4, buf);
- return extract_address (buf, 4) + 20;
+ return extract_unsigned_integer (buf, 4) + 20;
}
error ("Couldn't recognize signal trampoline.");