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
On Sat, Mar 26, 2005 at 03:38:55PM +0200, Eli Zaretskii wrote:
> > 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.
I would look at mi-file.exp. Make sure the regex you use in the
testsuite for matching the fullname is fullname=\"/.*/${srcfile}\"
I know that I originally committed something different, and it ended up
morphing into this, so that it could pass the testsuite in a variety of
different environments.
Bob Rossi