summaryrefslogtreecommitdiff
path: root/src/tilegx
diff options
context:
space:
mode:
authorDoug Moore <dougm@rice.edu>2017-08-06 15:35:43 -0500
committerDave Watson <davejwatson@fb.com>2017-08-07 09:05:17 -0700
commite360c3ddbd1fa182b6e5f7bf22a7b9836a9c1cd4 (patch)
tree85a3c89458432fd3f28cbf76beffa8adf9d8bfe2 /src/tilegx
parent93f319466f3de6eb2dcd1e322d57ffe7cb71dcc3 (diff)
downloadlibunwind-e360c3ddbd1fa182b6e5f7bf22a7b9836a9c1cd4.tar.gz
For architectures that initialize the dwarf ip cache, but do not
update when the ip register is set, add those updates.
Diffstat (limited to 'src/tilegx')
-rw-r--r--src/tilegx/Gregs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tilegx/Gregs.c b/src/tilegx/Gregs.c
index 53e7bf4c..57c61256 100644
--- a/src/tilegx/Gregs.c
+++ b/src/tilegx/Gregs.c
@@ -52,7 +52,11 @@ tdep_access_reg (struct cursor *c, unw_regnum_t reg, unw_word_t *valp,
}
if (write)
- return dwarf_put (&c->dwarf, loc, *valp);
+ {
+ if (reg == UNW_TILEGX_PC)
+ c->dwarf.ip = *valp; /* update the IP cache */
+ return dwarf_put (&c->dwarf, loc, *valp);
+ }
else
return dwarf_get (&c->dwarf, loc, valp);
}