From 03ce4e1bdb8f46742b7bcf648ad4ebd90dbee935 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 14 Dec 2023 11:54:13 +0000 Subject: gdb/options: fix copy&paste error in string_option_def Spotted what appears to be a copy&paste error in string_option_def, the code for string handling writes the address fetching callback function into the option_def::var_address::enumeration location, rather than option_def::var_address::string. Of course, this works just fine as option_def::var_address is a union, and all of its members are function pointers, so they're going to be the same size on every target GDB cares about. But it doesn't hurt to be correct, so fixed in this commit. There should be no user visible changes after this commit. --- gdb/cli/cli-option.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb') diff --git a/gdb/cli/cli-option.h b/gdb/cli/cli-option.h index 4c62227..2645c58 100644 --- a/gdb/cli/cli-option.h +++ b/gdb/cli/cli-option.h @@ -304,7 +304,7 @@ struct string_option_def : option_def show_cmd_cb_, set_doc_, show_doc_, help_doc_) { - var_address.enumeration = detail::get_var_address; + var_address.string = detail::get_var_address; } }; -- cgit v1.1