diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 07:52:09 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:21:06 -0700 |
commit | d0c9791728caa0d3b3270a997c7fd97919976c97 (patch) | |
tree | 1753b7232efa89e05696d4289d60ad019fc161e4 /gdb/python/py-unwind.c | |
parent | 7cf57bc5be656c62cc6b80280a9eddad2b8ded3f (diff) | |
download | binutils-d0c9791728caa0d3b3270a997c7fd97919976c97.zip binutils-d0c9791728caa0d3b3270a997c7fd97919976c97.tar.gz binutils-d0c9791728caa0d3b3270a997c7fd97919976c97.tar.bz2 |
Turn value_type into method
This changes value_type to be a method of value. Much of this patch
was written by script.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/python/py-unwind.c')
-rw-r--r-- | gdb/python/py-unwind.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c index e7ec660..4422512 100644 --- a/gdb/python/py-unwind.c +++ b/gdb/python/py-unwind.c @@ -130,7 +130,7 @@ pyuw_value_obj_to_pointer (PyObject *pyo_value, CORE_ADDR *addr) { if ((value = value_object_to_value (pyo_value)) != NULL) { - *addr = unpack_pointer (value_type (value), + *addr = unpack_pointer (value->type (), value_contents (value).data ()); rc = 1; } @@ -292,13 +292,13 @@ unwind_infopy_add_saved_register (PyObject *self, PyObject *args) return NULL; } data_size = register_size (pending_frame->gdbarch, regnum); - if (data_size != value_type (value)->length ()) + if (data_size != value->type ()->length ()) { PyErr_Format ( PyExc_ValueError, "The value of the register returned by the Python " "sniffer has unexpected size: %u instead of %u.", - (unsigned) value_type (value)->length (), + (unsigned) value->type ()->length (), (unsigned) data_size); return NULL; } @@ -620,7 +620,7 @@ pyuw_sniffer (const struct frame_unwind *self, frame_info_ptr this_frame, /* `value' validation was done before, just assert. */ gdb_assert (value != NULL); - gdb_assert (data_size == value_type (value)->length ()); + gdb_assert (data_size == value->type ()->length ()); cached_frame->reg[i].data = (gdb_byte *) xmalloc (data_size); memcpy (cached_frame->reg[i].data, |