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.
This commit is contained in:
parent
70eb15a4d8
commit
23aa4c722c
|
@ -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>
|
2002-06-11 Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
|
||||||
* v850-tdep.c (v850_type_is_scalar): New function.
|
* v850-tdep.c (v850_type_is_scalar): New function.
|
||||||
|
|
|
@ -201,6 +201,7 @@ static void fde_chunks_need_space ();
|
||||||
|
|
||||||
static struct context *context_alloc ();
|
static struct context *context_alloc ();
|
||||||
static struct frame_state *frame_state_alloc ();
|
static struct frame_state *frame_state_alloc ();
|
||||||
|
static void unwind_tmp_obstack_init ();
|
||||||
static void unwind_tmp_obstack_free ();
|
static void unwind_tmp_obstack_free ();
|
||||||
static void context_cpy (struct context *dst, struct context *src);
|
static void context_cpy (struct context *dst, struct context *src);
|
||||||
|
|
||||||
|
@ -307,11 +308,17 @@ frame_state_alloc ()
|
||||||
return fs;
|
return fs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
unwind_tmp_obstack_init ()
|
||||||
|
{
|
||||||
|
obstack_init (&unwind_tmp_obstack);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
unwind_tmp_obstack_free ()
|
unwind_tmp_obstack_free ()
|
||||||
{
|
{
|
||||||
obstack_free (&unwind_tmp_obstack, NULL);
|
obstack_free (&unwind_tmp_obstack, NULL);
|
||||||
obstack_init (&unwind_tmp_obstack);
|
unwind_tmp_obstack_init ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1255,8 +1262,11 @@ update_context (struct context *context, struct frame_state *fs, int chain)
|
||||||
CORE_ADDR cfa;
|
CORE_ADDR cfa;
|
||||||
long i;
|
long i;
|
||||||
|
|
||||||
|
unwind_tmp_obstack_init ();
|
||||||
|
|
||||||
orig_context = context_alloc ();
|
orig_context = context_alloc ();
|
||||||
context_cpy (orig_context, context);
|
context_cpy (orig_context, context);
|
||||||
|
|
||||||
/* Compute this frame's CFA. */
|
/* Compute this frame's CFA. */
|
||||||
switch (fs->cfa_how)
|
switch (fs->cfa_how)
|
||||||
{
|
{
|
||||||
|
@ -1380,7 +1390,7 @@ dwarf2_build_frame_info (struct objfile *objfile)
|
||||||
char *end = NULL;
|
char *end = NULL;
|
||||||
int from_eh = 0;
|
int from_eh = 0;
|
||||||
|
|
||||||
obstack_init (&unwind_tmp_obstack);
|
unwind_tmp_obstack_init ();
|
||||||
|
|
||||||
dwarf_frame_buffer = 0;
|
dwarf_frame_buffer = 0;
|
||||||
|
|
||||||
|
@ -1535,6 +1545,8 @@ cfi_read_fp ()
|
||||||
struct frame_state *fs;
|
struct frame_state *fs;
|
||||||
CORE_ADDR cfa;
|
CORE_ADDR cfa;
|
||||||
|
|
||||||
|
unwind_tmp_obstack_init ();
|
||||||
|
|
||||||
context = context_alloc ();
|
context = context_alloc ();
|
||||||
fs = frame_state_alloc ();
|
fs = frame_state_alloc ();
|
||||||
|
|
||||||
|
@ -1544,7 +1556,9 @@ cfi_read_fp ()
|
||||||
update_context (context, fs, 0);
|
update_context (context, fs, 0);
|
||||||
|
|
||||||
cfa = context->cfa;
|
cfa = context->cfa;
|
||||||
|
|
||||||
unwind_tmp_obstack_free ();
|
unwind_tmp_obstack_free ();
|
||||||
|
|
||||||
return cfa;
|
return cfa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1556,6 +1570,8 @@ cfi_write_fp (CORE_ADDR val)
|
||||||
struct context *context;
|
struct context *context;
|
||||||
struct frame_state *fs;
|
struct frame_state *fs;
|
||||||
|
|
||||||
|
unwind_tmp_obstack_init ();
|
||||||
|
|
||||||
context = context_alloc ();
|
context = context_alloc ();
|
||||||
fs = frame_state_alloc ();
|
fs = frame_state_alloc ();
|
||||||
|
|
||||||
|
@ -1603,6 +1619,8 @@ cfi_frame_chain (struct frame_info *fi)
|
||||||
struct frame_state *fs;
|
struct frame_state *fs;
|
||||||
CORE_ADDR cfa;
|
CORE_ADDR cfa;
|
||||||
|
|
||||||
|
unwind_tmp_obstack_init ();
|
||||||
|
|
||||||
context = context_alloc ();
|
context = context_alloc ();
|
||||||
fs = frame_state_alloc ();
|
fs = frame_state_alloc ();
|
||||||
context_cpy (context, UNWIND_CONTEXT (fi));
|
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;
|
struct frame_state *fs;
|
||||||
|
|
||||||
|
unwind_tmp_obstack_init ();
|
||||||
|
|
||||||
fs = frame_state_alloc ();
|
fs = frame_state_alloc ();
|
||||||
fi->context = frame_obstack_alloc (sizeof (struct context));
|
fi->context = frame_obstack_alloc (sizeof (struct context));
|
||||||
UNWIND_CONTEXT (fi)->reg =
|
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);
|
frame_state_for (UNWIND_CONTEXT (fi), fs);
|
||||||
update_context (UNWIND_CONTEXT (fi), fs, 0);
|
update_context (UNWIND_CONTEXT (fi), fs, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
unwind_tmp_obstack_free ();
|
unwind_tmp_obstack_free ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1765,6 +1786,8 @@ cfi_virtual_frame_pointer (CORE_ADDR pc, int *frame_reg,
|
||||||
struct context *context;
|
struct context *context;
|
||||||
struct frame_state *fs;
|
struct frame_state *fs;
|
||||||
|
|
||||||
|
unwind_tmp_obstack_init ();
|
||||||
|
|
||||||
context = context_alloc ();
|
context = context_alloc ();
|
||||||
fs = frame_state_alloc ();
|
fs = frame_state_alloc ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue