[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New function for gdb-ui.el?

From: Eli Zaretskii
Subject: Re: New function for gdb-ui.el?
Date: Wed, 26 Oct 2005 21:31:13 +0200

> From: Nick Roberts <address@hidden>
> Date: Wed, 26 Oct 2005 21:58:41 +1300
> Cc: address@hidden, address@hidden, address@hidden
>  > > The manual says:
>  > > 
>  > > GDB> Continue running your program until either the specified location
>  > > GDB> is reached, or the current stack frame returns.
>  > > 
>  > > (actually, it should say *selected* stack frame returns)
>  > 
>  > I don't think ``selected'' is more accurate or more clear in this
>  > context than ``current''.
> My understanding is that "current frame" refers to the innermost frame where
> execution has stopped.  The "selected frame" refers to the frame that GDB is
> looking at and can be changed with the "up" and "down" commands.  If I stop
> in a frame, I can use "up" to go up a frame and then "until" to advance along
> that "selected frame" even though execution had stopped in the frame below.
> Unfortunately "current frame" has some ambiguity and the GDB manual seems to
> mix its meaning.
>  > The latest version of the manual has this clarification:
>  > 
>  >   The specified location is actually reached only if it is in the
>  >   current frame.
> I think it should say:
>      The specified location is actually reached only if it is in the
>      same frame.

Thanks for pointing this out, I will try to make the terminology in
the GDB manual more clear and consistent.

>  > I'd suggest to craft a simple test case with inlined function and ask
>  > the question on the GDB mailing list.  I'd expect `until' to stop in
>  > an inlined function; the fact that the manual doesn't say anything
>  > about this might just be a documentation bug.
> I don't think I understand the issues.  I thought if I used the keyword inline
> e.g "inline int mysquare (int x)", I would get an inline function.  Perhaps
> thats not the case because I can set a breakpoint, stop there and see mysquare
> in the stack.
> If I use -O2 or -O3 (gcc 3.4.4) then I can't stop there (because its 
> inlined?).
> So how can "until" possibly proceed to there?

Not enough details to answer (and I think we should continue this on
address@hidden, anyway).  You didn't say on what platform you
tested this, and you didn't show the test program nor the GCC command
used to compile it.  (The debug info format used by the compiler is of

In general, I think GDB should be able to stop inside inlined code,
given enough information from the compiler.  So if it doesn't, it's a
bug of some kind.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]