aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.h
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/frame.h
parent3d31bc39e655ea39721754fa0ea539a8a0c9b26c (diff)
downloadgdb-123cd851480c728845a4c3f85da772dd8331cf19.zip
gdb-123cd851480c728845a4c3f85da772dd8331cf19.tar.gz
gdb-123cd851480c728845a4c3f85da772dd8331cf19.tar.bz2
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/frame.h')
-rw-r--r--gdb/frame.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/frame.h b/gdb/frame.h
index fdb401d..09842c9 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -821,15 +821,15 @@ extern frame_print_options user_frame_print_options;
struct frame_arg
{
/* Symbol for this parameter used for example for its name. */
- struct symbol *sym;
+ struct symbol *sym = nullptr;
/* Value of the parameter. It is NULL if ERROR is not NULL; if both VAL and
ERROR are NULL this parameter's value should not be printed. */
- struct value *val;
+ struct value *val = nullptr;
/* String containing the error message, it is more usually NULL indicating no
error occured reading this parameter. */
- char *error;
+ gdb::unique_xmalloc_ptr<char> error;
/* One of the print_entry_values_* entries as appropriate specifically for
this frame_arg. It will be different from print_entry_values. With
@@ -840,7 +840,7 @@ struct frame_arg
value - print_entry_values_compact is not permitted fi ui_out_is_mi_like_p
(in such case print_entry_values_no and print_entry_values_only is used
for each parameter kind specifically. */
- const char *entry_kind;
+ const char *entry_kind = nullptr;
};
extern void read_frame_arg (const frame_print_options &fp_opts,