[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New function for gdb-ui.el?
From: |
Richard M. Stallman |
Subject: |
Re: New function for gdb-ui.el? |
Date: |
Wed, 26 Oct 2005 21:30:11 -0400 |
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 you can do that, then it wasn't inlined. At least, that call to
mysquare was not inlined. (I don't remember any more whether GCC can
decide to inline some calls to a function and not inline other calls.)
If I use -O2 or -O3 (gcc 3.4.4) then I can't stop there (because its
inlined?).
Probably so.
Note that inlining can occur even with -O0. I always compile Emacs
with -O0 -fno-inline to make sure nothing will be inlined.
So how can "until" possibly proceed to there?
You may think think there's no there, there, but there is. There is
code in the calling function that corresponds to mysquare. GDB knows
where it is, as you'll see if you step thru that calling function.
(This may be easier to see if the inlined function contains several
function calls to unknown functions instead of just arithmetic.)
If you are in a function foo and you ask to go until a line in mysquare,
GDB should see if foo has any code that identifies itself as coming
from that line in mysquare, and it should put the temp breakpoint there.
If foo contains two inlined calls to mysquare, GDB should put a
temp breakpoint in each of them, so that the program will stop at
whichever one it reaches.
- gcc and inline [was: Re: New function for gdb-ui.el?], (continued)
- gcc and inline [was: Re: New function for gdb-ui.el?], Tomas Zerolo, 2005/10/26
- Re: gcc and inline [was: Re: New function for gdb-ui.el?], Eli Zaretskii, 2005/10/26
- Re: gcc and inline [was: Re: New function for gdb-ui.el?], Andreas Schwab, 2005/10/26
- Re: gcc and inline [was: Re: New function for gdb-ui.el?], Tomas Zerolo, 2005/10/27
- Re: gcc and inline [was: Re: New function for gdb-ui.el?], Eli Zaretskii, 2005/10/27
- Re: gcc and inline [was: Re: New function for gdb-ui.el?], Richard M. Stallman, 2005/10/27
- Re: gcc and inline [was: Re: New function for gdb-ui.el?], Eli Zaretskii, 2005/10/28
- Re: gcc and inline [was: Re: New function for gdb-ui.el?], Tomas Zerolo, 2005/10/28
- Re: gcc and inline [was: Re: New function for gdb-ui.el?], Miles Bader, 2005/10/28
- Re: New function for gdb-ui.el?, Eli Zaretskii, 2005/10/26
- Re: New function for gdb-ui.el?,
Richard M. Stallman <=
- Re: New function for gdb-ui.el?, David Hansen, 2005/10/28
- Re: New function for gdb-ui.el?, Miles Bader, 2005/10/28
- Re: New function for gdb-ui.el?, Nick Roberts, 2005/10/28
- Re: New function for gdb-ui.el?, David Hansen, 2005/10/29
- Re: New function for gdb-ui.el?, Nick Roberts, 2005/10/29
- Re: New function for gdb-ui.el?, Miles Bader, 2005/10/29
- Re: New function for gdb-ui.el?, Nick Roberts, 2005/10/30
- Re: New function for gdb-ui.el?, Eli Zaretskii, 2005/10/26
- Re: New function for gdb-ui.el?, Eli Zaretskii, 2005/10/25
Re: New function for gdb-ui.el?, Kim F. Storm, 2005/10/23