aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichal Ludvig <mludvig@suse.cz>2002-06-11 08:32:33 +0000
committerMichal Ludvig <mludvig@suse.cz>2002-06-11 08:32:33 +0000
commit23aa4c722c56b5e4e0c94c49b2f7f23b039e8c0a (patch)
tree6c1b9e5fc591b0d268b09ed6978bebf1803449bc /gdb
parent70eb15a4d8d33b4a3176676a04b6aae0ff47c0b0 (diff)
downloadgdb-23aa4c722c56b5e4e0c94c49b2f7f23b039e8c0a.zip
gdb-23aa4c722c56b5e4e0c94c49b2f7f23b039e8c0a.tar.gz
gdb-23aa4c722c56b5e4e0c94c49b2f7f23b039e8c0a.tar.bz2
2002-06-11 Michal Ludvig <mludvig@suse.cz>
* dwarf2cfi.c (unwind_tmp_obstack_init): New. (unwind_tmp_obstack_free, parse_frame_info) (update_context, cfi_read_fp, cfi_write_fp) (cfi_frame_chain, cfi_init_extra_frame_info) (cfi_virtual_frame_pointer): Use the above function.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/dwarf2cfi.c27
2 files changed, 33 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b2fc345..f33a22f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2002-06-11 Michal Ludvig <mludvig@suse.cz>
+
+ * dwarf2cfi.c (unwind_tmp_obstack_init): New.
+ (unwind_tmp_obstack_free, parse_frame_info)
+ (update_context, cfi_read_fp, cfi_write_fp)
+ (cfi_frame_chain, cfi_init_extra_frame_info)
+ (cfi_virtual_frame_pointer): Use the above function.
+
2002-06-11 Corinna Vinschen <vinschen@redhat.com>
* v850-tdep.c (v850_type_is_scalar): New function.
diff --git a/gdb/dwarf2cfi.c b/gdb/dwarf2cfi.c
index 783d1c0..0be7426 100644
--- a/gdb/dwarf2cfi.c
+++ b/gdb/dwarf2cfi.c
@@ -201,6 +201,7 @@ static void fde_chunks_need_space ();
static struct context *context_alloc ();
static struct frame_state *frame_state_alloc ();
+static void unwind_tmp_obstack_init ();
static void unwind_tmp_obstack_free ();
static void context_cpy (struct context *dst, struct context *src);
@@ -308,10 +309,16 @@ frame_state_alloc ()
}
static void
+unwind_tmp_obstack_init ()
+{
+ obstack_init (&unwind_tmp_obstack);
+}
+
+static void
unwind_tmp_obstack_free ()
{
obstack_free (&unwind_tmp_obstack, NULL);
- obstack_init (&unwind_tmp_obstack);
+ unwind_tmp_obstack_init ();
}
static void
@@ -1255,8 +1262,11 @@ update_context (struct context *context, struct frame_state *fs, int chain)
CORE_ADDR cfa;
long i;
+ unwind_tmp_obstack_init ();
+
orig_context = context_alloc ();
context_cpy (orig_context, context);
+
/* Compute this frame's CFA. */
switch (fs->cfa_how)
{
@@ -1380,7 +1390,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
char *end = NULL;
int from_eh = 0;
- obstack_init (&unwind_tmp_obstack);
+ unwind_tmp_obstack_init ();
dwarf_frame_buffer = 0;
@@ -1535,6 +1545,8 @@ cfi_read_fp ()
struct frame_state *fs;
CORE_ADDR cfa;
+ unwind_tmp_obstack_init ();
+
context = context_alloc ();
fs = frame_state_alloc ();
@@ -1544,7 +1556,9 @@ cfi_read_fp ()
update_context (context, fs, 0);
cfa = context->cfa;
+
unwind_tmp_obstack_free ();
+
return cfa;
}
@@ -1556,6 +1570,8 @@ cfi_write_fp (CORE_ADDR val)
struct context *context;
struct frame_state *fs;
+ unwind_tmp_obstack_init ();
+
context = context_alloc ();
fs = frame_state_alloc ();
@@ -1603,6 +1619,8 @@ cfi_frame_chain (struct frame_info *fi)
struct frame_state *fs;
CORE_ADDR cfa;
+ unwind_tmp_obstack_init ();
+
context = context_alloc ();
fs = frame_state_alloc ();
context_cpy (context, UNWIND_CONTEXT (fi));
@@ -1639,6 +1657,8 @@ cfi_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
struct frame_state *fs;
+ unwind_tmp_obstack_init ();
+
fs = frame_state_alloc ();
fi->context = frame_obstack_alloc (sizeof (struct context));
UNWIND_CONTEXT (fi)->reg =
@@ -1658,6 +1678,7 @@ cfi_init_extra_frame_info (int fromleaf, struct frame_info *fi)
frame_state_for (UNWIND_CONTEXT (fi), fs);
update_context (UNWIND_CONTEXT (fi), fs, 0);
}
+
unwind_tmp_obstack_free ();
}
@@ -1765,6 +1786,8 @@ cfi_virtual_frame_pointer (CORE_ADDR pc, int *frame_reg,
struct context *context;
struct frame_state *fs;
+ unwind_tmp_obstack_init ();
+
context = context_alloc ();
fs = frame_state_alloc ();