From patchwork Tue Jan 10 05:06:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 62879 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 32D29385B507 for ; Tue, 10 Jan 2023 05:07:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 32D29385B507 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673327236; bh=TqFQmCfd8a65m1D7S0jLoIjyswV/POcE5moc0Mrfu5U=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=y6UwjhHjut6EDBWrQOoNZ2QacKm4xWQhwMxB2WavFu5Us5sDjwwLc6PcpoHULQjem 7Lxys9+fCz6E0P5f5a/uKdbpYiBHQIwS+YAResC0Giyhz2WotSWsf7mDLzm/GSyW4v Z0AtCCMNygm5eb6L0YJFUL0FM9NbhmaEc9g1w44s= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 5190B3858CDB for ; Tue, 10 Jan 2023 05:06:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5190B3858CDB Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 30A56juZ023048 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Jan 2023 00:06:50 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 30A56juZ023048 Received: from simark.localdomain (unknown [217.28.27.60]) (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 ESMTPSA id 9AC481E124; Tue, 10 Jan 2023 00:06:45 -0500 (EST) To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 1/3] gdb/doc: some whitespace fixes Date: Tue, 10 Jan 2023 00:06:41 -0500 Message-Id: <20230110050643.1767083-2-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230110050643.1767083-1-simon.marchi@polymtl.ca> References: <20230110050643.1767083-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 10 Jan 2023 05:06:45 +0000 X-Spam-Status: No, score=-3189.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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-Patchwork-Original-From: Simon Marchi via Gdb-patches From: Simon Marchi Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" For consistency, replace tabs with spaces in all gdb.texinfo menus. Change-Id: I0801a72cf82a8afe49ec842244f42d30719634ce --- gdb/doc/gdb.texinfo | 44 ++++++++++++++++++++++---------------------- gdb/doc/python.texi | 4 ++-- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 2f5b4bb4c61a..8a83a2ef8dd4 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -154,7 +154,7 @@ software in general. We will miss him. * Configurations:: Configuration-specific information * Controlling GDB:: Controlling @value{GDBN} * Extending GDB:: Extending @value{GDBN} -* Interpreters:: Command Interpreters +* Interpreters:: Command Interpreters * TUI:: @value{GDBN} Text User Interface * Emacs:: Using @value{GDBN} under @sc{gnu} Emacs * GDB/MI:: @value{GDBN}'s Machine Interface. @@ -182,16 +182,16 @@ software in general. We will miss him. @value{GDBN} * Operating System Information:: Getting additional information from the operating system -* Trace File Format:: GDB trace file format +* Trace File Format:: GDB trace file format * Index Section Format:: .gdb_index section format * Debuginfod:: Download debugging resources with @code{debuginfod} -* Man Pages:: Manual pages -* Copying:: GNU General Public License says +* Man Pages:: Manual pages +* Copying:: GNU General Public License says how you can copy and share GDB * GNU Free Documentation License:: The license for this documentation * Concept Index:: Index of @value{GDBN} concepts * Command and Variable Index:: Index of @value{GDBN} commands, variables, - functions, and Python data types + functions, and Python data types @end menu @end ifnottex @@ -6981,11 +6981,11 @@ or while being stepped), all other threads in the program are also stopped by you examine the stopped thread in the debugger. @menu -* All-Stop Mode:: All threads stop when GDB takes control -* Non-Stop Mode:: Other threads continue to execute -* Background Execution:: Running your program asynchronously -* Thread-Specific Breakpoints:: Controlling breakpoints -* Interrupted System Calls:: GDB may interfere with system calls +* All-Stop Mode:: All threads stop when GDB takes control +* Non-Stop Mode:: Other threads continue to execute +* Background Execution:: Running your program asynchronously +* Thread-Specific Breakpoints:: Controlling breakpoints +* Interrupted System Calls:: GDB may interfere with system calls * Observer Mode:: GDB does not alter program behavior @end menu @@ -9086,7 +9086,7 @@ prefer to use Emacs facilities to view source; see @ref{Emacs, ,Using * Search:: Searching source files * Source Path:: Specifying source directories * Machine Code:: Source and machine code -* Disable Reading Source:: Disable Reading Source Code +* Disable Reading Source:: Disable Reading Source Code @end menu @node List @@ -22855,7 +22855,7 @@ configuration of @value{GDBN}; use @code{help target} to list them. @menu * Connecting:: Connecting to a remote target * File Transfer:: Sending files to a remote system -* Server:: Using the gdbserver program +* Server:: Using the gdbserver program * Remote Configuration:: Remote configuration * Remote Stub:: Implementing a remote stub @end menu @@ -24431,13 +24431,13 @@ This section describes details specific to particular native configurations. @menu -* BSD libkvm Interface:: Debugging BSD kernel memory images +* BSD libkvm Interface:: Debugging BSD kernel memory images * Process Information:: Process information * DJGPP Native:: Features specific to the DJGPP port -* Cygwin Native:: Features specific to the Cygwin port +* Cygwin Native:: Features specific to the Cygwin port * Hurd Native:: Features specific to @sc{gnu} Hurd -* Darwin:: Features specific to Darwin -* FreeBSD:: Features specific to FreeBSD +* Darwin:: Features specific to Darwin +* FreeBSD:: Features specific to FreeBSD @end menu @node BSD libkvm Interface @@ -25379,7 +25379,7 @@ acceptable commands. * ARM:: ARM * BPF:: eBPF * M68K:: Motorola M68K -* MicroBlaze:: Xilinx MicroBlaze +* MicroBlaze:: Xilinx MicroBlaze * MIPS Embedded:: MIPS Embedded * OpenRISC 1000:: OpenRISC 1000 (or1k) * PowerPC Embedded:: PowerPC Embedded @@ -28713,7 +28713,7 @@ This creates alias @samp{spe} of the command @samp{set print elements}. @end smallexample @menu -* Command aliases default args:: Default arguments for aliases +* Command aliases default args:: Default arguments for aliases @end menu @node Command aliases default args @@ -28842,9 +28842,9 @@ Note that loading of this script file also requires accordingly configured @code{auto-load safe-path} (@pxref{Auto-loading safe path}). @menu -* objfile-gdbdotext file:: The @file{@var{objfile}-gdb.@var{ext}} file -* dotdebug_gdb_scripts section:: The @code{.debug_gdb_scripts} section -* Which flavor to choose?:: Choosing between these approaches +* objfile-gdbdotext file:: The @file{@var{objfile}-gdb.@var{ext}} file +* dotdebug_gdb_scripts section:: The @code{.debug_gdb_scripts} section +* Which flavor to choose?:: Choosing between these approaches @end menu @node objfile-gdbdotext file @@ -48272,7 +48272,7 @@ with @code{elfutils}, starting with version 0.178. See regarding @code{debuginfod}. @menu -* Debuginfod Settings:: Configuring debuginfod with @value{GDBN} +* Debuginfod Settings:: Configuring debuginfod with @value{GDBN} @end menu @node Debuginfod Settings diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index ad929ee14930..7208af3ee7d7 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -196,7 +196,7 @@ optional arguments while skipping others. Example: * Pretty Printing API:: Pretty-printing values. * Selecting Pretty-Printers:: How GDB chooses a pretty-printer. * Writing a Pretty-Printer:: Writing a Pretty-Printer. -* Type Printing API:: Pretty-printing types. +* Type Printing API:: Pretty-printing types. * Frame Filter API:: Filtering Frames. * Frame Decorator API:: Decorating Frames. * Writing a Frame Filter:: Writing a Frame Filter. @@ -225,7 +225,7 @@ optional arguments while skipping others. Example: * Lazy Strings In Python:: Python representation of lazy strings. * Architectures In Python:: Python representation of architectures. * Registers In Python:: Python representation of registers. -* Connections In Python:: Python representation of connections. +* Connections In Python:: Python representation of connections. * TUI Windows In Python:: Implementing new TUI windows. * Disassembly In Python:: Instruction Disassembly In Python @end menu From patchwork Tue Jan 10 05:06:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 62878 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2DFD9385B51D for ; Tue, 10 Jan 2023 05:07:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DFD9385B51D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673327235; bh=XL/TcXqfMYa1pDu8Uq6gi8Tii+hJNcq8Kl/Z21uBkjg=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=FiCyM5k4LH+2p6NAuRTaTq9qQILO0VFUtnu/YCBmwnnUPrdDw3EVbjkv9e6z2IocS l7mF2MgHHOIDjLcKIab5qwzeYm2L3DdNTkTGdq2luIcFPZ3QMs9a+8RDNnDrDET3CS /NBSx3oZ5oon1l3fHT56NN2ZSSfF2hUyJFnffleg= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 8F46C3858C52 for ; Tue, 10 Jan 2023 05:06:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F46C3858C52 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 30A56j8c023051 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Jan 2023 00:06:50 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 30A56j8c023051 Received: from simark.localdomain (unknown [217.28.27.60]) (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 ESMTPSA id B44091E128; Tue, 10 Jan 2023 00:06:45 -0500 (EST) To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 2/3] gdb/doc: use @value{GDBN} in some spots Date: Tue, 10 Jan 2023 00:06:42 -0500 Message-Id: <20230110050643.1767083-3-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230110050643.1767083-1-simon.marchi@polymtl.ca> References: <20230110050643.1767083-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 10 Jan 2023 05:06:45 +0000 X-Spam-Status: No, score=-3189.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, 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-Patchwork-Original-From: Simon Marchi via Gdb-patches From: Simon Marchi Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Change some spots to use "@value{GDBN}" instead of just "GDB". Change-Id: I3fc26438e603538271cf33e4d148be5fda9ece7e --- gdb/doc/gdb.texinfo | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 8a83a2ef8dd4..5dba6f78d195 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -174,20 +174,20 @@ software in general. We will miss him. @end ifclear * In Memoriam:: In Memoriam * Formatting Documentation:: How to format and print @value{GDBN} documentation -* Installing GDB:: Installing GDB +* Installing GDB:: Installing @value{GDBN} * Maintenance Commands:: Maintenance Commands * Remote Protocol:: GDB Remote Serial Protocol -* Agent Expressions:: The GDB Agent Expression Mechanism +* Agent Expressions:: The @value{GDBN} Agent Expression Mechanism * Target Descriptions:: How targets can describe themselves to @value{GDBN} * Operating System Information:: Getting additional information from the operating system -* Trace File Format:: GDB trace file format +* Trace File Format:: @value{GDBN} trace file format * Index Section Format:: .gdb_index section format * Debuginfod:: Download debugging resources with @code{debuginfod} * Man Pages:: Manual pages * Copying:: GNU General Public License says - how you can copy and share GDB + how you can copy and share @value{GDBN} * GNU Free Documentation License:: The license for this documentation * Concept Index:: Index of @value{GDBN} concepts * Command and Variable Index:: Index of @value{GDBN} commands, variables, From patchwork Tue Jan 10 05:06:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Marchi X-Patchwork-Id: 62880 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2F37D3858C52 for ; Tue, 10 Jan 2023 05:07:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2F37D3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673327267; bh=H9fIVL4yu7Sb+idLyCL69LKuPjXZhZpguxoKmZQ5HmE=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ruF+87ZZeOSHHH8PfE7O5ufgVKFszIy/RRO88Un+ISQREHyP8sb2yqWn39bn4Hps3 r20iWRonzevDrDNGozJ2JxX8X7mgbUthHH0DNpf2ttQd9stxVf1L/E8KBETFrGxMXJ u8be24XyceRWBcmRkZCVpGk3mWYuxhzn/7dJIp9g= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id B40413858C78 for ; Tue, 10 Jan 2023 05:06:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B40413858C78 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 30A56k5J023054 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 10 Jan 2023 00:06:50 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 30A56k5J023054 Received: from simark.localdomain (unknown [217.28.27.60]) (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 ESMTPSA id E3A511E15D; Tue, 10 Jan 2023 00:06:45 -0500 (EST) To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH 3/3] gdb/doc: use @value{GDBP} in some spots Date: Tue, 10 Jan 2023 00:06:43 -0500 Message-Id: <20230110050643.1767083-4-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230110050643.1767083-1-simon.marchi@polymtl.ca> References: <20230110050643.1767083-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 10 Jan 2023 05:06:46 +0000 X-Spam-Status: No, score=-3189.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, WEIRD_PORT 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-Patchwork-Original-From: Simon Marchi via Gdb-patches From: Simon Marchi Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Examples are supposed to use @value{GDBP} instead of the literal "(gdb)" (many of them already do). Update a bunch of spots where it wasn't the case. Change-Id: I601adaad61fd277a5fceea1759e49cede72e456d --- gdb/doc/gdb.texinfo | 234 ++++++++++++++++++++++---------------------- 1 file changed, 117 insertions(+), 117 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 5dba6f78d195..9c0018ea5c14 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -1661,7 +1661,7 @@ the @var{command} from the @var{shell_command}. Example: @smallexample @group -(gdb) p var +(@value{GDBP}) p var $1 = @{ black = 144, red = 233, @@ -1671,13 +1671,13 @@ $1 = @{ @} @end group @group -(gdb) pipe p var|wc +(@value{GDBP}) pipe p var|wc 7 19 80 -(gdb) |p var|wc -l +(@value{GDBP}) |p var|wc -l 7 @end group @group -(gdb) p /x var +(@value{GDBP}) p /x var $4 = @{ black = 0x90, red = 0xe9, @@ -1685,15 +1685,15 @@ $4 = @{ blue = 0x262, white = 0x3db @} -(gdb) ||grep red +(@value{GDBP}) ||grep red red => 0xe9, @end group @group -(gdb) | -d ! echo this contains a | char\n ! sed -e 's/|/PIPE/' +(@value{GDBP}) | -d ! echo this contains a | char\n ! sed -e 's/|/PIPE/' this contains a PIPE char -(gdb) | -d xxx echo this contains a | char!\n xxx sed -e 's/|/PIPE/' +(@value{GDBP}) | -d xxx echo this contains a | char!\n xxx sed -e 's/|/PIPE/' this contains a PIPE char! -(gdb) +(@value{GDBP}) @end group @end smallexample @end table @@ -1822,8 +1822,8 @@ The settings can also be changed interactively during the debugging session. For example, to change the limit of array elements to print, you can do the following: @smallexample -(@value{GDBN}) set print elements 10 -(@value{GDBN}) print some_array +(@value{GDBP}) set print elements 10 +(@value{GDBP}) print some_array $1 = @{0, 10, 20, 30, 40, 50, 60, 70, 80, 90...@} @end smallexample @@ -1839,7 +1839,7 @@ allow overriding relevant global print settings as set by @code{set print} subcommands. @xref{print options}. The example above could be rewritten as: @smallexample -(@value{GDBN}) print -elements 10 -- some_array +(@value{GDBP}) print -elements 10 -- some_array $1 = @{0, 10, 20, 30, 40, 50, 60, 70, 80, 90...@} @end smallexample @@ -1869,14 +1869,14 @@ free-form arguments, such as expressions or filenames. For example, the command @smallexample -(@value{GDBN}) with print array on -- print some_array +(@value{GDBP}) with print array on -- print some_array @end smallexample @noindent is equivalent to the following 3 commands: @smallexample -(@value{GDBN}) set print array on -(@value{GDBN}) print some_array -(@value{GDBN}) set print array off +(@value{GDBP}) set print array on +(@value{GDBP}) print some_array +(@value{GDBP}) set print array off @end smallexample The @code{with} command is particularly useful when you want to @@ -1884,7 +1884,7 @@ override a setting while running user-defined commands, or commands defined in Python or Guile. @xref{Extending GDB,, Extending GDB}. @smallexample -(@value{GDBN}) with print pretty on -- my_complex_command +(@value{GDBP}) with print pretty on -- my_complex_command @end smallexample To change several settings for the same command, you can nest @@ -3864,9 +3864,9 @@ this command also allows you to identify a thread by its target is the LWP id. @smallexample -(@value{GDBN}) thread find 26688 +(@value{GDBP}) thread find 26688 Thread 4 has target id 'Thread 0x41e02940 (LWP 26688)' -(@value{GDBN}) info thread 4 +(@value{GDBP}) info thread 4 Id Target Id Frame 4 Thread 0x41e02940 (LWP 26688) 0x00000031ca6cd372 in select () @end smallexample @@ -4098,7 +4098,7 @@ For example: @smallexample (@value{GDBP}) info inferiors -(gdb) info inferior +(@value{GDBP}) info inferior Id Description Executable * 1 prog1 (@value{GDBP}) run @@ -5980,16 +5980,16 @@ that is a standard I/O stream assigned to the variable @code{mylog}, you could do the following: @example -(gdb) set dprintf-style call -(gdb) set dprintf-function fprintf -(gdb) set dprintf-channel mylog -(gdb) dprintf 25,"at line 25, glob=%d\n",glob +(@value{GDBP}) set dprintf-style call +(@value{GDBP}) set dprintf-function fprintf +(@value{GDBP}) set dprintf-channel mylog +(@value{GDBP}) dprintf 25,"at line 25, glob=%d\n",glob Dprintf 1 at 0x123456: file main.c, line 25. -(gdb) info break +(@value{GDBP}) info break 1 dprintf keep y 0x00123456 in main at main.c:25 call (void) fprintf (mylog,"at line 25, glob=%d\n",glob) continue -(gdb) +(@value{GDBP}) @end example Note that the @code{info break} displays the dynamic printf commands @@ -6592,7 +6592,7 @@ Functions in files matching @var{file-glob-pattern} will be skipped over when stepping. @smallexample -(gdb) skip -gfi utils/*.c +(@value{GDBP}) skip -gfi utils/*.c @end smallexample @item -function @var{linespec} @@ -6614,14 +6614,14 @@ the template arguments are. Specifying the function to be skipped as a regular expression makes this easier. @smallexample -(gdb) skip -rfu ^std::(allocator|basic_string)<.*>::~?\1 *\( +(@value{GDBP}) skip -rfu ^std::(allocator|basic_string)<.*>::~?\1 *\( @end smallexample If you want to skip every templated C@t{++} constructor and destructor in the @code{std} namespace you can do: @smallexample -(gdb) skip -rfu ^std::([a-zA-z0-9_]+)<.*>::~?\1 *\( +(@value{GDBP}) skip -rfu ^std::([a-zA-z0-9_]+)<.*>::~?\1 *\( @end smallexample @end table @@ -6646,7 +6646,7 @@ After running this command, any function whose source lives in @var{filename} will be skipped over when stepping. @smallexample -(gdb) skip file boring.c +(@value{GDBP}) skip file boring.c File boring.c will be skipped when stepping. @end smallexample @@ -7892,13 +7892,13 @@ often suffices to specify an older processor that @value{GDBN} supports. @smallexample -(gdb) info record +(@value{GDBP}) info record Active record target: record-btrace Recording format: Intel Processor Trace. Buffer size: 16kB. Failed to configure the Intel Processor Trace decoder: unknown cpu. -(gdb) set record btrace cpu intel:6/158 -(gdb) info record +(@value{GDBP}) set record btrace cpu intel:6/158 +(@value{GDBP}) info record Active record target: record-btrace Recording format: Intel Processor Trace. Buffer size: 16kB. @@ -8557,7 +8557,7 @@ Select the frame with stack address @var{stack-address}. The @command{info frame}, for example: @smallexample -(gdb) info frame +(@value{GDBP}) info frame Stack level 1, frame at 0x7fffffffda30: rip = 0x40066d in b (amd64-entry-value.cc:59); saved rip 0x4004c5 tail call frame, caller of frame at 0x7fffffffda30 @@ -8857,18 +8857,18 @@ variable @code{j} can only be successfully printed in the outermost @smallexample @group -(gdb) frame apply all p j +(@value{GDBP}) frame apply all p j #0 some_function (i=5) at fun.c:4 No symbol "j" in current context. -(gdb) frame apply all -c p j +(@value{GDBP}) frame apply all -c p j #0 some_function (i=5) at fun.c:4 No symbol "j" in current context. #1 0x565555fb in main (argc=1, argv=0xffffd2c4) at fun.c:11 $1 = 5 -(gdb) frame apply all -s p j +(@value{GDBP}) frame apply all -s p j #1 0x565555fb in main (argc=1, argv=0xffffd2c4) at fun.c:11 $2 = 5 -(gdb) +(@value{GDBP}) @end group @end smallexample @@ -8877,22 +8877,22 @@ information before the command output: @smallexample @group -(gdb) frame apply all p $sp +(@value{GDBP}) frame apply all p $sp #0 some_function (i=5) at fun.c:4 $4 = (void *) 0xffffd1e0 #1 0x565555fb in main (argc=1, argv=0xffffd2c4) at fun.c:11 $5 = (void *) 0xffffd1f0 -(gdb) +(@value{GDBP}) @end group @end smallexample If the flag @code{-q} is given, no frame information is printed: @smallexample @group -(gdb) frame apply all -q p $sp +(@value{GDBP}) frame apply all -q p $sp $12 = (void *) 0xffffd1e0 $13 = (void *) 0xffffd1f0 -(gdb) +(@value{GDBP}) @end group @end smallexample @@ -8964,7 +8964,7 @@ filter and is used when @code{all} is not the option for Example: @smallexample -(gdb) info frame-filter +(@value{GDBP}) info frame-filter global frame-filters: Priority Enabled Name @@ -8979,8 +8979,8 @@ objfile /build/test frame-filters: Priority Enabled Name 999 Yes BuildProgramFilter -(gdb) disable frame-filter /build/test BuildProgramFilter -(gdb) info frame-filter +(@value{GDBP}) disable frame-filter /build/test BuildProgramFilter +(@value{GDBP}) info frame-filter global frame-filters: Priority Enabled Name @@ -8995,8 +8995,8 @@ objfile /build/test frame-filters: Priority Enabled Name 999 No BuildProgramFilter -(gdb) enable frame-filter global PrimaryFunctionFilter -(gdb) info frame-filter +(@value{GDBP}) enable frame-filter global PrimaryFunctionFilter +(@value{GDBP}) info frame-filter global frame-filters: Priority Enabled Name @@ -9031,7 +9031,7 @@ dictionary resides. Example: @smallexample -(gdb) info frame-filter +(@value{GDBP}) info frame-filter global frame-filters: Priority Enabled Name @@ -9046,8 +9046,8 @@ objfile /build/test frame-filters: Priority Enabled Name 999 No BuildProgramFilter -(gdb) set frame-filter priority global Reverse 50 -(gdb) info frame-filter +(@value{GDBP}) set frame-filter priority global Reverse 50 +(@value{GDBP}) info frame-filter global frame-filters: Priority Enabled Name @@ -10156,7 +10156,7 @@ End of assembler dump. Here is another example showing raw instructions in hex for AMD x86-64, @smallexample -(gdb) disas /r 0x400281,+10 +(@value{GDBP}) disas /r 0x400281,+10 Dump of assembler code from 0x400281 to 0x40028b: 0x0000000000400281: 38 36 cmp %dh,(%rsi) 0x0000000000400283: 2d 36 34 2e 73 sub $0x732e3436,%eax @@ -10467,7 +10467,7 @@ then, the value of the variable @code{cs} can be explored using the @code{explore} command as follows. @smallexample -(gdb) explore cs +(@value{GDBP}) explore cs The value of `cs' is a struct/class of type `struct ComplexStruct' with the following fields: @@ -10530,7 +10530,7 @@ same example as above, your can explore the type @code{struct ComplexStruct} to the @code{explore} command. @smallexample -(gdb) explore struct ComplexStruct +(@value{GDBP}) explore struct ComplexStruct @end smallexample @noindent @@ -10938,11 +10938,11 @@ to @ref{set print entry-values}. @smallexample Breakpoint 1, d (i=30) at gdb.base/entry-value.c:29 29 i++; -(gdb) next +(@value{GDBP}) next 30 e (i); -(gdb) print i +(@value{GDBP}) print i $1 = 31 -(gdb) print i@@entry +(@value{GDBP}) print i@@entry $2 = 30 @end smallexample @@ -10960,9 +10960,9 @@ signed char var1[] = "A"; You get during debugging @smallexample -(gdb) print var0 +(@value{GDBP}) print var0 $1 = "A" -(gdb) print var1 +(@value{GDBP}) print var1 $2 = @{65 'A', 0 '\0'@} @end smallexample @@ -12013,12 +12013,12 @@ either increase the print max-depth, or they can print the elements of the structure that are visible, for example @smallexample -(gdb) set print max-depth 2 -(gdb) p var +(@value{GDBP}) set print max-depth 2 +(@value{GDBP}) p var $1 = @{d = @{c = @{...@}@}@} -(gdb) p var.d +(@value{GDBP}) p var.d $2 = @{c = @{b = @{...@}@}@} -(gdb) p var.d.c +(@value{GDBP}) p var.d.c $3 = @{b = @{a = 3@}@} @end smallexample @@ -12973,7 +12973,7 @@ The default is 1. Example: @smallexample -(gdb) backtrace +(@value{GDBP}) backtrace #0 bottom_func () at testsuite/gdb.python/py-caller-is.c:21 #1 0x00000000004005a0 in middle_func () @@ -12982,9 +12982,9 @@ Example: at testsuite/gdb.python/py-caller-is.c:33 #3 0x00000000004005b6 in main () at testsuite/gdb.python/py-caller-is.c:39 -(gdb) print $_caller_is ("middle_func") +(@value{GDBP}) print $_caller_is ("middle_func") $1 = 1 -(gdb) print $_caller_is ("top_func", 2) +(@value{GDBP}) print $_caller_is ("top_func", 2) $1 = 1 @end smallexample @@ -13034,7 +13034,7 @@ enumeration value. For example, assuming the variable @var{node} is of an enumerated type: @smallexample -(gdb) printf "Visiting node of type %s\n", $_as_string(node) +(@value{GDBP}) printf "Visiting node of type %s\n", $_as_string(node) Visiting node of type NODE_INTEGER @end smallexample @@ -14104,26 +14104,26 @@ hello () you get during debugging: @smallexample -(gdb) find &hello[0], +sizeof(hello), "hello" +(@value{GDBP}) find &hello[0], +sizeof(hello), "hello" 0x804956d 1 pattern found -(gdb) find &hello[0], +sizeof(hello), 'h', 'e', 'l', 'l', 'o' +(@value{GDBP}) find &hello[0], +sizeof(hello), 'h', 'e', 'l', 'l', 'o' 0x8049567 0x804956d 2 patterns found. -(gdb) find &hello[0], +sizeof(hello), @{char[5]@}"hello" +(@value{GDBP}) find &hello[0], +sizeof(hello), @{char[5]@}"hello" 0x8049567 0x804956d 2 patterns found. -(gdb) find /b1 &hello[0], +sizeof(hello), 'h', 0x65, 'l' +(@value{GDBP}) find /b1 &hello[0], +sizeof(hello), 'h', 0x65, 'l' 0x8049567 1 pattern found -(gdb) find &mixed, +sizeof(mixed), (char) 'c', (short) 0x1234, (int) 0x87654321 +(@value{GDBP}) find &mixed, +sizeof(mixed), (char) 'c', (short) 0x1234, (int) 0x87654321 0x8049560 1 pattern found -(gdb) print $numfound +(@value{GDBP}) print $numfound $1 = 1 -(gdb) print $_ +(@value{GDBP}) print $_ $2 = (void *) 0x8049560 @end smallexample @@ -14288,9 +14288,9 @@ this information. kind by text @code{tail call frame} such as in this sample @value{GDBN} output: @smallexample -(gdb) x/i $pc - 2 +(@value{GDBP}) x/i $pc - 2 0x40066b : jmp 0x400640 -(gdb) info frame +(@value{GDBP}) info frame Stack level 1, frame at 0x7fffffffda30: rip = 0x40066d in b (amd64-entry-value.cc:59); saved rip 0x4004c5 tail call frame, caller of frame at 0x7fffffffda30 @@ -14337,7 +14337,7 @@ Breakpoint 1, DW_OP_entry_value resolving cannot find DW_TAG_call_site 0x40039a in main a () at t.c:3 3 static void __attribute__((noinline, noclone)) a (void) @{ x++; @} -(gdb) bt +(@value{GDBP}) bt #0 a () at t.c:3 #1 0x000000000040039a in main () at t.c:5 @end smallexample @@ -14358,7 +14358,7 @@ int main (void) @{ a (); return 0; @} tailcall: initial: 0x4004d2(a) 0x4004ce(b) 0x4004b2(c) 0x4004a2(d) tailcall: compare: 0x4004d2(a) 0x4004cc(b) 0x400492(e) tailcall: reduced: 0x4004d2(a) | -(gdb) bt +(@value{GDBP}) bt #0 f () at t.c:2 #1 0x00000000004004d2 in a () at t.c:8 #2 0x0000000000400395 in main () at t.c:9 @@ -14408,7 +14408,7 @@ static void __attribute__((noinline, noclone)) a (int i) @{ if (i) b (i - 1); else c (0); @} int main (void) @{ a (5); return 0; @} -(gdb) bt +(@value{GDBP}) bt #0 c (i=i@@entry=0) at t.c:2 #1 0x0000000000400428 in a (DW_OP_entry_value resolving has found function "a" at 0x400420 can call itself via tail calls @@ -17271,9 +17271,9 @@ You can set a breakpoint on such functions simply as if they had no tag. For example: @smallexample -(gdb) b function(int) +(@value{GDBP}) b function(int) Breakpoint 2 at 0x40060d: file main.cc, line 10. -(gdb) info breakpoints +(@value{GDBP}) info breakpoints Num Type Disp Enb Address What 1 breakpoint keep y 0x0040060d in function[abi:cxx11](int) at main.cc:10 @@ -17350,8 +17350,8 @@ func main () @{ When stopped inside @code{main} either of these work: @example -(gdb) p myglob -(gdb) p main.myglob +(@value{GDBP}) p myglob +(@value{GDBP}) p main.myglob @end example @cindex builtin Go types @@ -21141,11 +21141,11 @@ Therefore, if you cast a variable to a type defined in the need to resolve the type can be achieved. @smallexample -(gdb) compile code static struct a @{ int a; @} v = @{ 42 @}; argv = &v; -(gdb) compile code printf ("%d\n", ((struct a *) argv)->a); +(@value{GDBP}) compile code static struct a @{ int a; @} v = @{ 42 @}; argv = &v; +(@value{GDBP}) compile code printf ("%d\n", ((struct a *) argv)->a); gdb command line:1:36: error: dereferencing pointer to incomplete type ‘struct a’ Compilation failed. -(gdb) compile code struct a @{ int a; @}; printf ("%d\n", ((struct a *) argv)->a); +(@value{GDBP}) compile code struct a @{ int a; @}; printf ("%d\n", ((struct a *) argv)->a); 42 @end smallexample @@ -21431,14 +21431,14 @@ file to remove can be identified by its @var{filename} or by an @var{address} that lies within the boundaries of this symbol file in memory. Example: @smallexample -(gdb) add-symbol-file /home/user/gdb/mylib.so 0x7ffff7ff9480 +(@value{GDBP}) add-symbol-file /home/user/gdb/mylib.so 0x7ffff7ff9480 add symbol table from file "/home/user/gdb/mylib.so" at .text_addr = 0x7ffff7ff9480 (y or n) y Reading symbols from /home/user/gdb/mylib.so... -(gdb) remove-symbol-file -a 0x7ffff7ff9480 +(@value{GDBP}) remove-symbol-file -a 0x7ffff7ff9480 Remove symbol table from file "/home/user/gdb/mylib.so"? (y or n) y -(gdb) +(@value{GDBP}) @end smallexample @@ -23321,7 +23321,7 @@ The @code{stdio} connection is useful when starting @code{gdbserver} with ssh: @smallexample -(gdb) target remote | ssh -T hostname gdbserver - hello +(@value{GDBP}) target remote | ssh -T hostname gdbserver - hello @end smallexample The @samp{-T} option to ssh is provided because we don't need a remote pty, @@ -24555,7 +24555,7 @@ This example shows the open file descriptors for a process using a tty for standard input and output as well as two network sockets: @smallexample -(gdb) info proc files 22136 +(@value{GDBP}) info proc files 22136 process 22136 Open files: @@ -26380,7 +26380,7 @@ is displayed. For example: @smallexample -set extended-prompt Current working directory: \w (gdb) +set extended-prompt Current working directory: \w (@value{GDBP}) @end smallexample Note that when an extended-prompt is set, it takes control of the @@ -27102,7 +27102,7 @@ Show whether auto-loading of each specific @samp{auto-load} file(s) is enabled or disabled. @smallexample -(gdb) show auto-load +(@value{GDBP}) show auto-load gdb-scripts: Auto-loading of canned sequences of commands scripts is on. libthread-db: Auto-loading of inferior specific libthread_db is on. local-gdbinit: Auto-loading of .gdbinit script from current directory @@ -27121,7 +27121,7 @@ Print whether each specific @samp{auto-load} file(s) have been auto-loaded or not. @smallexample -(gdb) info auto-load +(@value{GDBP}) info auto-load gdb-scripts: Loaded Script Yes /home/user/gdb/gdb-gdb.gdb @@ -27402,8 +27402,8 @@ For example the list of directories from which it is safe to auto-load files may not be too obvious while setting it up. @smallexample -(gdb) set debug auto-load on -(gdb) file ~/src/t/true +(@value{GDBP}) set debug auto-load on +(@value{GDBP}) file ~/src/t/true auto-load: Loading canned sequences of commands script "/tmp/true-gdb.gdb" for objfile "/tmp/true". auto-load: Updating directories of "/usr:/opt". @@ -28140,30 +28140,30 @@ prefix command, the subcommands of the redefined command are kept Example: @example -(gdb) define-prefix abc -(gdb) define-prefix abc def -(gdb) define abc def +(@value{GDBP}) define-prefix abc +(@value{GDBP}) define-prefix abc def +(@value{GDBP}) define abc def Type commands for definition of "abc def". End with a line saying just "end". >echo command initial def\n >end -(gdb) define abc def ghi +(@value{GDBP}) define abc def ghi Type commands for definition of "abc def ghi". End with a line saying just "end". >echo command ghi\n >end -(gdb) define abc def +(@value{GDBP}) define abc def Keeping subcommands of prefix command "def". Redefine command "def"? (y or n) y Type commands for definition of "abc def". End with a line saying just "end". >echo command def\n >end -(gdb) abc def ghi +(@value{GDBP}) abc def ghi command ghi -(gdb) abc def +(@value{GDBP}) abc def command def -(gdb) +(@value{GDBP}) @end example @kindex dont-repeat @@ -28671,7 +28671,7 @@ the @samp{disassemble} command and you wanted an even shorter version named @samp{di}. The following will accomplish this. @smallexample -(gdb) alias -a di = disas +(@value{GDBP}) alias -a di = disas @end smallexample Note that aliases are different from user-defined commands. With a @@ -28685,10 +28685,10 @@ This is to show that you can make an abbreviation of any part of a command. @smallexample -(gdb) alias -a set print elms = set print elements -(gdb) alias -a show print elms = show print elements -(gdb) set p elms 200 -(gdb) show p elms +(@value{GDBP}) alias -a set print elms = set print elements +(@value{GDBP}) alias -a show print elms = show print elements +(@value{GDBP}) set p elms 200 +(@value{GDBP}) show p elms Limit on string chars or array elements to print is 200. @end smallexample @@ -28700,7 +28700,7 @@ Unambiguously abbreviated commands are allowed in @var{command} and @var{alias}, just as they are normally. @smallexample -(gdb) alias -a set pr elms = set p ele +(@value{GDBP}) alias -a set pr elms = set p ele @end smallexample Finally, here is an example showing the creation of a one word @@ -28708,8 +28708,8 @@ alias for a more complex command. This creates alias @samp{spe} of the command @samp{set print elements}. @smallexample -(gdb) alias spe = set print elements -(gdb) spe 20 +(@value{GDBP}) alias spe = set print elements +(@value{GDBP}) spe 20 @end smallexample @menu @@ -40590,7 +40590,7 @@ always see the disassembly form. Here is an example of the resulting disassembly: @smallexample -(gdb) info addr argc +(@value{GDBP}) info addr argc Symbol "argc" is a complex DWARF expression: 1: DW_OP_fbreg 0 @end smallexample @@ -47072,7 +47072,7 @@ defining them with @samp{flags}: One can fetch individual fields like in @samp{C}. @smallexample -(gdb) print $my_struct_reg.field3 +(@value{GDBP}) print $my_struct_reg.field3 $1 = 42 @end smallexample @@ -47236,7 +47236,7 @@ Given that description, a value of 3 for the @samp{flags} register would be printed as: @smallexample -(gdb) info register flags +(@value{GDBP}) info register flags flags 0x3 [ X LEVEL=high ] @end smallexample @@ -48776,10 +48776,10 @@ descriptor. For example: @smallexample @ifset man @c @file would wrap it as F. -(gdb) target remote /dev/ttyb +(@value{GDBP}) target remote /dev/ttyb @end ifset @ifclear man -(gdb) target remote @file{/dev/ttyb} +(@value{GDBP}) target remote @file{/dev/ttyb} @end ifclear @end smallexample @@ -48787,7 +48787,7 @@ descriptor. For example: communicates with the server via serial line @file{/dev/ttyb}, and: @smallexample -(gdb) target remote the-target:2345 +(@value{GDBP}) target remote the-target:2345 @end smallexample @noindent @@ -48809,7 +48809,7 @@ the @value{GDBN} manual in node @code{Inferiors Connections and Programs} In such case use the @code{extended-remote} @value{GDBN} command variant: @smallexample -(gdb) target extended-remote the-target:2345 +(@value{GDBP}) target extended-remote the-target:2345 @end smallexample The @command{gdbserver} option @option{--multi} may or may not be used in such