From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2d.google.com (mail-io1-xd2d.google.com [IPv6:2607:f8b0:4864:20::d2d]) by sourceware.org (Postfix) with ESMTPS id 619473857BBF for ; Fri, 15 Jul 2022 15:41:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 619473857BBF Received: by mail-io1-xd2d.google.com with SMTP id q14so4128707iod.3 for ; Fri, 15 Jul 2022 08:41:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EIspGa3rJ1+5Z6TAzJiFPrKR1EV1cv22SiXEMfetqpg=; b=MTEFmehV6HoLihpNP/rpyC+McmlBSP7LnW9KlikvWwFxD0yYqQdtmZY2y4DXvhxBd2 VwH0JwPtVFIgIS4g0qz857cbLykP6OUl9YNaG2DEqdMN504KKKcuVzuUdspeWhFXrDY7 kOqbf8UlEyQdH8f7k0vBLemhQoJDxlckzggZo3DrfpBlfjRNZtjI3AGLPWzmbL3rvDnH bU/goBlu63QFKlpO1bFRqNhF/l+aOfcEqHurZGv55IIpWsBoWYKtJ/fS25q+e94Ahdim IvTzNxeZtoM1b5uqkhp6Py0rePk3YBZ7n79uTWnX8v8cTl8/XcnreVLMOO1+HkL/YEm5 Kxuw== X-Gm-Message-State: AJIora/XRf2xd1EVG5+ZHqGcg6wlJobGzf3Ww9Kl5mU71EUmnJZmZO7f SGkhhsA5rJz9XCslO8r4JXWvPOXUjxzdDQ== X-Google-Smtp-Source: AGRyM1tkmjeW5ys1yf6Htm2/GDSKyL1rb1WdAh53DM5eq8kVXHhsOpLiZZ3dDmyd63kkkaNmG2ARUQ== X-Received: by 2002:a05:6638:372c:b0:341:4ed2:b807 with SMTP id k44-20020a056638372c00b003414ed2b807mr1506717jav.84.1657899707747; Fri, 15 Jul 2022 08:41:47 -0700 (PDT) Received: from murgatroyd.Home (71-211-185-228.hlrn.qwest.net. [71.211.185.228]) by smtp.gmail.com with ESMTPSA id w28-20020a05660205dc00b0067bec206fcbsm223665iox.16.2022.07.15.08.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jul 2022 08:41:47 -0700 (PDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [pushed] Add 'nibbles' to gdb.print_options Date: Fri, 15 Jul 2022 09:41:45 -0600 Message-Id: <20220715154145.1607684-1-tromey@adacore.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2022 15:41:50 -0000 When I rebased and updated the print_options patch, I forgot to update print_options to add the new 'nibbles' feature to the result. This patch fixes the oversight. I'm checking this in. --- gdb/python/py-prettyprint.c | 2 ++ gdb/testsuite/gdb.python/py-format-string.exp | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c index 7b2aa588bb0..1f8dd26b1bc 100644 --- a/gdb/python/py-prettyprint.c +++ b/gdb/python/py-prettyprint.c @@ -753,6 +753,8 @@ gdbpy_print_options (PyObject *unused1, PyObject *unused2) opts.static_field_print) < 0 || set_boolean (result.get (), "deref_refs", opts.deref_ref) < 0 + || set_boolean (result.get (), "nibbles", + opts.nibblesprint) < 0 || set_boolean (result.get (), "summary", opts.summary) < 0 || set_unsigned (result.get (), "max_elements", diff --git a/gdb/testsuite/gdb.python/py-format-string.exp b/gdb/testsuite/gdb.python/py-format-string.exp index c432de97276..45b08512c0c 100644 --- a/gdb/testsuite/gdb.python/py-format-string.exp +++ b/gdb/testsuite/gdb.python/py-format-string.exp @@ -1122,11 +1122,13 @@ proc test_print_options {} { gdb_test "python print('format' in gdb.print_options())" "False" \ "examine format" - check_format_string "a_point_t" "format='t'" \ - "Pretty Point \\(101010, 1100\\)" \ + check_format_string "a_point_t" "format='t', nibbles=True" \ + "Pretty Point \\(0010.1010, 1100\\)" \ "print in binary to fetch options" gdb_test "python print(saved_options\['format'\] == 't')" "True" \ "format was set" + gdb_test "python print(saved_options\['nibbles'\])" "True" \ + "nibbles was set" check_format_string "a_point_t" "summary=True" \ "No Data" \ -- 2.34.1