From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mRfTBEgtzWrFNjwAWB0awg (envelope-from ) for ; Mon, 12 Oct 2026 14:56:08 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=feSwhuh+; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 035B31E090; Mon, 12 Oct 2026 14:56:08 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7AADE1E04E for ; Mon, 12 Oct 2026 14:55:56 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 023404BA23E3 for ; Mon, 12 Oct 2026 18:55:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 023404BA23E3 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=feSwhuh+ Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 512D14BA23FC for ; Mon, 12 Oct 2026 18:54:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 512D14BA23FC Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 512D14BA23FC Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791831286; cv=none; b=S7FVLRntCFumc2xeUPF8+KI8xgZFtvWseUPek0INXR9lqS/kBo4I3lrANqcXL+Kk+AprDwFnKIxOhY7zaJYTqhi9e8Rzhnv7QB2XZkGn6OlinlfSkfFxDXiwVDnJbsdiO2wSAhx/Qh1O0HbiAs0fLydazVcEAvHskVZW6jqKi8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1791831286; c=relaxed/simple; bh=czv1IMzFHBh+hyCCmEAhufJhJdGGnwjYeCEURrHQOAA=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=RRQBYPnGU+dULrncjWrL79iuiW9LgwYBJ4cba6WnFVCypaBY5GkwWdumw8cob7V8BwxBbWpzpooIhS8HlnuIT01lgqj513MyZb8nqjEm92d8SvednH6gpd7FHiSkJchBe+7QOe0BCMm3sCzZYkS9iAWINlV1Q6K86VQbmm9W7WM= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=feSwhuh+ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 512D14BA23FC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1791831286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1T0ZTjTSDxNYtQmgrbkSsUEr+qqkKvPQR69eqEs8Dj4=; b=feSwhuh+wuNAyQ87ytwRF5PTorHRiTKwxcf6VpETTrUjW45KdEjExbp9t+7ISseqZr7C7u KnPUCV6XqhE8VZlLn0FyZD+eLjH5onINuGx0sgjkLAvOcE4MWZpRlrrwrfhYdvLLUUJtGp DWQadzeo0XdNVP3Asgf6TegHzH1n4nk= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-136-4IH5dAN0PCaNxk5kvKJevg-1; Mon, 12 Oct 2026 18:54:43 +0000 X-MC-Unique: 4IH5dAN0PCaNxk5kvKJevg-1 X-Mimecast-MFC-AGG-ID: 4IH5dAN0PCaNxk5kvKJevg_1791831282 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4a022fee32fso16702675e9.0 for ; Mon, 12 Oct 2026 11:54:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791831282; x=1792436082; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=1T0ZTjTSDxNYtQmgrbkSsUEr+qqkKvPQR69eqEs8Dj4=; b=eD0STyI4YOXM8jZHoYRYUKUtVNrLuwmxiLrPogbrXbk6HwevhK3jg4EOdvpvAKqhfa xXmA9sZGrHgsexogxxY96mw0jJVJFMDc0MZQKCkn44qV5/DU0FH84gq78MY/qbg7tzLq NQ2ilmNGKh1ScIAHkm+Oib2FZkMp9XytGuvnfTAYGA7cKvg54oTDJqcvkaZOCNp8qPzq S7dJd3ztRNrOCeX79UHhCiktt2wRjkvXrXFiiJJiqum96HbzLE9lzcpOo003CZ7dmlfg bbhGmCHZ7URX5Ghe7pZMWuOu7XtqEZHrkzuCC5y4BYQl/LN1RLkRLk1oTqecrKUevYwm dFKw== X-Gm-Message-State: AFq9FYIybkTwBkGAwVMZ8BJu35sPv+NLovV4UZAVSubvDkntWGKosYWP 2ocUsU2rL1Nu1lYzFap8PHUEql67CXjRH2rA+/8/Qn5gi2K9OciMdRIkz/WpHg0PuiTYBVYx2bz aU5q4LqvgeZCk4WW3pSHPuXJ5ni1OGo9OwK35dzZ/ebsNv7xHfccqmg13kCjudTOxpoj/v25mIA Ix5YKt8YLZ2c32eLVs7f4/nYrbg5uimr0T2C24Ksmx4ab9x1U= X-Gm-Gg: AYBFou0QAjLlx06xVts6qBqkwmCeDb+9rW2fI2/O4ssG+Z9zClJ1AFYDJzVJCfMgzw2 zsppxQsVwLw05epNitbG+KChoGFGmluuvKWTvHtlLt92+F9BBxKGPA8hGrewNxApg5HMdYNMUeJ ZorHbQU5O6v3GMD5iqTjT0Bd3+dneWf47Dii3luxcbx6HDSH5RmZbpKrIlrYNgCtgAkwa+NmZQT Bon1crsEe9F4ye5b5B6ec/N8n6DpIzO/0Ryzl5F8Uv7r3gHNlT1d7LdET1TY7akMEfwUeDCFRxR NHBrvB7U4idljeWW85i8ijcsuPudUtopMivZQj7ebNeOOaPC4Nbie4TWPyfXnwPOAmAUYQ== X-Received: by 2002:a05:600c:a088:b0:4a0:333:253a with SMTP id 5b1f17b1804b1-4a18e49c331mr201601615e9.14.1791831281389; Mon, 12 Oct 2026 11:54:41 -0700 (PDT) X-Received: by 2002:a05:600c:a088:b0:4a0:333:253a with SMTP id 5b1f17b1804b1-4a18e49c331mr201600875e9.14.1791831279851; Mon, 12 Oct 2026 11:54:39 -0700 (PDT) Received: from localhost ([213.31.44.29]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a18bf2caf4sm335477565e9.10.2026.10.12.11.54.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Oct 2026 11:54:39 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 1/5] gdb/doc: use (@value{GDBP}) for the prompt in examples Date: Mon, 12 Oct 2026 19:54:26 +0100 Message-Id: <191418904b1320ef05149d612c326f34cfffcaf5.1791831032.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: _tKn-C-xMvr0F9pTkQ0AaNXOa6fWvUfGAClYNvkIdhU_1791831282 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Within examples we should be using (@value{GDBP}) not '(gdb)'. There are several places where we don't do this, fix them now. --- gdb/doc/gdb.texinfo | 648 ++++++++++++++++++++++---------------------- gdb/doc/guile.texi | 50 ++-- gdb/doc/python.texi | 38 +-- 3 files changed, 368 insertions(+), 368 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 4bd5357c587..1f7778a1824 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -4764,9 +4764,9 @@ Set Breaks @code{b}). The debugger convenience variable @samp{$bpnum} records the number of the breakpoint you've set most recently: @smallexample -(gdb) b main +(@value{GDBP}) b main Breakpoint 1 at 0x11c6: file zeoes.c, line 24. -(gdb) p $bpnum +(@value{GDBP}) p $bpnum $1 = 1 @end smallexample @@ -4775,11 +4775,11 @@ Set Breaks @value{GDBN} then indicates the number of code locations in the breakpoint command output: @smallexample -(gdb) b some_func +(@value{GDBP}) b some_func Breakpoint 2 at 0x1179: some_func. (3 locations) -(gdb) p $bpnum +(@value{GDBP}) p $bpnum $2 = 2 -(gdb) +(@value{GDBP}) @end smallexample @vindex $_hit_bpnum@r{, convenience variable} @@ -4790,11 +4790,11 @@ Set Breaks @smallexample Thread 1 "zeoes" hit Breakpoint 2.1, some_func () at zeoes.c:8 8 printf("some func\n"); -(gdb) p $_hit_bpnum +(@value{GDBP}) p $_hit_bpnum $5 = 2 -(gdb) p $_hit_locno +(@value{GDBP}) p $_hit_locno $6 = 1 -(gdb) +(@value{GDBP}) @end smallexample Note that @samp{$_hit_bpnum} and @samp{$bpnum} are not equivalent: @@ -4807,11 +4807,11 @@ Set Breaks @smallexample Breakpoint 1, main (argc=1, argv=0x7fffffffe018) at zeoes.c:24 24 if (argc > 1) -(gdb) p $_hit_bpnum +(@value{GDBP}) p $_hit_bpnum $3 = 1 -(gdb) p $_hit_locno +(@value{GDBP}) p $_hit_locno $4 = 1 -(gdb) +(@value{GDBP}) @end smallexample The @samp{$_hit_bpnum} and @samp{$_hit_locno} variables can typically be used @@ -4828,8 +4828,8 @@ Set Breaks You can also define aliases to easily disable the last hit location or last hit breakpoint: @smallexample -(gdb) alias lld = disable $_hit_bpnum.$_hit_locno -(gdb) alias lbd = disable $_hit_bpnum +(@value{GDBP}) alias lld = disable $_hit_bpnum.$_hit_locno +(@value{GDBP}) alias lbd = disable $_hit_bpnum @end smallexample @table @code @@ -9224,7 +9224,7 @@ Frame Info 6: @} @end group @group -(gdb) info locals +(@value{GDBP}) info locals x = 4 y = 52 x = 3 @@ -19886,7 +19886,7 @@ Ravenscar Profile announced by @value{GDBN} as if they were threads: @smallexample -(gdb) continue +(@value{GDBP}) continue [New Ravenscar Thread 0x2b8f0] @end smallexample @@ -19894,7 +19894,7 @@ Ravenscar Profile the output of @code{info threads}: @smallexample -(gdb) info threads +(@value{GDBP}) info threads Id Target Id Frame 1 Thread 1 (CPU#0 [running]) simple () at simple.adb:10 2 Thread 2 (CPU#1 [running]) 0x0000000000003d34 in __gnat_initialize_cpu_devices () @@ -27345,7 +27345,7 @@ AArch64 @code{por_el0} when displaying it with the @code{info registers} command. @smallexample -(gdb) info registers por_el0 +(@value{GDBP}) info registers por_el0 por_el0 0x0000000000000007 [ P0=rwx ] @end smallexample @@ -27356,11 +27356,11 @@ AArch64 @code{por_el0}. @smallexample -(gdb) set $por_el0 = 0x7 -(gdb) set $por_p1 = 0x7 -(gdb) info registers por_el0 +(@value{GDBP}) set $por_el0 = 0x7 +(@value{GDBP}) set $por_p1 = 0x7 +(@value{GDBP}) info registers por_el0 por_el0 0x0000000000000077 [ P1=rwx P0=rwx ] -(gdb) info registers por_p1 +(@value{GDBP}) info registers por_p1 por_p1 0x7 rwx @end smallexample @@ -29763,20 +29763,20 @@ Other Misc Settings new context. For example, the default behavior is below: @smallexample -(gdb) inferior 1 +(@value{GDBP}) inferior 1 [Switching to inferior 1 [process 634] (/tmp/test)] [Switching to thread 1 (process 634)] #0 main () at test.c:3 3 return 0; -(gdb) +(@value{GDBP}) @end smallexample When the notifications are suppressed, the new context is not printed: @smallexample -(gdb) set suppress-cli-notifications on -(gdb) inferior 1 -(gdb) +(@value{GDBP}) set suppress-cli-notifications on +(@value{GDBP}) inferior 1 +(@value{GDBP}) @end smallexample @item The program being debugged stops: @@ -29786,25 +29786,25 @@ Other Misc Settings below is a breakpoint hit: @smallexample -(gdb) break test.c:3 +(@value{GDBP}) break test.c:3 Breakpoint 2 at 0x555555555155: file test.c, line 3. -(gdb) continue +(@value{GDBP}) continue Continuing. Breakpoint 2, main () at test.c:3 3 return 0; -(gdb) +(@value{GDBP}) @end smallexample When the notifications are suppressed, the output becomes: @smallexample -(gdb) break test.c:3 +(@value{GDBP}) break test.c:3 Breakpoint 2 at 0x555555555155: file test.c, line 3. -(gdb) set suppress-cli-notifications on -(gdb) continue +(@value{GDBP}) set suppress-cli-notifications on +(@value{GDBP}) continue Continuing. -(gdb) +(@value{GDBP}) @end smallexample Suppressing CLI notifications may be useful in scripts to obtain a @@ -31583,7 +31583,7 @@ TUI Commands For example: @example -(gdb) tui new-layout example src 1 regs 1 status 0 cmd 1 +(@value{GDBP}) tui new-layout example src 1 regs 1 status 0 cmd 1 @end example Here, the new layout is called @samp{example}. It shows the source @@ -31594,7 +31594,7 @@ TUI Commands Here is a more complex example, showing a horizontal layout: @example -(gdb) tui new-layout example @{-horizontal src 1 asm 1@} 2 status 0 cmd 1 +(@value{GDBP}) tui new-layout example @{-horizontal src 1 asm 1@} 2 status 0 cmd 1 @end example This will result in side-by-side source and assembly windows; with the @@ -32048,7 +32048,7 @@ Context management @smallexample -data-evaluate-expression --language c "sizeof (void*)" ^done,value="4" -(gdb) +(@value{GDBP}) @end smallexample The valid language names are the same names accepted by the @@ -33298,17 +33298,17 @@ GDB/MI Breakpoint Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -break-insert main ^done,bkpt=@{number="1",type="breakpoint",disp="keep", enabled="y",addr="0x000100d0",func="main",file="hello.c", fullname="/home/foo/hello.c",line="5",thread-groups=["i1"], times="0"@} -(gdb) +(@value{GDBP}) -break-after 1 3 ~ ^done -(gdb) +(@value{GDBP}) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -33320,7 +33320,7 @@ GDB/MI Breakpoint Commands body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",thread-groups=["i1"],times="0",ignore="3"@}]@} -(gdb) +(@value{GDBP}) @end smallexample @ignore @@ -33351,16 +33351,16 @@ GDB/MI Breakpoint Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -break-insert main ^done,bkpt=@{number="1",type="breakpoint",disp="keep", enabled="y",addr="0x000100d0",func="main",file="hello.c", fullname="/home/foo/hello.c",line="5",thread-groups=["i1"], times="0"@} -(gdb) +(@value{GDBP}) -break-commands 1 "print v" "continue" ^done -(gdb) +(@value{GDBP}) @end smallexample @findex -break-condition @@ -33387,10 +33387,10 @@ GDB/MI Breakpoint Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -break-condition 1 1 ^done -(gdb) +(@value{GDBP}) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -33402,7 +33402,7 @@ GDB/MI Breakpoint Commands body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",cond="1",thread-groups=["i1"],times="0",ignore="3"@}]@} -(gdb) +(@value{GDBP}) @end smallexample @findex -break-delete @@ -33424,10 +33424,10 @@ GDB/MI Breakpoint Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -break-delete 1 ^done -(gdb) +(@value{GDBP}) -break-list ^done,BreakpointTable=@{nr_rows="0",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -33437,7 +33437,7 @@ GDB/MI Breakpoint Commands @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[]@} -(gdb) +(@value{GDBP}) @end smallexample @findex -break-disable @@ -33459,10 +33459,10 @@ GDB/MI Breakpoint Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -break-disable 2 ^done -(gdb) +(@value{GDBP}) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -33474,7 +33474,7 @@ GDB/MI Breakpoint Commands body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",thread-groups=["i1"],times="0"@}]@} -(gdb) +(@value{GDBP}) @end smallexample @findex -break-enable @@ -33495,10 +33495,10 @@ GDB/MI Breakpoint Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -break-enable 2 ^done -(gdb) +(@value{GDBP}) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -33510,7 +33510,7 @@ GDB/MI Breakpoint Commands body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y", addr="0x000100d0",func="main",file="hello.c",fullname="/home/foo/hello.c", line="5",thread-groups=["i1"],times="0"@}]@} -(gdb) +(@value{GDBP}) @end smallexample @findex -break-info @@ -33635,17 +33635,17 @@ GDB/MI Breakpoint Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -break-insert main ^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c", fullname="/home/foo/recursive2.c,line="4",thread-groups=["i1"], times="0"@} -(gdb) +(@value{GDBP}) -break-insert -t foo ^done,bkpt=@{number="2",addr="0x00010774",file="recursive2.c", fullname="/home/foo/recursive2.c,line="11",thread-groups=["i1"], times="0"@} -(gdb) +(@value{GDBP}) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -33662,7 +33662,7 @@ GDB/MI Breakpoint Commands addr="0x00010774",func="foo",file="recursive2.c", fullname="/home/foo/recursive2.c",line="11",thread-groups=["i1"], times="0"@}]@} -(gdb) +(@value{GDBP}) @end smallexample @findex -dprintf-insert @@ -33727,21 +33727,21 @@ GDB/MI Breakpoint Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) 4-dprintf-insert foo "At foo entry\n" 4^done,bkpt=@{number="1",type="dprintf",disp="keep",enabled="y", addr="0x000000000040061b",func="foo",file="mi-dprintf.c", fullname="mi-dprintf.c",line="25",thread-groups=["i1"], times="0",script=["printf \"At foo entry\\n\"","continue"], original-location="foo"@} -(gdb) +(@value{GDBP}) 5-dprintf-insert 26 "arg=%d, g=%d\n" arg g 5^done,bkpt=@{number="2",type="dprintf",disp="keep",enabled="y", addr="0x000000000040062a",func="foo",file="mi-dprintf.c", fullname="mi-dprintf.c",line="26",thread-groups=["i1"], times="0",script=["printf \"arg=%d, g=%d\\n\", arg, g","continue"], original-location="mi-dprintf.c:26"@} -(gdb) +(@value{GDBP}) @end smallexample @findex -break-list @@ -33786,7 +33786,7 @@ GDB/MI Breakpoint Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -33801,13 +33801,13 @@ GDB/MI Breakpoint Commands bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y", addr="0x00010114",func="foo",file="hello.c",fullname="/home/foo/hello.c", line="13",thread-groups=["i1"],times="0"@}]@} -(gdb) +(@value{GDBP}) @end smallexample Here's an example of the result when there are no breakpoints: @smallexample -(gdb) +(@value{GDBP}) -break-list ^done,BreakpointTable=@{nr_rows="0",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -33817,7 +33817,7 @@ GDB/MI Breakpoint Commands @{width="10",alignment="-1",col_name="addr",colhdr="Address"@}, @{width="40",alignment="2",col_name="what",colhdr="What"@}], body=[]@} -(gdb) +(@value{GDBP}) @end smallexample @findex -break-passcount @@ -33865,18 +33865,18 @@ GDB/MI Breakpoint Commands Setting a watchpoint on a variable in the @code{main} function: @smallexample -(gdb) +(@value{GDBP}) -break-watch x ^done,wpt=@{number="2",exp="x"@} -(gdb) +(@value{GDBP}) -exec-continue ^running -(gdb) +(@value{GDBP}) *stopped,reason="watchpoint-trigger",wpt=@{number="2",exp="x"@}, value=@{old="-268439212",new="55"@}, frame=@{func="main",args=[],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="5",arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample Setting a watchpoint on a variable local to a function. @value{GDBN} will stop @@ -33884,30 +33884,30 @@ GDB/MI Breakpoint Commands for the watchpoint going out of scope. @smallexample -(gdb) +(@value{GDBP}) -break-watch C ^done,wpt=@{number="5",exp="C"@} -(gdb) +(@value{GDBP}) -exec-continue ^running -(gdb) +(@value{GDBP}) *stopped,reason="watchpoint-trigger", wpt=@{number="5",exp="C"@},value=@{old="-276895068",new="3"@}, frame=@{func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="13", arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) -exec-continue ^running -(gdb) +(@value{GDBP}) *stopped,reason="watchpoint-scope",wpnum="5", frame=@{func="callee3",args=[@{name="strarg", value="0x11940 \"A string argument.\""@}], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18", arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample Listing breakpoints and watchpoints, at different points in the program @@ -33915,10 +33915,10 @@ GDB/MI Breakpoint Commands deleted. @smallexample -(gdb) +(@value{GDBP}) -break-watch C ^done,wpt=@{number="2",exp="C"@} -(gdb) +(@value{GDBP}) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -33934,17 +33934,17 @@ GDB/MI Breakpoint Commands times="1"@}, bkpt=@{number="2",type="watchpoint",disp="keep", enabled="y",addr="",what="C",thread-groups=["i1"],times="0"@}]@} -(gdb) +(@value{GDBP}) -exec-continue ^running -(gdb) +(@value{GDBP}) *stopped,reason="watchpoint-trigger",wpt=@{number="2",exp="C"@}, value=@{old="-276895068",new="3"@}, frame=@{func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="13", arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) -break-list ^done,BreakpointTable=@{nr_rows="2",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -33960,7 +33960,7 @@ GDB/MI Breakpoint Commands times="1"@}, bkpt=@{number="2",type="watchpoint",disp="keep", enabled="y",addr="",what="C",thread-groups=["i1"],times="-5"@}]@} -(gdb) +(@value{GDBP}) -exec-continue ^running ^done,reason="watchpoint-scope",wpnum="2", @@ -33969,7 +33969,7 @@ GDB/MI Breakpoint Commands file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18", arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) -break-list ^done,BreakpointTable=@{nr_rows="1",nr_cols="6", hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@}, @@ -33983,7 +33983,7 @@ GDB/MI Breakpoint Commands file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/devo/gdb/testsuite/gdb.mi/basics.c",line="8", thread-groups=["i1"],times="1"@}]@} -(gdb) +(@value{GDBP}) @end smallexample @@ -34029,7 +34029,7 @@ Shared Library GDB/MI Catchpoint Commands -catch-load -t foo.so ^done,bkpt=@{number="1",type="catchpoint",disp="del",enabled="y", what="load of library matching foo.so",catch-type="load",times="0"@} -(gdb) +(@value{GDBP}) @end smallexample @@ -34058,7 +34058,7 @@ Shared Library GDB/MI Catchpoint Commands -catch-unload -d bar.so ^done,bkpt=@{number="2",type="catchpoint",disp="keep",enabled="n", what="load of library matching bar.so",catch-type="unload",times="0"@} -(gdb) +(@value{GDBP}) @end smallexample @node Ada Exception GDB/MI Catchpoint Commands @@ -34101,7 +34101,7 @@ Ada Exception GDB/MI Catchpoint Commands enabled="y",addr="0x0000000000404888",what="failed Ada assertions", thread-groups=["i1"],times="0", original-location="__gnat_debug_raise_assert_failure"@} -(gdb) +(@value{GDBP}) @end smallexample @findex -catch-exception @@ -34150,7 +34150,7 @@ Ada Exception GDB/MI Catchpoint Commands enabled="y",addr="0x0000000000404874", what="`Program_Error' Ada exception", thread-groups=["i1"], times="0",original-location="__gnat_debug_raise_exception"@} -(gdb) +(@value{GDBP}) @end smallexample @findex -catch-handlers @@ -34194,7 +34194,7 @@ Ada Exception GDB/MI Catchpoint Commands enabled="y",addr="0x0000000000402f68", what="`Constraint_Error' Ada exception handlers",thread-groups=["i1"], times="0",original-location="__gnat_begin_handler"@} -(gdb) +(@value{GDBP}) @end smallexample @node C++ Exception GDB/MI Catchpoint Commands @@ -34234,10 +34234,10 @@ C++ Exception GDB/MI Catchpoint Commands what="exception throw",catch-type="throw", thread-groups=["i1"], regexp="exception_type",times="0"@} -(gdb) +(@value{GDBP}) -exec-run ^running -(gdb) +(@value{GDBP}) ~"\n" ~"Catchpoint 1 (exception thrown), 0x00007ffff7ae00ed in __cxa_throw () from /lib64/libstdc++.so.6\n" @@ -34245,7 +34245,7 @@ C++ Exception GDB/MI Catchpoint Commands frame=@{addr="0x00007ffff7ae00ed",func="__cxa_throw", args=[],from="/lib64/libstdc++.so.6",arch="i386:x86-64"@}, thread-id="1",stopped-threads="all",core="6" -(gdb) +(@value{GDBP}) @end smallexample @findex -catch-rethrow @@ -34278,10 +34278,10 @@ C++ Exception GDB/MI Catchpoint Commands what="exception rethrow",catch-type="rethrow", thread-groups=["i1"], regexp="exception_type",times="0"@} -(gdb) +(@value{GDBP}) -exec-run ^running -(gdb) +(@value{GDBP}) ~"\n" ~"Catchpoint 1 (exception rethrown), 0x00007ffff7ae00ed in __cxa_rethrow () from /lib64/libstdc++.so.6\n" @@ -34289,7 +34289,7 @@ C++ Exception GDB/MI Catchpoint Commands frame=@{addr="0x00007ffff7ae00ed",func="__cxa_rethrow", args=[],from="/lib64/libstdc++.so.6",arch="i386:x86-64"@}, thread-id="1",stopped-threads="all",core="6" -(gdb) +(@value{GDBP}) @end smallexample @findex -catch-catch @@ -34322,10 +34322,10 @@ C++ Exception GDB/MI Catchpoint Commands what="exception catch",catch-type="catch", thread-groups=["i1"], regexp="exception_type",times="0"@} -(gdb) +(@value{GDBP}) -exec-run ^running -(gdb) +(@value{GDBP}) ~"\n" ~"Catchpoint 1 (exception caught), 0x00007ffff7ae00ed in __cxa_begin_catch () from /lib64/libstdc++.so.6\n" @@ -34333,7 +34333,7 @@ C++ Exception GDB/MI Catchpoint Commands frame=@{addr="0x00007ffff7ae00ed",func="__cxa_begin_catch", args=[],from="/lib64/libstdc++.so.6",arch="i386:x86-64"@}, thread-id="1",stopped-threads="all",core="6" -(gdb) +(@value{GDBP}) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -34360,10 +34360,10 @@ GDB/MI Program Context @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -exec-arguments -v word ^done -(gdb) +(@value{GDBP}) @end smallexample @@ -34407,10 +34407,10 @@ GDB/MI Program Context @c codespell:ignore-begin @smallexample -(gdb) +(@value{GDBP}) -environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb ^done -(gdb) +(@value{GDBP}) @end smallexample @c codespell:ignore-end @@ -34449,19 +34449,19 @@ GDB/MI Program Context @c codespell:ignore-begin @smallexample -(gdb) +(@value{GDBP}) -environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb ^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd" -(gdb) +(@value{GDBP}) -environment-directory "" ^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd" -(gdb) +(@value{GDBP}) -environment-directory -r /home/jjohnstn/src/gdb /usr/src ^done,source-path="/home/jjohnstn/src/gdb:/usr/src:$cdir:$cwd" -(gdb) +(@value{GDBP}) -environment-directory -r ^done,source-path="$cdir:$cwd" -(gdb) +(@value{GDBP}) @end smallexample @c codespell:ignore-end @@ -34502,16 +34502,16 @@ GDB/MI Program Context @c codespell:ignore-begin @smallexample -(gdb) +(@value{GDBP}) -environment-path ^done,path="/usr/bin" -(gdb) +(@value{GDBP}) -environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb /bin ^done,path="/kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb:/bin:/usr/bin" -(gdb) +(@value{GDBP}) -environment-path -r /usr/local/bin ^done,path="/usr/local/bin:/usr/bin" -(gdb) +(@value{GDBP}) @end smallexample @c codespell:ignore-end @@ -34535,10 +34535,10 @@ GDB/MI Program Context @c codespell:ignore-begin @smallexample -(gdb) +(@value{GDBP}) -environment-pwd ^done,cwd="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb" -(gdb) +(@value{GDBP}) @end smallexample @c codespell:ignore-end @@ -34598,7 +34598,7 @@ GDB/MI Thread Commands file="/tmp/a.c",fullname="/tmp/a.c",line="158",arch="i386:x86_64"@}, state="running"@}], current-thread-id="1" -(gdb) +(@value{GDBP}) @end smallexample @findex -thread-list-ids @@ -34624,11 +34624,11 @@ GDB/MI Thread Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -thread-list-ids ^done,thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@}, current-thread-id="1",number-of-threads="3" -(gdb) +(@value{GDBP}) @end smallexample @@ -34655,24 +34655,24 @@ GDB/MI Thread Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -exec-next ^running -(gdb) +(@value{GDBP}) *stopped,reason="end-stepping-range",thread-id="2",line="187", file="../../../devo/gdb/testsuite/gdb.threads/linux-dp.c" -(gdb) +(@value{GDBP}) -thread-list-ids ^done, thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@}, number-of-threads="3" -(gdb) +(@value{GDBP}) -thread-select 3 ^done,new-thread-id="3", frame=@{level="0",func="vprintf", args=[@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@}, @{name="arg",value="0x2"@}],file="vprintf.c",line="31",arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -34750,7 +34750,7 @@ GDB/MI Ada Tasking Commands @{width="1",alignment="2",col_name="name",colhdr="Name"@}], body=[@{current="*",id="1",task-id=" 644010",thread-id="1",priority="48", state="Child Termination Wait",name="main_task"@}]@} -(gdb) +(@value{GDBP}) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -34801,12 +34801,12 @@ GDB/MI Program Execution @smallexample -exec-continue ^running -(gdb) +(@value{GDBP}) @@Hello world *stopped,reason="breakpoint-hit",disp="keep",bkptno="2",frame=@{ func="foo",args=[],file="hello.c",fullname="/home/foo/bar/hello.c", line="13",arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample For a @samp{breakpoint-hit} stopped reason, when the breakpoint @@ -34816,12 +34816,12 @@ GDB/MI Program Execution @smallexample -exec-continue ^running -(gdb) +(@value{GDBP}) @@Hello world *stopped,reason="breakpoint-hit",disp="keep",bkptno="2",locno="3",frame=@{ func="foo",args=[],file="hello.c",fullname="/home/foo/bar/hello.c", line="13",arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample @findex -exec-finish @@ -34850,11 +34850,11 @@ GDB/MI Program Execution @smallexample -exec-finish ^running -(gdb) +(@value{GDBP}) @@hello from foo *stopped,reason="function-finished",frame=@{func="main",args=[], file="hello.c",fullname="/home/foo/bar/hello.c",line="7",arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample Function returning other than @code{void}. The name of the internal @@ -34864,13 +34864,13 @@ GDB/MI Program Execution @smallexample -exec-finish ^running -(gdb) +(@value{GDBP}) *stopped,reason="function-finished",frame=@{addr="0x000107b0",func="foo", args=[@{name="a",value="1"],@{name="b",value="9"@}@}, file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14", arch="i386:x86_64"@}, gdb-result-var="$1",return-value="0" -(gdb) +(@value{GDBP}) @end smallexample @@ -34906,23 +34906,23 @@ GDB/MI Program Execution @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) 111-exec-continue 111^running -(gdb) +(@value{GDBP}) 222-exec-interrupt 222^done -(gdb) +(@value{GDBP}) 111*stopped,signal-name="SIGINT",signal-meaning="Interrupt", frame=@{addr="0x00010140",func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="13",arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) -(gdb) +(@value{GDBP}) -exec-interrupt ^error,msg="mi_cmd_exec_interrupt: Inferior not executing." -(gdb) +(@value{GDBP}) @end smallexample @findex -exec-jump @@ -34979,9 +34979,9 @@ GDB/MI Program Execution @smallexample -exec-next ^running -(gdb) +(@value{GDBP}) *stopped,reason="end-stepping-range",line="8",file="hello.c" -(gdb) +(@value{GDBP}) @end smallexample @@ -35012,14 +35012,14 @@ GDB/MI Program Execution @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -exec-next-instruction ^running -(gdb) +(@value{GDBP}) *stopped,reason="end-stepping-range", addr="0x000100d4",line="5",file="hello.c" -(gdb) +(@value{GDBP}) @end smallexample @@ -35042,23 +35042,23 @@ GDB/MI Program Execution @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) 200-break-insert callee4 200^done,bkpt=@{number="1",addr="0x00010734", file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@} -(gdb) +(@value{GDBP}) 000-exec-run 000^running -(gdb) +(@value{GDBP}) 000*stopped,reason="breakpoint-hit",disp="keep",bkptno="1", frame=@{func="callee4",args=[], file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="8", arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) 205-break-delete 205^done -(gdb) +(@value{GDBP}) 111-exec-return 111^done,frame=@{level="0",func="callee3", args=[@{name="strarg", @@ -35066,7 +35066,7 @@ GDB/MI Program Execution file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="18", arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample @@ -35102,50 +35102,50 @@ GDB/MI Program Execution @subsubheading Examples @smallexample -(gdb) +(@value{GDBP}) -break-insert main ^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c",line="4"@} -(gdb) +(@value{GDBP}) -exec-run ^running -(gdb) +(@value{GDBP}) *stopped,reason="breakpoint-hit",disp="keep",bkptno="1", frame=@{func="main",args=[],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="4",arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample @noindent Program exited normally: @smallexample -(gdb) +(@value{GDBP}) -exec-run ^running -(gdb) +(@value{GDBP}) x = 55 *stopped,reason="exited-normally" -(gdb) +(@value{GDBP}) @end smallexample @noindent Program exited exceptionally: @smallexample -(gdb) +(@value{GDBP}) -exec-run ^running -(gdb) +(@value{GDBP}) x = 55 *stopped,reason="exited",exit-code="01" -(gdb) +(@value{GDBP}) @end smallexample Another way the program can terminate is if it receives a signal such as @code{SIGINT}. In this case, @sc{gdb/mi} displays this: @smallexample -(gdb) +(@value{GDBP}) *stopped,reason="exited-signalled",signal-name="SIGINT", signal-meaning="Interrupt" @end smallexample @@ -35181,12 +35181,12 @@ GDB/MI Program Execution @smallexample -exec-step ^running -(gdb) +(@value{GDBP}) *stopped,reason="end-stepping-range", frame=@{func="foo",args=[@{name="a",value="10"@}, @{name="b",value="0"@}],file="recursive2.c", fullname="/home/foo/bar/recursive2.c",line="11",arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample Regular stepping: @@ -35194,9 +35194,9 @@ GDB/MI Program Execution @smallexample -exec-step ^running -(gdb) +(@value{GDBP}) *stopped,reason="end-stepping-range",line="14",file="recursive2.c" -(gdb) +(@value{GDBP}) @end smallexample @@ -35224,23 +35224,23 @@ GDB/MI Program Execution @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -exec-step-instruction ^running -(gdb) +(@value{GDBP}) *stopped,reason="end-stepping-range", frame=@{func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="10",arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) -exec-step-instruction ^running -(gdb) +(@value{GDBP}) *stopped,reason="end-stepping-range", frame=@{addr="0x000100f4",func="foo",args=[],file="try.c", fullname="/home/foo/bar/try.c",line="10",arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample @@ -35265,15 +35265,15 @@ GDB/MI Program Execution @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -exec-until recursive2.c:6 ^running -(gdb) +(@value{GDBP}) x = 55 *stopped,reason="location-reached",frame=@{func="main",args=[], file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="6", arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample @ignore @@ -35321,13 +35321,13 @@ GDB/MI Stack Manipulation @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -stack-info-frame ^done,frame=@{level="1",addr="0x0001076c",func="callee3", file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="17", arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample @findex -stack-info-depth @@ -35351,22 +35351,22 @@ GDB/MI Stack Manipulation For a stack with frame levels 0 through 11: @smallexample -(gdb) +(@value{GDBP}) -stack-info-depth ^done,depth="12" -(gdb) +(@value{GDBP}) -stack-info-depth 4 ^done,depth="4" -(gdb) +(@value{GDBP}) -stack-info-depth 12 ^done,depth="12" -(gdb) +(@value{GDBP}) -stack-info-depth 11 ^done,depth="11" -(gdb) +(@value{GDBP}) -stack-info-depth 13 ^done,depth="12" -(gdb) +(@value{GDBP}) @end smallexample @anchor{-stack-list-arguments} @@ -35412,7 +35412,7 @@ GDB/MI Stack Manipulation @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -stack-list-frames ^done, stack=[ @@ -35436,7 +35436,7 @@ GDB/MI Stack Manipulation file="../../../devo/gdb/testsuite/gdb.mi/basics.c", fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="32", arch="i386:x86_64"@}] -(gdb) +(@value{GDBP}) -stack-list-arguments 0 ^done, stack-args=[ @@ -35445,7 +35445,7 @@ GDB/MI Stack Manipulation frame=@{level="2",args=[name="intarg",name="strarg"]@}, frame=@{level="3",args=[name="intarg",name="strarg",name="fltarg"]@}, frame=@{level="4",args=[]@}] -(gdb) +(@value{GDBP}) -stack-list-arguments 1 ^done, stack-args=[ @@ -35460,15 +35460,15 @@ GDB/MI Stack Manipulation @{name="strarg",value="0x11940 \"A string argument.\""@}, @{name="fltarg",value="3.5"@}]@}, frame=@{level="4",args=[]@}] -(gdb) +(@value{GDBP}) -stack-list-arguments 0 2 2 ^done,stack-args=[frame=@{level="2",args=[name="intarg",name="strarg"]@}] -(gdb) +(@value{GDBP}) -stack-list-arguments 1 2 2 ^done,stack-args=[frame=@{level="2", args=[@{name="intarg",value="2"@}, @{name="strarg",value="0x11940 \"A string argument.\""@}]@}] -(gdb) +(@value{GDBP}) @end smallexample @c @subheading -stack-list-exception-handlers @@ -35526,7 +35526,7 @@ GDB/MI Stack Manipulation Full stack backtrace: @smallexample -(gdb) +(@value{GDBP}) -stack-list-frames ^done,stack= [frame=@{level="0",addr="0x0001076c",func="foo", @@ -35565,13 +35565,13 @@ GDB/MI Stack Manipulation frame=@{level="11",addr="0x00010738",func="main", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="4", arch="i386:x86_64"@}] -(gdb) +(@value{GDBP}) @end smallexample Show frames between @var{low_frame} and @var{high_frame}: @smallexample -(gdb) +(@value{GDBP}) -stack-list-frames 3 5 ^done,stack= [frame=@{level="3",addr="0x000107a4",func="foo", @@ -35583,19 +35583,19 @@ GDB/MI Stack Manipulation frame=@{level="5",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14", arch="i386:x86_64"@}] -(gdb) +(@value{GDBP}) @end smallexample Show a single frame: @smallexample -(gdb) +(@value{GDBP}) -stack-list-frames 3 3 ^done,stack= [frame=@{level="3",addr="0x000107a4",func="foo", file="recursive2.c",fullname="/home/foo/bar/recursive2.c",line="14", arch="i386:x86_64"@}] -(gdb) +(@value{GDBP}) @end smallexample @@ -35634,17 +35634,17 @@ GDB/MI Stack Manipulation @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -stack-list-locals 0 ^done,locals=[name="A",name="B",name="C"] -(gdb) +(@value{GDBP}) -stack-list-locals --all-values ^done,locals=[@{name="A",value="1"@},@{name="B",value="2"@}, @{name="C",value="@{1, 2, 3@}"@}] -stack-list-locals --simple-values ^done,locals=[@{name="A",type="int",value="1"@}, @{name="B",type="int",value="2"@},@{name="C",type="int [3]"@}] -(gdb) +(@value{GDBP}) @end smallexample @anchor{-stack-list-variables} @@ -35679,7 +35679,7 @@ GDB/MI Stack Manipulation 6: @} @end group @group -(gdb) -stack-list-variables 2 +(@value{GDBP}) -stack-list-variables 2 ^done,variables=[@{name="x",type="int",value="4", filename="name.c",fullname="/home/src/name.c",line="3"@}, @{name="y",type="int",value="5"@},@{name="x",type="int", @@ -35694,10 +35694,10 @@ GDB/MI Stack Manipulation @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -stack-list-variables --thread 1 --frame 0 --all-values ^done,variables=[@{name="x",value="11"@},@{name="s",value="@{a = 1, b = 2@}"@}] -(gdb) +(@value{GDBP}) @end smallexample @@ -35724,10 +35724,10 @@ GDB/MI Stack Manipulation @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -stack-select-frame 2 ^done -(gdb) +(@value{GDBP}) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -36206,11 +36206,11 @@ GDB/MI Variable Objects @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -var-list-children n ^done,numchild=@var{n},children=[child=@{name=@var{name},exp=@var{exp}, numchild=@var{n},type=@var{type}@},@r{(repeats N times)}] -(gdb) +(@value{GDBP}) -var-list-children --all-values n ^done,numchild=@var{n},children=[child=@{name=@var{name},exp=@var{exp}, numchild=@var{n},value=@var{value},type=@var{type}@},@r{(repeats N times)}] @@ -36252,7 +36252,7 @@ GDB/MI Variable Objects @code{A} was created for @code{a}, then we'll get this output: @smallexample -(gdb) -var-info-expression A.1 +(@value{GDBP}) -var-info-expression A.1 ^done,lang="C",exp="1" @end smallexample @@ -36289,7 +36289,7 @@ GDB/MI Variable Objects @code{C} and a variable object @code{C} was created for variable @code{c}. Then, we'll get this output: @smallexample -(gdb) -var-info-path-expression C.Base.public.m_size +(@value{GDBP}) -var-info-path-expression C.Base.public.m_size ^done,path_expr=((Base)c).m_size) @end smallexample @@ -36352,13 +36352,13 @@ GDB/MI Variable Objects @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -var-assign var1 3 ^done,value="3" -(gdb) +(@value{GDBP}) -var-update * ^done,changelist=[@{name="var1",in_scope="true",type_changed="false"@}] -(gdb) +(@value{GDBP}) @end smallexample @findex -var-update @@ -36479,14 +36479,14 @@ GDB/MI Variable Objects @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -var-assign var1 3 ^done,value="3" -(gdb) +(@value{GDBP}) -var-update --all-values var1 ^done,changelist=[@{name="var1",value="3",in_scope="true", type_changed="false"@}] -(gdb) +(@value{GDBP}) @end smallexample @findex -var-set-frozen @@ -36514,10 +36514,10 @@ GDB/MI Variable Objects @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -var-set-frozen V 1 ^done -(gdb) +(@value{GDBP}) @end smallexample @findex -var-set-update-range @@ -36541,7 +36541,7 @@ GDB/MI Variable Objects @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -var-set-update-range V 1 2 ^done @end smallexample @@ -36583,7 +36583,7 @@ GDB/MI Variable Objects Resetting the visualizer: @smallexample -(gdb) +(@value{GDBP}) -var-set-visualizer V None ^done @end smallexample @@ -36591,7 +36591,7 @@ GDB/MI Variable Objects Reselecting the default (type-based) visualizer: @smallexample -(gdb) +(@value{GDBP}) -var-set-visualizer V gdb.default_visualizer ^done @end smallexample @@ -36600,7 +36600,7 @@ GDB/MI Variable Objects can be used to instantiate this class for a varobj: @smallexample -(gdb) +(@value{GDBP}) -var-set-visualizer V "lambda val: SomeClass()" ^done @end smallexample @@ -36809,7 +36809,7 @@ GDB/MI Data Manipulation Disassemble from the current value of @code{$pc} to @code{$pc + 20}: @smallexample -(gdb) +(@value{GDBP}) -data-disassemble -s $pc -e "$pc + 20" -- 0 ^done, asm_insns=[ @@ -36823,7 +36823,7 @@ GDB/MI Data Manipulation inst="sethi %hi(0x11800), %o2"@}, @{address="0x000107d0",func-name="main",offset="20", inst="or %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}] -(gdb) +(@value{GDBP}) @end smallexample Disassemble the whole @code{main} function. Line 32 is part of @@ -36841,13 +36841,13 @@ GDB/MI Data Manipulation [@dots{}] @{address="0x0001081c",func-name="main",offset="96",inst="ret "@}, @{address="0x00010820",func-name="main",offset="100",inst="restore "@}] -(gdb) +(@value{GDBP}) @end smallexample Disassemble 3 instructions from the start of @code{main}: @smallexample -(gdb) +(@value{GDBP}) -data-disassemble -f basics.c -l 32 -n 3 -- 0 ^done,asm_insns=[ @{address="0x000107bc",func-name="main",offset="0", @@ -36856,13 +36856,13 @@ GDB/MI Data Manipulation inst="mov 2, %o0"@}, @{address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"@}] -(gdb) +(@value{GDBP}) @end smallexample Disassemble 3 instructions from the start of @code{main} in mixed mode: @smallexample -(gdb) +(@value{GDBP}) -data-disassemble -f basics.c -l 32 -n 3 -- 1 ^done,asm_insns=[ src_and_asm_line=@{line="31", @@ -36877,7 +36877,7 @@ GDB/MI Data Manipulation func-name="main",offset="4",inst="mov 2, %o0"@}, @{address="0x000107c4",func-name="main",offset="8", inst="sethi %hi(0x11800), %o2"@}]@}] -(gdb) +(@value{GDBP}) @end smallexample @@ -36910,16 +36910,16 @@ GDB/MI Data Manipulation @smallexample 211-data-evaluate-expression A 211^done,value="1" -(gdb) +(@value{GDBP}) 311-data-evaluate-expression &A 311^done,value="0xefffeb7c" -(gdb) +(@value{GDBP}) 411-data-evaluate-expression A+3 411^done,value="4" -(gdb) +(@value{GDBP}) 511-data-evaluate-expression "A + 3" 511^done,value="4" -(gdb) +(@value{GDBP}) @end smallexample @@ -36944,20 +36944,20 @@ GDB/MI Data Manipulation On a PPC MBX board: @smallexample -(gdb) +(@value{GDBP}) -exec-continue ^running -(gdb) +(@value{GDBP}) *stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame=@{ func="main",args=[],file="try.c",fullname="/home/foo/bar/try.c", line="5",arch="powerpc"@} -(gdb) +(@value{GDBP}) -data-list-changed-registers ^done,changed-registers=["0","1","2","4","5","6","7","8","9", "10","11","13","14","15","16","17","18","19","20","21","22","23", "24","25","26","27","28","30","31","64","65","66","67","69"] -(gdb) +(@value{GDBP}) @end smallexample @@ -36987,7 +36987,7 @@ GDB/MI Data Manipulation For the PPC MBX board: @smallexample -(gdb) +(@value{GDBP}) -data-list-register-names ^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7", "r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18", @@ -36996,10 +36996,10 @@ GDB/MI Data Manipulation "f10","f11","f12","f13","f14","f15","f16","f17","f18","f19","f20", "f21","f22","f23","f24","f25","f26","f27","f28","f29","f30","f31", "", "pc","ps","cr","lr","ctr","xer"] -(gdb) +(@value{GDBP}) -data-list-register-names 1 2 3 ^done,register-names=["r1","r2","r3"] -(gdb) +(@value{GDBP}) @end smallexample @findex -data-list-register-values @@ -37047,11 +37047,11 @@ GDB/MI Data Manipulation don't appear in the actual output): @smallexample -(gdb) +(@value{GDBP}) -data-list-register-values r 64 65 ^done,register-values=[@{number="64",value="0xfe00a300"@}, @{number="65",value="0x00029002"@}] -(gdb) +(@value{GDBP}) -data-list-register-values x ^done,register-values=[@{number="0",value="0xfe0043c8"@}, @{number="1",value="0x3fff88"@},@{number="2",value="0xfffffffe"@}, @@ -37089,7 +37089,7 @@ GDB/MI Data Manipulation @{number="65",value="0x29002"@},@{number="66",value="0x202f04b5"@}, @{number="67",value="0xfe0043b0"@},@{number="68",value="0xfe00b3e4"@}, @{number="69",value="0x20002b03"@}] -(gdb) +(@value{GDBP}) @end smallexample @@ -37164,7 +37164,7 @@ GDB/MI Data Manipulation word. Display each word in hex. @smallexample -(gdb) +(@value{GDBP}) 9-data-read-memory -o -6 -- bytes+6 x 1 3 2 9^done,addr="0x00001390",nr-bytes="6",total-bytes="6", next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396", @@ -37172,20 +37172,20 @@ GDB/MI Data Manipulation @{addr="0x00001390",data=["0x00","0x01"]@}, @{addr="0x00001392",data=["0x02","0x03"]@}, @{addr="0x00001394",data=["0x04","0x05"]@}] -(gdb) +(@value{GDBP}) @end smallexample Read two bytes of memory starting at address @code{shorts + 64} and display as a single word formatted in decimal. @smallexample -(gdb) +(@value{GDBP}) 5-data-read-memory shorts+64 d 2 1 1 5^done,addr="0x00001510",nr-bytes="2",total-bytes="2", next-row="0x00001512",prev-row="0x0000150e", next-page="0x00001512",prev-page="0x0000150e",memory=[ @{addr="0x00001510",data=["128"]@}] -(gdb) +(@value{GDBP}) @end smallexample Read thirty two bytes of memory starting at @code{bytes+16} and format @@ -37193,7 +37193,7 @@ GDB/MI Data Manipulation used as the non-printable character. @smallexample -(gdb) +(@value{GDBP}) 4-data-read-memory bytes+16 x 1 8 4 x 4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32", next-row="0x000013c0",prev-row="0x0000139c", @@ -37206,7 +37206,7 @@ GDB/MI Data Manipulation @{addr="0x000013b4",data=["0x24","0x25","0x26","0x27"],ascii="$%&'"@}, @{addr="0x000013b8",data=["0x28","0x29","0x2a","0x2b"],ascii="()*+"@}, @{addr="0x000013bc",data=["0x2c","0x2d","0x2e","0x2f"],ascii=",-./"@}] -(gdb) +(@value{GDBP}) @end smallexample @findex -data-read-memory-bytes @@ -37286,12 +37286,12 @@ GDB/MI Data Manipulation @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -data-read-memory-bytes &a 10 ^done,memory=[@{begin="0xbffff154",offset="0x00000000", end="0xbffff15e", contents="01000000020000000300"@}] -(gdb) +(@value{GDBP}) @end smallexample @@ -37333,17 +37333,17 @@ GDB/MI Data Manipulation @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -data-write-memory-bytes &a "aabbccdd" ^done -(gdb) +(@value{GDBP}) @end smallexample @smallexample -(gdb) +(@value{GDBP}) -data-write-memory-bytes &a "aabbccdd" 16e ^done -(gdb) +(@value{GDBP}) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -37486,7 +37486,7 @@ GDB/MI Tracepoint Commands An example output would be: @smallexample -(gdb) +(@value{GDBP}) -trace-frame-collected ^done, explicit-variables=[@{name="myVar",value="1"@}], @@ -37503,7 +37503,7 @@ GDB/MI Tracepoint Commands tvars=[@{name="$tvar1",current="43970026"@}], memory=[@{address="0x0000000000602264",length="4"@}, @{address="0x0000000000615bc0",length="4"@}] -(gdb) +(@value{GDBP}) @end smallexample Where: @@ -37598,7 +37598,7 @@ GDB/MI Tracepoint Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -trace-list-variables ^done,trace-variables=@{nr_rows="1",nr_cols="3", hdr=[@{width="15",alignment="-1",col_name="name",colhdr="Name"@}, @@ -37606,7 +37606,7 @@ GDB/MI Tracepoint Commands @{width="11",alignment="-1",col_name="current",colhdr="Current"@}], body=[variable=@{name="$trace_timestamp",initial="0"@} variable=@{name="$foo",initial="10",current="15"@}]@} -(gdb) +(@value{GDBP}) @end smallexample @findex -trace-save @@ -37820,7 +37820,7 @@ GDB/MI Symbol Query @subsubheading Example @smallexample @group -(gdb) +(@value{GDBP}) -symbol-info-functions ^done,symbols= @{debug= @@ -37842,7 +37842,7 @@ GDB/MI Symbol Query description="static another_float_t f1(int);"@}]@}]@} @end group @group -(gdb) +(@value{GDBP}) -symbol-info-functions --name f1 ^done,symbols= @{debug= @@ -37856,7 +37856,7 @@ GDB/MI Symbol Query description="static another_float_t f1(int);"@}]@}]@} @end group @group -(gdb) +(@value{GDBP}) -symbol-info-functions --type void ^done,symbols= @{debug= @@ -37866,7 +37866,7 @@ GDB/MI Symbol Query description="void f4(int *);"@}]@}]@} @end group @group -(gdb) +(@value{GDBP}) -symbol-info-functions --include-nondebug ^done,symbols= @{debug= @@ -37925,7 +37925,7 @@ GDB/MI Symbol Query @smallexample @group -(gdb) +(@value{GDBP}) -symbol-info-module-functions ^done,symbols= [@{module="mod1", @@ -37991,7 +37991,7 @@ GDB/MI Symbol Query @smallexample @group -(gdb) +(@value{GDBP}) -symbol-info-module-variables ^done,symbols= [@{module="mod1", @@ -38068,7 +38068,7 @@ GDB/MI Symbol Query @subsubheading Example @smallexample @group -(gdb) +(@value{GDBP}) -symbol-info-modules ^done,symbols= @{debug= @@ -38083,7 +38083,7 @@ GDB/MI Symbol Query @{line="26",name="moduse"@}]@}]@} @end group @group -(gdb) +(@value{GDBP}) -symbol-info-modules --name mod[123] ^done,symbols= @{debug= @@ -38132,7 +38132,7 @@ GDB/MI Symbol Query @subsubheading Example @smallexample @group -(gdb) +(@value{GDBP}) -symbol-info-types ^done,symbols= @{debug= @@ -38149,7 +38149,7 @@ GDB/MI Symbol Query @{name="int"@}]@}]@} @end group @group -(gdb) +(@value{GDBP}) -symbol-info-types --name _int_ ^done,symbols= @{debug= @@ -38201,7 +38201,7 @@ GDB/MI Symbol Query @subsubheading Example @smallexample @group -(gdb) +(@value{GDBP}) -symbol-info-variables ^done,symbols= @{debug= @@ -38223,7 +38223,7 @@ GDB/MI Symbol Query description="static int global_i1;"@}]@}]@} @end group @group -(gdb) +(@value{GDBP}) -symbol-info-variables --name f1 ^done,symbols= @{debug= @@ -38237,7 +38237,7 @@ GDB/MI Symbol Query description="static float global_f1;"@}]@}]@} @end group @group -(gdb) +(@value{GDBP}) -symbol-info-variables --type float ^done,symbols= @{debug= @@ -38251,7 +38251,7 @@ GDB/MI Symbol Query description="static float global_f1;"@}]@}]@} @end group @group -(gdb) +(@value{GDBP}) -symbol-info-variables --include-nondebug ^done,symbols= @{debug= @@ -38359,10 +38359,10 @@ GDB/MI Symbol Query @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -symbol-list-lines basics.c ^done,lines=[@{pc="0x08048554",line="7"@},@{pc="0x0804855a",line="8"@}] -(gdb) +(@value{GDBP}) @end smallexample @@ -38475,10 +38475,10 @@ GDB/MI File Commands @c codespell:ignore-begin @smallexample -(gdb) +(@value{GDBP}) -file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done -(gdb) +(@value{GDBP}) @end smallexample @c codespell:ignore-end @@ -38506,10 +38506,10 @@ GDB/MI File Commands @c codespell:ignore-begin @smallexample -(gdb) +(@value{GDBP}) -file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done -(gdb) +(@value{GDBP}) @end smallexample @c codespell:ignore-end @@ -38558,10 +38558,10 @@ GDB/MI File Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) 123-file-list-exec-source-file 123^done,line="1",file="foo.c",fullname="/home/bar/foo.c,macro-info="1" -(gdb) +(@value{GDBP}) @end smallexample @@ -38734,12 +38734,12 @@ GDB/MI File Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -file-list-exec-source-files ^done,shared-libraries=[ @{id="/lib/libfoo.so",target-name="/lib/libfoo.so",host-name="/lib/libfoo.so",symbols-loaded="1",thread-group="i1",ranges=[@{from="0x72815989",to="0x728162c0"@}]@}, @{id="/lib/libbar.so",target-name="/lib/libbar.so",host-name="/lib/libbar.so",symbols-loaded="1",thread-group="i1",ranges=[@{from="0x76ee48c0",to="0x76ee9160"@}]@}] -(gdb) +(@value{GDBP}) @end smallexample @@ -38785,10 +38785,10 @@ GDB/MI File Commands @c codespell:ignore-begin @smallexample -(gdb) +(@value{GDBP}) -file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx ^done -(gdb) +(@value{GDBP}) @end smallexample @c codespell:ignore-end @@ -38852,12 +38852,12 @@ GDB/MI Target Manipulation @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -target-attach 34 =thread-created,id="1" *stopped,thread-id="1",frame=@{addr="0xb7f7e410",func="bar",args=[]@} ^done -(gdb) +(@value{GDBP}) @end smallexample @ignore @@ -38902,10 +38902,10 @@ GDB/MI Target Manipulation @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -target-detach ^done -(gdb) +(@value{GDBP}) @end smallexample @@ -38928,10 +38928,10 @@ GDB/MI Target Manipulation @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -target-disconnect ^done -(gdb) +(@value{GDBP}) @end smallexample @@ -38989,7 +38989,7 @@ GDB/MI Target Manipulation have been broken down so that they can fit onto a page. @smallexample -(gdb) +(@value{GDBP}) -target-download +download,@{section=".text",section-size="6668",total-size="9880"@} +download,@{section=".text",section-sent="512",section-size="6668", @@ -39035,7 +39035,7 @@ GDB/MI Target Manipulation total-sent="9796",total-size="9880"@} ^done,address="0x10004",load-size="9880",transfer-rate="6586", write-rate="429" -(gdb) +(@value{GDBP}) @end smallexample @@ -39135,10 +39135,10 @@ GDB/MI Target Manipulation addresses and memory region sizes. @smallexample -(gdb) +(@value{GDBP}) -target-flash-erase ^done,erased-regions=@{address="0x0",size="0x40000"@} -(gdb) +(@value{GDBP}) @end smallexample @findex -target-select @@ -39175,10 +39175,10 @@ GDB/MI Target Manipulation @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -target-select remote /dev/ttya ^connected,addr="0xfe00a300",func="??",args=[] -(gdb) +(@value{GDBP}) @end smallexample @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -39205,10 +39205,10 @@ GDB/MI File Transfer Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -target-file-put localfile remotefile ^done -(gdb) +(@value{GDBP}) @end smallexample @@ -39231,10 +39231,10 @@ GDB/MI File Transfer Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -target-file-get remotefile localfile ^done -(gdb) +(@value{GDBP}) @end smallexample @@ -39256,10 +39256,10 @@ GDB/MI File Transfer Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -target-file-delete remotefile ^done -(gdb) +(@value{GDBP}) @end smallexample @@ -39395,7 +39395,7 @@ GDB/MI Support Commands Example output: @smallexample -(gdb) -list-features +(@value{GDBP}) -list-features ^done,features=["feature1","feature2"] @end smallexample @@ -39460,7 +39460,7 @@ GDB/MI Support Commands Example output: @smallexample -(gdb) -list-target-features +(@value{GDBP}) -list-target-features ^done,features=["async"] @end smallexample @@ -39502,7 +39502,7 @@ GDB/MI Miscellaneous Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -gdb-exit ^exit @end smallexample @@ -39548,10 +39548,10 @@ GDB/MI Miscellaneous Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -gdb-set $foo=3 ^done -(gdb) +(@value{GDBP}) @end smallexample @@ -39573,10 +39573,10 @@ GDB/MI Miscellaneous Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -gdb-show annotate ^done,value="0" -(gdb) +(@value{GDBP}) @end smallexample @c @subheading -gdb-source @@ -39603,7 +39603,7 @@ GDB/MI Miscellaneous Commands @c This example modifies the actual output from GDB to avoid overfull @c box in TeX. @smallexample -(gdb) +(@value{GDBP}) -gdb-version ~GNU gdb 5.2.1 ~Copyright 2000 Free Software Foundation, Inc. @@ -39616,7 +39616,7 @@ GDB/MI Miscellaneous Commands ~This GDB was configured as "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi". ^done -(gdb) +(@value{GDBP}) @end smallexample @findex -list-thread-groups @@ -39926,13 +39926,13 @@ GDB/MI Miscellaneous Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -interpreter-exec console "break main" &"During symbol reading, couldn't parse type; debugger out of date?.\n" &"During symbol reading, bad structure-type format.\n" ~"Breakpoint 1 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n" ^done -(gdb) +(@value{GDBP}) @end smallexample @findex -inferior-tty-set @@ -39953,10 +39953,10 @@ GDB/MI Miscellaneous Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -inferior-tty-set /dev/pts/1 ^done -(gdb) +(@value{GDBP}) @end smallexample @findex -inferior-tty-show @@ -39977,13 +39977,13 @@ GDB/MI Miscellaneous Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -inferior-tty-set /dev/pts/1 ^done -(gdb) +(@value{GDBP}) -inferior-tty-show ^done,inferior_tty_terminal="/dev/pts/1" -(gdb) +(@value{GDBP}) @end smallexample @findex -enable-timings @@ -40007,28 +40007,28 @@ GDB/MI Miscellaneous Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -enable-timings ^done -(gdb) +(@value{GDBP}) -break-insert main ^done,bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y", addr="0x080484ed",func="main",file="myprog.c", fullname="/home/nickrob/myprog.c",line="73",thread-groups=["i1"], times="0"@}, time=@{wallclock="0.05185",user="0.00800",system="0.00000"@} -(gdb) +(@value{GDBP}) -enable-timings no ^done -(gdb) +(@value{GDBP}) -exec-run ^running -(gdb) +(@value{GDBP}) *stopped,reason="breakpoint-hit",disp="keep",bkptno="1",thread-id="0", frame=@{addr="0x080484ed",func="main",args=[@{name="argc",value="1"@}, @{name="argv",value="0xbfb60364"@}],file="myprog.c", fullname="/home/nickrob/myprog.c",line="73",arch="i386:x86_64"@} -(gdb) +(@value{GDBP}) @end smallexample @findex -complete @@ -40072,16 +40072,16 @@ GDB/MI Miscellaneous Commands @subsubheading Example @smallexample -(gdb) +(@value{GDBP}) -complete br ^done,completion="break", matches=["break","break-range"], max_completions_reached="0" -(gdb) +(@value{GDBP}) -complete "b ma" ^done,completion="b ma", matches=["b madvise","b main"],max_completions_reached="0" -(gdb) +(@value{GDBP}) -complete "b push_b" ^done,completion="b push_back(", matches=[ @@ -40089,10 +40089,10 @@ GDB/MI Miscellaneous Commands "b std::string::push_back(char)", "b std::vector >::push_back(int&&)"], max_completions_reached="0" -(gdb) +(@value{GDBP}) -complete "nonexist" ^done,matches=[],max_completions_reached="0" -(gdb) +(@value{GDBP}) @end smallexample @@ -43356,12 +43356,12 @@ Maintenance Commands Here's an example of using @code{maint ignore-probes}: @smallexample -(gdb) maint ignore-probes -verbose libc ^longjmp$ +(@value{GDBP}) maint ignore-probes -verbose libc ^longjmp$ ignore-probes filter has been set to: PROVIDER: 'libc' PROBE_NAME: '^longjmp$' OBJNAME: '' -(gdb) start +(@value{GDBP}) start <... more output ...> Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M Ignoring SystemTap probe libc longjmp in /lib64/libc.so.6.^M diff --git a/gdb/doc/guile.texi b/gdb/doc/guile.texi index 95f83802f23..7bf773a649e 100644 --- a/gdb/doc/guile.texi +++ b/gdb/doc/guile.texi @@ -229,13 +229,13 @@ Basic Guile Example: @smallexample -(gdb) guile (value-type (make-value 1)) +(@value{GDBP}) guile (value-type (make-value 1)) ERROR: Unbound variable: value-type Error while executing Scheme code. -(gdb) guile (use-modules (gdb)) -(gdb) guile (value-type (make-value 1)) +(@value{GDBP}) guile (use-modules (gdb)) +(@value{GDBP}) guile (value-type (make-value 1)) int -(gdb) +(@value{GDBP}) @end smallexample The @code{(gdb)} module provides these basic Guile functions. @@ -565,9 +565,9 @@ Values From Inferior In Guile @code{make-value} always returns a fresh object. @smallexample -(gdb) guile (eq? (make-value 1) (make-value 1)) +(@value{GDBP}) guile (eq? (make-value 1) (make-value 1)) $1 = #f -(gdb) guile (equal? (make-value 1) (make-value 1)) +(@value{GDBP}) guile (equal? (make-value 1) (make-value 1)) $1 = #t @end smallexample @@ -1724,7 +1724,7 @@ Writing a Guile Pretty-Printer corresponding output of @samp{info pretty-printer}: @smallexample -(gdb) info pretty-printer +(@value{GDBP}) info pretty-printer my_library.so: my-library foo @@ -1845,14 +1845,14 @@ Commands In Guile say a bad command argument. @smallexample -(gdb) guile (use-modules (gdb)) -(gdb) guile +(@value{GDBP}) guile (use-modules (gdb)) +(@value{GDBP}) guile (register-command! (make-command "test-user-error" #:command-class COMMAND_OBSCURE #:invoke (lambda (self arg from-tty) (throw-user-error "Bad argument ~a" arg)))) end -(gdb) test-user-error ugh +(@value{GDBP}) test-user-error ugh ERROR: Bad argument ugh @end smallexample @end deffn @@ -2012,13 +2012,13 @@ Commands In Guile implemented in Guile: @smallexample -(gdb) guile +(@value{GDBP}) guile (register-command! (make-command "hello-world" #:command-class COMMAND_USER #:doc "Greet the whole world." #:invoke (lambda (self args from-tty) (display "Hello, World!\n")))) end -(gdb) hello-world +(@value{GDBP}) hello-world Hello, World! @end smallexample @@ -3531,7 +3531,7 @@ Architectures In Guile Example: @smallexample -(gdb) guile (type-name (arch-uchar-type (current-arch))) +(@value{GDBP}) guile (type-name (arch-uchar-type (current-arch))) "unsigned char" @end smallexample @@ -3559,13 +3559,13 @@ Disassembly In Guile Example: @smallexample -(gdb) guile (use-modules (rnrs io ports)) -(gdb) guile (define pc (value->integer (parse-and-eval "$pc"))) -(gdb) guile (define mem (open-memory #:start pc)) -(gdb) guile (define bv (get-bytevector-n mem 10)) -(gdb) guile (define bv-port (open-bytevector-input-port bv)) -(gdb) guile (define arch (current-arch)) -(gdb) guile (arch-disassemble arch pc #:port bv-port #:offset pc) +(@value{GDBP}) guile (use-modules (rnrs io ports)) +(@value{GDBP}) guile (define pc (value->integer (parse-and-eval "$pc"))) +(@value{GDBP}) guile (define mem (open-memory #:start pc)) +(@value{GDBP}) guile (define bv (get-bytevector-n mem 10)) +(@value{GDBP}) guile (define bv-port (open-bytevector-input-port bv)) +(@value{GDBP}) guile (define arch (current-arch)) +(@value{GDBP}) guile (arch-disassemble arch pc #:port bv-port #:offset pc) (((address . 4195516) (asm . "mov $0x4005c8,%edi") (length . 5))) @end smallexample @@ -3948,7 +3948,7 @@ Guile Auto-loading Example: @smallexample -(gdb) info auto-load guile-scripts +(@value{GDBP}) info auto-load guile-scripts Loaded Script Yes scm-section-script.scm full name: /tmp/scm-section-script.scm @@ -4026,10 +4026,10 @@ Guile Types Module Then in gdb: @smallexample -(gdb) start -(gdb) guile (use-modules (gdb) (gdb types)) -(gdb) guile (define foo-ref (parse-and-eval "foo_ref")) -(gdb) guile (get-basic-type (value-type foo-ref)) +(@value{GDBP}) start +(@value{GDBP}) guile (use-modules (gdb) (gdb types)) +(@value{GDBP}) guile (define foo-ref (parse-and-eval "foo_ref")) +(@value{GDBP}) guile (get-basic-type (value-type foo-ref)) # @end smallexample @end deffn diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index ddb347361f7..99d11d35aaf 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -805,7 +805,7 @@ Exception Handling rather recognizes it when thrown from user Python code. Example: @smallexample -(gdb) python +(@value{GDBP}) python >class HelloWorld (gdb.Command): > """Greet the whole world.""" > def __init__ (self): @@ -817,7 +817,7 @@ Exception Handling > print ("Hello, World!") >HelloWorld () >end -(gdb) hello-world 42 +(@value{GDBP}) hello-world 42 hello-world takes no arguments @end smallexample @end ftable @@ -1945,7 +1945,7 @@ Pretty Printing API reflect any flags that are temporarily in effect. @smallexample -(gdb) python print(gdb.print_options ()['max_elements']) +(@value{GDBP}) python print(gdb.print_options ()['max_elements']) 200 @end smallexample @end defun @@ -2171,7 +2171,7 @@ Writing a Pretty-Printer corresponding output of @samp{info pretty-printer}: @smallexample -(gdb) info pretty-printer +(@value{GDBP}) info pretty-printer my_library.so: my_library foo @@ -3492,10 +3492,10 @@ Writing an Xmethod defined above: @smallexample -(gdb) p obj.geta() +(@value{GDBP}) p obj.geta() $1 = 5 -(gdb) p obj + obj +(@value{GDBP}) p obj + obj $2 = 10 @end smallexample @@ -5635,7 +5635,7 @@ Functions In Python Now you can use the function in an expression: @smallexample -(gdb) print $greet("Bob") +(@value{GDBP}) print $greet("Bob") $1 = "Hello, Bob!" @end smallexample @@ -9129,7 +9129,7 @@ Python Auto-loading Example: @smallexample -(gdb) info auto-load python-scripts +(@value{GDBP}) info auto-load python-scripts Loaded Script Yes py-section-script.py full name: /tmp/py-section-script.py @@ -9215,10 +9215,10 @@ gdb.types Then in gdb: @smallexample -(gdb) start -(gdb) python import gdb.types -(gdb) python foo_ref = gdb.parse_and_eval("foo_ref") -(gdb) python print(gdb.types.get_basic_type(foo_ref.type)) +(@value{GDBP}) start +(@value{GDBP}) python import gdb.types +(@value{GDBP}) python foo_ref = gdb.parse_and_eval("foo_ref") +(@value{GDBP}) python print(gdb.types.get_basic_type(foo_ref.type)) int @end smallexample @@ -9391,11 +9391,11 @@ gdb.ptwrite @exdent @value{GDBN} output after recording the sample program in pt format: @smallexample @group -(gdb) record instruction-history 12,14 +(@value{GDBP}) record instruction-history 12,14 12 0x0040074c : ptwrite %rbx 13 [0x42] 14 0x00400751 : mov -0x8(%rbp),%rbx -(gdb) record function-call-history +(@value{GDBP}) record function-call-history 1 main 2 ptwrite64 [0x42] @@ -9432,7 +9432,7 @@ gdb.ptwrite @smallexample @group -(gdb) python-interactive +(@value{GDBP}) python-interactive >>> class my_filter(): ... def __init__(self): ... self.var = 0 @@ -9452,7 +9452,7 @@ gdb.ptwrite @end group @group -(gdb) record function-call-history 59,64 +(@value{GDBP}) record function-call-history 59,64 59 pthread_create@@GLIBC_2.2.5 60 job() 61 task(void*) @@ -9464,7 +9464,7 @@ gdb.ptwrite @end group @group -(gdb) info threads +(@value{GDBP}) info threads * 1 Thread 0x7ffff7fd8740 (LWP 25796) "ptw_threads" task () at bin/ptwrite/ptw_threads.c:45 2 Thread 0x7ffff6eb8700 (LWP 25797) "ptw_threads" task () @@ -9472,14 +9472,14 @@ gdb.ptwrite @end group @group -(gdb) thread 2 +(@value{GDBP}) thread 2 [Switching to thread 2 (Thread 0x7ffff6eb8700 (LWP 25797))] #0 task (arg=0x0) at ptwrite_threads.c:45 45 return NULL; @end group @group -(gdb) record function-call-history 10,14 +(@value{GDBP}) record function-call-history 10,14 10 start_thread 11 task(void*) 12 ptwrite64(unsigned long) -- 2.55.0