diff options
author | Tom Tromey <tom@tromey.com> | 2023-01-31 14:38:30 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2023-02-13 15:22:16 -0700 |
commit | efaf1ae025cbef5438d2fe943dd010b773d757ac (patch) | |
tree | d51e1d379430439462d5cb1358c642e679647f12 /gdb/cli | |
parent | cdf3de175d41acec85d6c3cc8b599f79658edb06 (diff) | |
download | binutils-efaf1ae025cbef5438d2fe943dd010b773d757ac.zip binutils-efaf1ae025cbef5438d2fe943dd010b773d757ac.tar.gz binutils-efaf1ae025cbef5438d2fe943dd010b773d757ac.tar.bz2 |
Turn remaining value_contents functions into methods
This turns the remaining value_contents functions -- value_contents,
value_contents_all, value_contents_for_printing, and
value_contents_for_printing_const -- into methods of value. It also
converts the static functions require_not_optimized_out and
require_available to be private methods.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-cmds.c | 2 | ||||
-rw-r--r-- | gdb/cli/cli-dump.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index ce4bf6b..871785d 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -2196,7 +2196,7 @@ setting_cmd (const char *fnname, struct cmd_list_element *showlist, && type0->code () != TYPE_CODE_STRING) error (_("First argument of %s must be a string."), fnname); - const char *a0 = (const char *) value_contents (argv[0]).data (); + const char *a0 = (const char *) argv[0]->contents ().data (); cmd_list_element *cmd = lookup_cmd (&a0, showlist, "", NULL, -1, 0); if (cmd == nullptr || cmd->type != show_cmd) diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c index 1e00517..769f6a5 100644 --- a/gdb/cli/cli-dump.c +++ b/gdb/cli/cli-dump.c @@ -224,7 +224,7 @@ dump_value_to_file (const char *cmd, const char *mode, const char *file_format) /* Have everything. Open/write the data. */ if (file_format == NULL || strcmp (file_format, "binary") == 0) - dump_binary_file (filename.get (), mode, value_contents (val).data (), + dump_binary_file (filename.get (), mode, val->contents ().data (), val->type ()->length ()); else { @@ -241,7 +241,7 @@ dump_value_to_file (const char *cmd, const char *mode, const char *file_format) } dump_bfd_file (filename.get (), mode, file_format, vaddr, - value_contents (val).data (), + val->contents ().data (), val->type ()->length ()); } } |