1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-12-23 12:03:41 +01:00

2007-12-14 Mark Wielaard <mwielaard@redhat.com>

* src/mi/Gget_reg.c (unw_get_reg): Use tdep_get_ip() when
   looking for UNW_REG_IP.
This commit is contained in:
David Mosberger-Tang 2008-01-07 15:43:42 -07:00
parent a8be10e251
commit f5cb2c52dc

View file

@ -30,5 +30,12 @@ unw_get_reg (unw_cursor_t *cursor, int regnum, unw_word_t *valp)
{
struct cursor *c = (struct cursor *) cursor;
// We can get the IP value directly without needing a lookup.
if (regnum == UNW_REG_IP)
{
*valp = tdep_get_ip (c);
return 0;
}
return tdep_access_reg (c, regnum, valp, 0);
}