From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31840 invoked by alias); 26 Jul 2008 05:58:35 -0000 Received: (qmail 31831 invoked by uid 22791); 26 Jul 2008 05:58:34 -0000 X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 26 Jul 2008 05:58:12 +0000 Received: from HOME-C4E4A596F7 ([84.229.112.15]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0K4L007FON91GF90@i_mtaout2.012.net.il> for gdb-patches@sourceware.org; Sat, 26 Jul 2008 08:58:13 +0300 (IDT) Date: Sat, 26 Jul 2008 05:58:00 -0000 From: Eli Zaretskii Subject: Re: [FYI] Inlining support, rough patch In-reply-to: <20080725142551.GA15973@caradoc.them.org> X-012-Sender: halo1@inter.net.il To: Daniel Jacobowitz Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: References: <20080613152754.GA4220@caradoc.them.org> <20080715192020.GB3094@caradoc.them.org> <20080725142551.GA15973@caradoc.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-07/txt/msg00472.txt.bz2 > Date: Fri, 25 Jul 2008 10:25:51 -0400 > From: Daniel Jacobowitz > Cc: gdb-patches@sourceware.org > > > This is IMO too negative: you state several problems and never hint on > > how to work around them. Please consider suggesting such workarounds > > in each one of the above 3 situations. Using breakpoints and returned > > values reported by `finish' are two very fundamental debugging > > techniques; telling the readers that they are simply unavailable will > > lead them to believe debugging code that uses inlined functions is > > next to impossible. > > Is this better? > > There are some ways that @value{GDBN} does not pretend that inlined > function calls are the same as normal calls: > > @itemize @bullet > @item > You cannot set breakpoints on inlined functions. @value{GDBN} > either reports that there is no symbol with that name, or else sets the > breakpoint only on non-inlined copies of the function. This limitation > will be removed in a future version of @value{GDBN}; until then, > set a breakpoint by line number on the first line of the inlined > function instead. > > @item > Setting breakpoints at the call site of an inlined function may not > work, because the call site does not contain any code. @value{GDBN} > may incorrectly move the breakpoint to the next line of the enclosing > function, after the call. This limitation will be removed in a future > version of @value{GDBN}; until then, set a breakpoint on an earlier line > or inside the inlined function instead. > > @item > @value{GDBN} cannot locate the return value of inlined calls after > using the @code{finish} command. This is a limitation of compiler-generated > debugging information; after @code{finish}, you can step to the next line > and print a variable where your program stored the return value. > > @end itemize Yes, thanks.