1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-22 23:47:39 +01:00

Adjust for "ia64_rse" to "rse" prefix change.

2004/11/23 16:59:56-08:00 mostang.com!davidm
(_UPT_access_reg): If the register is out of range, set errno
	to EINVAL.
	When encountering an error while accessing a register,
	print the corresponding error string.

(Logical change 1.290)
This commit is contained in:
mostang.com!davidm 2005-05-03 09:13:17 +00:00
parent 87081cebab
commit 4849af2d09

View file

@ -1,5 +1,5 @@
/* libunwind - a platform-independent unwind library
Copyright (C) 2003-2004 Hewlett-Packard Co
Copyright (C) 2003-2005 Hewlett-Packard Co
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of libunwind.
@ -152,7 +152,7 @@ _UPT_access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val,
if (write)
{
bsp = ia64_rse_skip_regs (*val, sof);
bsp = rse_skip_regs (*val, sof);
#ifdef HAVE_TTRACE
# warning No support for ttrace() yet.
#else
@ -172,7 +172,7 @@ _UPT_access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val,
if (errno)
goto badreg;
#endif
*val = ia64_rse_skip_regs (bsp, -sof);
*val = rse_skip_regs (bsp, -sof);
}
goto out;
}
@ -197,7 +197,7 @@ _UPT_access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val,
new_sof = (*val & 0x7f);
if (old_sof != new_sof)
{
bsp = ia64_rse_skip_regs (bsp, -old_sof + new_sof);
bsp = rse_skip_regs (bsp, -old_sof + new_sof);
#ifdef HAVE_TTRACE
# warning No support for ttrace() yet.
#else
@ -222,7 +222,10 @@ _UPT_access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val,
#endif
if ((unsigned) reg >= sizeof (_UPT_reg_offset) / sizeof (_UPT_reg_offset[0]))
goto badreg;
{
errno = EINVAL;
goto badreg;
}
#ifdef HAVE_TTRACE
# warning No support for ttrace() yet.
@ -246,6 +249,6 @@ _UPT_access_reg (unw_addr_space_t as, unw_regnum_t reg, unw_word_t *val,
return 0;
badreg:
Debug (1, "bad register number %u\n", reg);
Debug (1, "bad register number %u (error: %s)\n", reg, strerror (errno));
return -UNW_EBADREG;
}