diff options
author | Deng, Yimin (NSB - CN/Shanghai) <yimin.deng@nokia-sbell.com> | 2018-04-18 03:12:45 +0000 |
---|---|---|
committer | Dave Watson <davejwatson@fb.com> | 2018-04-24 10:34:47 -0700 |
commit | fba2ae7b2c43d3e706849c8098930683cbd0e322 (patch) | |
tree | 55dc096997a479b8bea2a6561df6629775dd84fa /include | |
parent | 2be1c2754a2f8dbeeb838fd9e6e1422f912efab7 (diff) | |
download | libunwind-fba2ae7b2c43d3e706849c8098930683cbd0e322.tar.gz |
mipsN32: A modification suggestion to support mips N32
Diffstat (limited to 'include')
-rw-r--r-- | include/libunwind-mips.h | 2 | ||||
-rw-r--r-- | include/tdep-mips/libunwind_i.h | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/libunwind-mips.h b/include/libunwind-mips.h index 97c95e24..ced34b20 100644 --- a/include/libunwind-mips.h +++ b/include/libunwind-mips.h @@ -98,7 +98,7 @@ typedef enum UNW_MIPS_R30, UNW_MIPS_R31, - UNW_MIPS_PC = 34, + UNW_MIPS_PC = 64, /* FIXME: Other registers! */ diff --git a/include/tdep-mips/libunwind_i.h b/include/tdep-mips/libunwind_i.h index 3fe40c0c..0c0fd3cf 100644 --- a/include/tdep-mips/libunwind_i.h +++ b/include/tdep-mips/libunwind_i.h @@ -247,6 +247,14 @@ dwarf_get (struct dwarf_cursor *c, dwarf_loc_t loc, unw_word_t *val) 0, c->as_arg); else if (c->as->abi == UNW_MIPS_ABI_O32) return read_s32 (c, DWARF_GET_LOC (loc), val); + else if (c->as->abi == UNW_MIPS_ABI_N32) { + if (tdep_big_endian(c->as)) + return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc) + 4, val, + 0, c->as_arg); + else + return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), val, + 0, c->as_arg); + } else return (*c->as->acc.access_mem) (c->as, DWARF_GET_LOC (loc), val, 0, c->as_arg); |