From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id 9BCC23858D20; Thu, 14 Dec 2023 16:29:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BCC23858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702571355; bh=pXHadHoYohrTslK6lLT5eS7XhmBzbdiP0gVtrD5Qj6Q=; h=From:To:Subject:Date:From; b=STyBF4W6VUfTJYPWxfPlUJjE5B8CTPnPjES2ENs8woKOqPfFHEnTl+ulVC0RuYAEI eBqPVY0xcXDDzporPUYJEZXyIn8scDzqpcjz5R/hDxChXd1BatYngbBczEduxhibTN GqPWatd8zr+3FwfcowwQaOGSlpstptNl/jQOSvl8= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/options: fix copy&paste error in string_option_def X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: f5d420bbceeb1d5065c3d91dd7c6c1e43f855ca1 X-Git-Newrev: 03ce4e1bdb8f46742b7bcf648ad4ebd90dbee935 Message-Id: <20231214162915.9BCC23858D20@sourceware.org> Date: Thu, 14 Dec 2023 16:29:15 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D03ce4e1bdb8f= 46742b7bcf648ad4ebd90dbee935 commit 03ce4e1bdb8f46742b7bcf648ad4ebd90dbee935 Author: Andrew Burgess Date: Thu Dec 14 11:54:13 2023 +0000 gdb/options: fix copy&paste error in string_option_def =20 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. =20 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. =20 But it doesn't hurt to be correct, so fixed in this commit. =20 There should be no user visible changes after this commit. Diff: --- gdb/cli/cli-option.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/cli/cli-option.h b/gdb/cli/cli-option.h index 4c62227f31c..2645c58188c 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 =3D detail::get_var_address; + var_address.string =3D detail::get_var_address; } };