This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] mi: print frame architecture when printing frames on an MI channel


> From: Jan Vrany <jan.vrany@fit.cvut.cz>
> Cc: Jan Vrany <jan.vrany@fit.cvut.cz>
> Date: Mon, 20 Aug 2018 21:42:50 +0100
> 
> When printing frames on an MI channel also print frame architecture
> like in:
> 
>     (gdb)
>     -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)
> 
> This is useful for MI clients that need to know the architecture in order
> to perform further analysis, for example to use their own disassembler to
> analyze machine code.

Thanks.

> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -41,6 +41,11 @@ thread apply [all | COUNT | -COUNT] [FLAG]... COMMAND
>    FLAG arguments allow to control what output to produce and how to handle
>    errors raised when applying COMMAND to a thread.
>  
> +* MI changes
> +
> +  ** Command responses and notifications that include a frame now include
> +     the frame's architecture in a new "arch" attribute.
> +

This is OK.

> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index b931834400..635275d3ec 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -28001,7 +28001,7 @@ reason that execution stopped.
>  <- *stopped,reason="breakpoint-hit",disp="keep",bkptno="1",thread-id="0",
>     frame=@{addr="0x08048564",func="main",
>     args=[@{name="argc",value="1"@},@{name="argv",value="0xbfc4d4d4"@}],
> -   file="myprog.c",fullname="/home/nickrob/myprog.c",line="68"@}
> +   file="myprog.c",fullname="/home/nickrob/myprog.c",line="68",arch="i386:x86_64"@}

The modified line is now too long, please split it into two, otherwise
it might look badly in the printed version of the manual.

> @@ -28684,7 +28684,7 @@ for the watchpoint going out of scope.
>  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"@}
> +fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="13",arch="i386:x86_64"@}

Likewise here, and everywhere else in the patch for the manual.

OK with those fixed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]