1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-02 08:09:27 +01:00

(parse_dynamic): Call ia64_fetch_proc_info() before creating the

state-record.
(ia64_fetch_proc_info): Rename from get_proc_info().
(create_state_record_for): Assert that c->pi_valid is TRUE at the
	time of entry.  Remove call to get_proc_info().

(Logical change 1.95)
This commit is contained in:
mostang.com!davidm 2003-09-18 06:09:22 +00:00
parent 46f5783f5d
commit cbf1d7d56b

View file

@ -755,8 +755,8 @@ parse_dynamic (struct cursor *c, struct ia64_state_record *sr)
enum ia64_where where;
unw_dyn_op_t *op;
int32_t when, len;
int memory, ret;
int8_t qp;
int memory;
for (r = proc->regions; r; r = r->next)
{
@ -866,6 +866,9 @@ parse_dynamic (struct cursor *c, struct ia64_state_record *sr)
pop (sr);
new_ip = op->val + ((sr->when_target / 3) * 16
+ (sr->when_target % 3));
ret = ia64_fetch_proc_info (c, new_ip, 1);
if (ret < 0)
return ret;
return create_state_record_for (c, sr, new_ip);
case UNW_DYN_STOP:
@ -879,8 +882,8 @@ parse_dynamic (struct cursor *c, struct ia64_state_record *sr)
}
static int
get_proc_info (struct cursor *c, unw_word_t ip, int need_unwind_info)
HIDDEN int
ia64_fetch_proc_info (struct cursor *c, unw_word_t ip, int need_unwind_info)
{
int ret, dynamic = 1;
@ -922,6 +925,8 @@ create_state_record_for (struct cursor *c, struct ia64_state_record *sr,
uint8_t *dp, *desc_end;
int ret;
assert (c->pi_valid);
/* build state record */
memset (sr, 0, sizeof (*sr));
for (r = sr->curr.reg; r < sr->curr.reg + IA64_NUM_PREGS; ++r)
@ -930,10 +935,6 @@ create_state_record_for (struct cursor *c, struct ia64_state_record *sr,
sr->first_region = 1;
sr->return_link_reg = 0;
ret = get_proc_info (c, ip, 1);
if (ret < 0)
return ret;
if (!c->pi.unwind_info)
{
/* No info, return default unwinder (leaf proc, no mem stack, no
@ -1044,6 +1045,8 @@ create_state_record_for (struct cursor *c, struct ia64_state_record *sr,
return 0;
}
/* The proc-info must be valid for IP before this routine can be
called. */
HIDDEN int
ia64_create_state_record (struct cursor *c, struct ia64_state_record *sr)
{
@ -1074,6 +1077,6 @@ ia64_make_proc_info (struct cursor *c)
if (c->as->caching_policy == UNW_CACHE_NONE
|| ia64_get_cached_proc_info (c) < 0)
/* Lookup it up the slow way... */
return get_proc_info (c, c->ip, 0);
return ia64_fetch_proc_info (c, c->ip, 0);
return 0;
}