Re: [PATCH] -stack-info-frames

Daniel Jacobowitz
2005-06-18T23:20:41Z

On Sun, Jun 19, 2005 at 10:49:29AM +1200, Nick Roberts wrote:
> This is what used to happen (I get this with GNU gdb 5.2.1-2mdk, for example)
> But now with GDB in CVS, I get the same output as with
> "-interpreter-exec console up" (apart from "up\n" in the log stream) i.e.
>
> up
> &"up\n"
> ~"#1 0x08048641 in main (argc=1, argv=0xbffff794) at myprog.c:81\n"
> ~"81\t myprint (i,a[i] /* hello */);\n"
> ^done
>
> I don't know why you don't also get this.

I do now. It didn't even occur to me that this would change between
6.3 and CVS. I'll assume that was a deliberate change... is this going
to bust frontends?

> Before I looked at the code, I presumed that GDB detected when execution had
> stopped and the printed out "*stopped" (in which case this would happen also
> with CLI commands). Looking at it, I see it is printed in
> mi_execute_async_cli_command so that it appears as command output rather than
> event notification
>
> > Meanwhile, we don't have this ability. So maybe we do need
> > -stack-info-frame, without an argument.
>
> Yes, unless Apple's proposed merge will provide the necessary information.

Let's not wait on that. You've demonstrated a use for
-stack-info-frame relative to the current source base. That's plenty
good enough for me.

Of course now we need to re-add the documentation (with example this
time). A test case would be nice too. Since we've decided that we do
want this feature, could you put that together?

I'm going to be travelling all next week, but I should have time to
review the occasional patch anyway.

--
Daniel Jacobowitz
CodeSourcery, LLC