mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-25 16:47:38 +01:00
Bury the last_ip field until it can reappear in version 2.0.
This commit is contained in:
parent
1568d7afa2
commit
bb61e0bc2b
4 changed files with 12 additions and 6 deletions
|
@ -31,12 +31,6 @@ following members:
|
||||||
instruction \emph{beyond} the end of the procedure. If this address
|
instruction \emph{beyond} the end of the procedure. If this address
|
||||||
cannot be determined (e.g., due to lack of unwind information),
|
cannot be determined (e.g., due to lack of unwind information),
|
||||||
the \Var{end\_ip} member is cleared to 0. \\
|
the \Var{end\_ip} member is cleared to 0. \\
|
||||||
\item[\Type{unw\_word\_t} \Var{last\_ip}] The address of the first
|
|
||||||
instruction that could begin another procedure. Addresses from
|
|
||||||
end\_ip up to last\_ip are addresses where there are no
|
|
||||||
instructions. If this address cannot be determined (e.g., due to
|
|
||||||
lack of unwind information), the \Var{end\_ip} member is cleared to
|
|
||||||
0. \\
|
|
||||||
\item[\Type{unw\_word\_t} \Var{lsda}] The address of the
|
\item[\Type{unw\_word\_t} \Var{lsda}] The address of the
|
||||||
language-specific data-area (LSDA). This area normally contains
|
language-specific data-area (LSDA). This area normally contains
|
||||||
language-specific information needed during exception handling. If
|
language-specific information needed during exception handling. If
|
||||||
|
|
|
@ -126,7 +126,9 @@ typedef struct unw_proc_info
|
||||||
{
|
{
|
||||||
unw_word_t start_ip; /* first IP covered by this procedure */
|
unw_word_t start_ip; /* first IP covered by this procedure */
|
||||||
unw_word_t end_ip; /* first IP NOT covered by this procedure */
|
unw_word_t end_ip; /* first IP NOT covered by this procedure */
|
||||||
|
#if defined(NEED_LAST_IP)
|
||||||
unw_word_t last_ip; /* first IP that could begin another procedure */
|
unw_word_t last_ip; /* first IP that could begin another procedure */
|
||||||
|
#endif
|
||||||
unw_word_t lsda; /* address of lang.-spec. data area (if any) */
|
unw_word_t lsda; /* address of lang.-spec. data area (if any) */
|
||||||
unw_word_t handler; /* optional personality routine */
|
unw_word_t handler; /* optional personality routine */
|
||||||
unw_word_t gp; /* global-pointer value for this procedure */
|
unw_word_t gp; /* global-pointer value for this procedure */
|
||||||
|
|
|
@ -898,7 +898,11 @@ dwarf_search_unwind_table (unw_addr_space_t as, unw_word_t ip,
|
||||||
pi->flags = UNW_PI_FLAG_DEBUG_FRAME;
|
pi->flags = UNW_PI_FLAG_DEBUG_FRAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(NEED_LAST_IP)
|
||||||
pi->last_ip = last_ip;
|
pi->last_ip = last_ip;
|
||||||
|
#else
|
||||||
|
(void)last_ip;
|
||||||
|
#endif
|
||||||
if (ip < pi->start_ip || ip >= pi->end_ip)
|
if (ip < pi->start_ip || ip >= pi->end_ip)
|
||||||
return -UNW_ENOINFO;
|
return -UNW_ENOINFO;
|
||||||
|
|
||||||
|
|
|
@ -992,9 +992,15 @@ dwarf_reg_states_table_iterate(struct dwarf_cursor *c,
|
||||||
if (ret >= 0 && prev_ip < curr_ip)
|
if (ret >= 0 && prev_ip < curr_ip)
|
||||||
ret = cb(token, &sr.rs_current, sizeof(sr.rs_current), prev_ip, curr_ip);
|
ret = cb(token, &sr.rs_current, sizeof(sr.rs_current), prev_ip, curr_ip);
|
||||||
}
|
}
|
||||||
|
#if defined(NEED_LAST_IP)
|
||||||
if (ret >= 0 && curr_ip < c->pi.last_ip)
|
if (ret >= 0 && curr_ip < c->pi.last_ip)
|
||||||
/* report the dead zone after the procedure ends */
|
/* report the dead zone after the procedure ends */
|
||||||
ret = cb(token, &sr.rs_current, sizeof(sr.rs_current), curr_ip, c->pi.last_ip);
|
ret = cb(token, &sr.rs_current, sizeof(sr.rs_current), curr_ip, c->pi.last_ip);
|
||||||
|
#else
|
||||||
|
if (ret >= 0 && curr_ip < c->pi.end_ip)
|
||||||
|
/* report for whatever is left before procedure end */
|
||||||
|
ret = cb(token, &sr.rs_current, sizeof(sr.rs_current), curr_ip, c->pi.end_ip);
|
||||||
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue