summaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-08-06 13:50:03 -0600
committerTom Tromey <tromey@adacore.com>2019-08-07 06:37:21 -0600
commit123cd851480c728845a4c3f85da772dd8331cf19 (patch)
tree1ecc475ebe4da5ade1fd9e0219bcaafd567f11ad /gdb/python
parent3d31bc39e655ea39721754fa0ea539a8a0c9b26c (diff)
downloadbinutils-gdb-123cd851480c728845a4c3f85da772dd8331cf19.tar.gz
Make struct frame_arg self-managing
This changes struct frame_arg to be self-managing and then fixes the various users. Tested by the buildbot. gdb/ChangeLog 2019-08-07 Tom Tromey <tromey@adacore.com> * stack.c (print_frame_arg, read_frame_local, read_frame_arg) (print_frame_args): Update. * python/py-framefilter.c (py_print_single_arg, enumerate_args): Update. * mi/mi-cmd-stack.c (list_arg_or_local): Update. * frame.h (struct frame_arg): Add initializers. <error>: Now a unique_xmalloc_ptr.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-framefilter.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/python/py-framefilter.c b/gdb/python/py-framefilter.c
index d805ec68f23..ecd633ab695 100644
--- a/gdb/python/py-framefilter.c
+++ b/gdb/python/py-framefilter.c
@@ -398,7 +398,7 @@ py_print_single_arg (struct ui_out *out,
gdb_assert (fa != NULL && fa->error != NULL);
out->field_fmt ("value",
_("<error reading variable: %s>"),
- fa->error);
+ fa->error.get ());
}
else
py_print_value (out, val, opts, 0, args_type, language);
@@ -486,9 +486,6 @@ enumerate_args (PyObject *iter,
read_frame_arg (user_frame_print_options,
sym, frame, &arg, &entryarg);
- gdb::unique_xmalloc_ptr<char> arg_holder (arg.error);
- gdb::unique_xmalloc_ptr<char> entry_holder (entryarg.error);
-
/* The object has not provided a value, so this is a frame
argument to be read by GDB. In this case we have to
account for entry-values. */