mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-17 21:47:37 +01:00
(ia64_strloc): New function to stringify a location.
(Logical change 1.84)
This commit is contained in:
parent
78a7c5a8c1
commit
f8d5624ee9
1 changed files with 37 additions and 0 deletions
|
@ -32,6 +32,43 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
# include <sys/uc_access.h>
|
# include <sys/uc_access.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef UNW_DEBUG
|
||||||
|
|
||||||
|
HIDDEN const char *
|
||||||
|
ia64_strloc (ia64_loc_t loc)
|
||||||
|
{
|
||||||
|
static char buf[128];
|
||||||
|
|
||||||
|
if (IA64_IS_NULL_LOC (loc))
|
||||||
|
return "<null>";
|
||||||
|
|
||||||
|
buf[0] = '\0';
|
||||||
|
|
||||||
|
if (IA64_IS_MEMSTK_NAT (loc))
|
||||||
|
strcat (buf, "memstk_nat(");
|
||||||
|
if (IA64_IS_UC_LOC (loc))
|
||||||
|
strcat (buf, "uc(");
|
||||||
|
if (IA64_IS_FP_LOC (loc))
|
||||||
|
strcat (buf, "fp(");
|
||||||
|
|
||||||
|
if (IA64_IS_REG_LOC (loc))
|
||||||
|
sprintf (buf + strlen (buf), "%s", unw_regname (IA64_GET_REG (loc)));
|
||||||
|
else
|
||||||
|
sprintf (buf + strlen (buf), "0x%llx",
|
||||||
|
(unsigned long long) IA64_GET_ADDR (loc));
|
||||||
|
|
||||||
|
if (IA64_IS_FP_LOC (loc))
|
||||||
|
strcat (buf, ")");
|
||||||
|
if (IA64_IS_UC_LOC (loc))
|
||||||
|
strcat (buf, ")");
|
||||||
|
if (IA64_IS_MEMSTK_NAT (loc))
|
||||||
|
strcat (buf, ")");
|
||||||
|
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* UNW_DEBUG */
|
||||||
|
|
||||||
#ifdef UNW_REMOTE_ONLY
|
#ifdef UNW_REMOTE_ONLY
|
||||||
|
|
||||||
/* unw_local_addr_space is a NULL pointer in this case. */
|
/* unw_local_addr_space is a NULL pointer in this case. */
|
||||||
|
|
Loading…
Reference in a new issue