This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] fullname attribute for GDB/MI stack frames
- From: "Eli Zaretskii" <eliz at gnu dot org>
- To: "Dennis Brueni" <dbrueni at slickedit dot com>
- Cc: bob at brasko dot net, gdb-patches at sources dot redhat dot com, "dbrueni at slickedit dot com"<ECCC6E9907B4CD4A83260A191A91F20E3AF15E at wampa dot office dot slickedit dot com>(dbrueni at slickedit dot com)
- Date: Sat, 26 Mar 2005 15:38:55 +0200
- Subject: Re: [RFC] fullname attribute for GDB/MI stack frames
- References: <ECCC6E9907B4CD4A83260A191A91F20E3AF15E@wampa.office.slickedit.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Thu, 24 Mar 2005 15:48:45 -0500
> From: "Dennis Brueni" <dbrueni@slickedit.com>
> Cc: <gdb-patches@sources.redhat.com>,
> "Dennis Brueni" <dbrueni@slickedit.com>
>
> *** gdb/doc/gdb.texinfo 10 Mar 2005 13:12:33 -0000 1.233
> --- gdb/doc/gdb.texinfo 24 Mar 2005 18:34:13 -0000
> *************** Setting a watchpoint on a variable in th
> *** 15894,15900 ****
> ^running
> ^done,reason="watchpoint-trigger",wpt=@{number="2",exp="x"@},
> value=@{old="-268439212",new="55"@},
> ! frame=@{func="main",args=[],file="recursive2.c",line="5"@}
> (@value{GDBP})
> @end smallexample
>
> --- 15894,15900 ----
> ^running
> ^done,reason="watchpoint-trigger",wpt=@{number="2",exp="x"@},
> value=@{old="-268439212",new="55"@},
> !
> frame=@{func="main",args=[],file="recursive2.c",fullname="/.../recursive
> 2.c",line="5"@}
Your mail software breaks long lines, which will be an annoyance for
whoever tries to apply these patches. Please resend the patches while
taking care that long lines are sent intact, TIA.
> ^done,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",line="13"@}
> (@value{GDBP})
> -exec-continue
> ^running
> ^done,reason="watchpoint-scope",wpnum="5",
> frame=@{func="callee3",args=[@{name="strarg",
> value="0x11940 \"A string argument.\""@}],
> ! file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
> (@value{GDBP})
> @end smallexample
>
> --- 15912,15927 ----
> ^done,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="/devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
> (@value{GDBP})
> -exec-continue
> ^running
> ^done,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="/devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
> (@value{GDBP})
> @end smallexample
I think these changes are confusing: the full name for
"../../../devo/gdb/testsuite/gdb.mi/basics.c" cannot possibly be
"/devo/gdb/testsuite/gdb.mi/basics.c" unless "../../.." resolves to
the root directory. While the latter is a possibility, it's a very
rare occasion, so it is better to replace "../../.." with something
like "/foo/bar/", not with "/". The way you did it, a user could
misunderstand what fullname= does: your examples look like it simply
removes "../../.." part.
> (@value{GDBP})
> *stopped,reason="breakpoint-hit",bkptno="1",frame=@{func="main",
> ! args=[],file="try.c",line="5"@}
> (@value{GDBP})
> -data-list-changed-registers
> ^done,changed-registers=["0","1","2","4","5","6","7","8","9",
> --- 16211,16217 ----
>
> (@value{GDBP})
> *stopped,reason="breakpoint-hit",bkptno="1",frame=@{func="main",
> ! args=[],file="try.c",fullname="/.../try.c",line="5"@}
Here, I don't understand the "/.../" part. Did you mean for the 3
dots to stand for the omitted full path from the root? If so, it's
less confusuing to use some invented file names, like /foo/bar/baz or
/dir/subdir/subsubdir.
Other than that, the doco patch is approved. Thanks.