mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-12-23 20:03:43 +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:
parent
a8be10e251
commit
f5cb2c52dc
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue