From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: New function for gdb-ui.el? Date: Wed, 26 Oct 2005 21:30:11 -0400 Message-ID: References: <17243.21638.138477.436126@kahikatea.snap.net.nz> <17244.34246.93773.562211@kahikatea.snap.net.nz> <17245.17271.523511.307415@kahikatea.snap.net.nz> <17246.47395.926373.263704@kahikatea.snap.net.nz> <17247.17729.366833.431749@kahikatea.snap.net.nz> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1130376744 10366 80.91.229.2 (27 Oct 2005 01:32:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 27 Oct 2005 01:32:24 +0000 (UTC) Cc: eliz@gnu.org, ich@frank-schmitt.net, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 27 03:32:21 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EUwcg-0001E1-Jl for ged-emacs-devel@m.gmane.org; Thu, 27 Oct 2005 03:32:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUwcg-0005fr-1g for ged-emacs-devel@m.gmane.org; Wed, 26 Oct 2005 21:32:06 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EUwar-000504-TA for emacs-devel@gnu.org; Wed, 26 Oct 2005 21:30:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EUwar-0004zd-7U for emacs-devel@gnu.org; Wed, 26 Oct 2005 21:30:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EUwar-0004zX-15 for emacs-devel@gnu.org; Wed, 26 Oct 2005 21:30:13 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EUwar-0001Yp-32 for emacs-devel@gnu.org; Wed, 26 Oct 2005 21:30:13 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1EUwap-0003db-Ue; Wed, 26 Oct 2005 21:30:11 -0400 Original-To: Nick Roberts In-reply-to: <17247.17729.366833.431749@kahikatea.snap.net.nz> (message from Nick Roberts on Wed, 26 Oct 2005 21:58:41 +1300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44931 Archived-At: 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.