diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-12-24 10:38:35 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2023-12-24 11:15:01 -0500 |
commit | 78f2fd84e832c49a496ab712512be058c0c2912b (patch) | |
tree | a3a2968753c42b5fe6b940166689a42d9466822d /gdb/python/py-unwind.c | |
parent | 8b31004bd82d3833d042dc5d456e1279635734ab (diff) | |
download | fsf-binutils-gdb-78f2fd84e832c49a496ab712512be058c0c2912b.zip fsf-binutils-gdb-78f2fd84e832c49a496ab712512be058c0c2912b.tar.gz fsf-binutils-gdb-78f2fd84e832c49a496ab712512be058c0c2912b.tar.bz2 |
gdb: remove VALUE_REGNUM, add value::regnum
Remove VALUE_REGNUM, replace it with a method on struct value. Set
`m_location.reg.regnum` directly from value::allocate_register_lazy,
which is fine because allocate_register_lazy is a static creation
function for struct value.
Change-Id: Id632502357da971617d9dce1e2eab9b56dbcf52d
Diffstat (limited to 'gdb/python/py-unwind.c')
-rw-r--r-- | gdb/python/py-unwind.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index 8fed55b..f12485c 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -336,7 +336,7 @@ unwind_infopy_add_saved_register (PyObject *self, PyObject *args, PyObject *kw) struct value *user_reg_value = value_of_user_reg (regnum, pending_frame->frame_info); if (user_reg_value->lval () == lval_register) - regnum = VALUE_REGNUM (user_reg_value); + regnum = user_reg_value->regnum (); if (regnum >= gdbarch_num_cooked_regs (pending_frame->gdbarch)) { PyErr_SetString (PyExc_ValueError, "Bad register"); |