From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id PdrWBI23g2BDEwAAWB0awg (envelope-from ) for ; Sat, 24 Apr 2021 02:15:41 -0400 Received: by simark.ca (Postfix, from userid 112) id 04C601F104; Sat, 24 Apr 2021 02:15:41 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 926681E789 for ; Sat, 24 Apr 2021 02:15:39 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6E10A3957015; Sat, 24 Apr 2021 06:15:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E10A3957015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619244938; bh=Mzn7Hy3AljiSjt09YR+uFELmj/WEnT51zczQITxgv1A=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=JCeOxjqZrtu08FtzmeEPmLgKt5zaHHZahA5gTi1tVXLBx1x3XCrKeMc1PrcuygrkP SJB1xQkAGGF2m6VSNrrTfM6uehiFs6AmQ3PmFg21emb64zVDTGBBSSgjzB4KrF5e0r aAQ2U9dMlQXlTWq4Dt3vInwvykDoACw5cT/a7bBk= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 95EEA3957015 for ; Sat, 24 Apr 2021 06:15:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 95EEA3957015 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44258) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1laBZi-0001Up-Kq; Sat, 24 Apr 2021 02:15:32 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2534 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1laBZi-0004M7-4N; Sat, 24 Apr 2021 02:15:30 -0400 Date: Sat, 24 Apr 2021 09:15:26 +0300 Message-Id: <831rb0nr7l.fsf@gnu.org> To: Lancelot SIX In-Reply-To: <20210423222838.41119-3-lsix@lancelotsix.com> (message from Lancelot SIX via Gdb-patches on Fri, 23 Apr 2021 23:28:38 +0100) Subject: Re: [PATCH v3 2/2] [PR gdb/22640] ptype: add option to use hexadecimal notation References: <20210423222838.41119-1-lsix@lancelotsix.com> <20210423222838.41119-3-lsix@lancelotsix.com> 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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" > Date: Fri, 23 Apr 2021 23:28:38 +0100 > From: Lancelot SIX via Gdb-patches > Cc: Lancelot SIX > > gdb/ChangeLog: > > PR gdb/22640 > * typeprint.h (struct type_print_options): Add print_in_hex > flag. > (struct print_offset_data): Add print_in_hex flag, add a > constructor accepting a type_print_options* argument. > * typeprint.c (type_print_raw_options, default_ptype_flags): Set > default value for print_in_hex. > (print_offset_data::indentation): Allow more horizontal space. > (print_offset_data::print_offset_data): Add ctor. > (print_offset_data::maybe_print_hole, print_offset_data::update): > Handle the print_in_hex flag. > (whatis_exp): Handle 'x' and 'd' flags. > (print_offsets_and_sizes_in_hex): Declare. > (set_print_offsets_and_sizes_in_hex): Create. > (show_print_offsets_and_sizes_in_hex): Create. > (_initialize_typeprint): Update help message for the ptype > command, register the 'set print type hex' and 'show print type > hex' commands. > * c-typeprint.c (c_print_type, c_type_print_base_struct_union) > (c_type_print_base): Construct the print_offset_data > object using the type_print_optons parameter. > * rust-lang.c (rust_language::print_type): Construct the > print_offset_data object using the type_print_optons parameter. > * NEWS: Mention the new flags of the ptype command. > > gdb/doc/ChangeLog: > > PR gdb/22640 > * gdb.texinfo (Symbols): Describe the 'x' and 'd' flags of the > ptype command, describe 'set print type hex' and 'show print > type hex' commands. Update 'ptype/o' examples. > > gdb/testsuite/ChangeLog: > > PR gdb/22640 > * gdb.base/ptype-offsets.exp: Add tests to verify the behavior > of 'ptype/ox' and 'ptype/od'. Check that 'set print type hex' > changes the default behavior of 'ptype/o'. Update to take into > account new horizontal layout. > * gdb.rust/simple.exp: Update ptype test to check new horizontal > layout. > * gdb.rust/union.exp: Same. Thanks, the documentation parts are OK.