aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-03-27 15:31:35 +0000
committerDaniel Jacobowitz <drow@false.org>2007-03-27 15:31:35 +0000
commitd2449ee801d18f5af7317bc72c92bc9bbb7b669e (patch)
treec23ac1b8bf81e9b5faca84e418f0c20d405d624f /gdb
parent067b934b9aff2cbbd29c2f952f617dbd44f73e9f (diff)
downloadgdb-d2449ee801d18f5af7317bc72c92bc9bbb7b669e.zip
gdb-d2449ee801d18f5af7317bc72c92bc9bbb7b669e.tar.gz
gdb-d2449ee801d18f5af7317bc72c92bc9bbb7b669e.tar.bz2
* amd64-tdep.c (amd64_init_frame_cache): New function.
(amd64_alloc_frame_cache, amd64_skip_prologue): Use it.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/amd64-tdep.c20
2 files changed, 19 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2f682ef..bdb281f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-27 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * amd64-tdep.c (amd64_init_frame_cache): New function.
+ (amd64_alloc_frame_cache, amd64_skip_prologue): Use it.
+
2007-03-26 Nigel Stephens <nigel@mips.com>
Maciej W. Rozycki <macro@mips.com>
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c
index 8c3e887..de64f8d 100644
--- a/gdb/amd64-tdep.c
+++ b/gdb/amd64-tdep.c
@@ -726,16 +726,13 @@ struct amd64_frame_cache
int frameless_p;
};
-/* Allocate and initialize a frame cache. */
+/* Initialize a frame cache. */
-static struct amd64_frame_cache *
-amd64_alloc_frame_cache (void)
+static void
+amd64_init_frame_cache (struct amd64_frame_cache *cache)
{
- struct amd64_frame_cache *cache;
int i;
- cache = FRAME_OBSTACK_ZALLOC (struct amd64_frame_cache);
-
/* Base address. */
cache->base = 0;
cache->sp_offset = -8;
@@ -749,7 +746,17 @@ amd64_alloc_frame_cache (void)
/* Frameless until proven otherwise. */
cache->frameless_p = 1;
+}
+/* Allocate and initialize a frame cache. */
+
+static struct amd64_frame_cache *
+amd64_alloc_frame_cache (void)
+{
+ struct amd64_frame_cache *cache;
+
+ cache = FRAME_OBSTACK_ZALLOC (struct amd64_frame_cache);
+ amd64_init_frame_cache (cache);
return cache;
}
@@ -810,6 +817,7 @@ amd64_skip_prologue (CORE_ADDR start_pc)
struct amd64_frame_cache cache;
CORE_ADDR pc;
+ amd64_init_frame_cache (&cache);
pc = amd64_analyze_prologue (start_pc, 0xffffffffffffffffLL, &cache);
if (cache.frameless_p)
return start_pc;