From 6150f2f426e6bd374d699f4afd608605181dec30 Mon Sep 17 00:00:00 2001 From: Doug Moore Date: Sun, 6 Aug 2017 22:48:22 -0500 Subject: [PATCH] Better imitate the choice of which register to identify as ip for tilegx. --- src/tilegx/Gregs.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tilegx/Gregs.c b/src/tilegx/Gregs.c index 57c61256..565c6f44 100644 --- a/src/tilegx/Gregs.c +++ b/src/tilegx/Gregs.c @@ -53,8 +53,14 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp, if (write) { - if (reg == UNW_TILEGX_PC) - c->dwarf.ip = *valp; /* update the IP cache */ + if (ci->dwarf.use_prev_instr == 0) { + if (reg == UNW_TILEGX_PC) + c->dwarf.ip = *valp; /* update the IP cache */ + } + else { + if (reg == UNW_TILEGX_R55) + c->dwarf.ip = *valp; /* update the IP cache */ + } return dwarf_put (&c->dwarf, loc, *valp); } else