Article View: comp.unix.programmer
Article #3520Re: gdb can't locate breakpoint of inline function
From: Dennis Melentyev
Date: Wed, 16 Apr 2003 06:43
Date: Wed, 16 Apr 2003 06:43
31 lines
2583 bytes
2583 bytes
Hello, Fred! You wrote on Wed, 16 Apr 2003 01:33:56 -0400: FM> Hello, FM> I'm using g++ 3.2.1 on solaris 8. I used both -g and "-gstabs+ FM> -DDBUG" options to get extra gnu debugging information. The problem FM> I'm seeing is that I can't view the source code and step through it FM> if I set a breakpoint on an inline function (gdb 5.3). If I try to FM> display the frame, it just shows the starting point of main. FM> However, if I make the same function non-inline and move it from its FM> hpp file to a cpp file, I can breakpoint at that function and view FM> the source code. I'm almost sure you have -O flag in command line. Remove it, or gdb will not be able to stop at most methods in *.h files. If this is not your case - I'm sorry. FM> Normally, I'd just assume that inline functions can't be viewed at FM> the source level. But it turns out that inline member functions of FM> a class *can* FM> have a breakpoint set on it, and I can view the source code. Maybe FM> it's because member functions are special. Is this normal gdb FM> behaviour? FM> Fred -- Dennis Melentyev SW Developer @ KSF, Kiev, Ukraine www.ksfltd.com UIN: 83986781
Technical Details
Message-ID:
<b7iu1n$6ff$1@queen.ksf.kiev.ua>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.kiev.sovam.com!Svitonline.COM!news2.dg.net.ua!bn.utel.com.ua!carrier.kiev.ua!faire.ksf.kiev.ua!not-for-mailReferences:
<3E9CEB44.680118E6@doe.carleton.ca>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,befedf9fb6f7d8c1 X-Google-Attributes: gid11318c,public X-Google-Thread: fc89c,befedf9fb6f7d8c1 X-Google-Attributes: gidfc89c,public X-Google-ArrivalTime: 2003-04-15 23:50:04 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.kiev.sovam.com!Svitonline.COM!news2.dg.net.ua!bn.utel.com.ua!carrier.kiev.ua!faire.ksf.kiev.ua!not-for-mail From: "Dennis Melentyev" <dennis@ksf.kiev.ua> Newsgroups: comp.unix.programmer,gnu.gcc.help Subject: Re: gdb can't locate breakpoint of inline function Date: Wed, 16 Apr 2003 09:43:03 +0300 Organization: KSF Lines: 32 Message-ID: <b7iu1n$6ff$1@queen.ksf.kiev.ua> References: <3E9CEB44.680118E6@doe.carleton.ca> NNTP-Posting-Host: aerosmith.ksf Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: queen.ksf.kiev.ua 1050475383 6639 192.168.168.139 (16 Apr 2003 06:43:03 GMT) X-Complaints-To: newsmaster@ksf.kiev.ua NNTP-Posting-Date: Wed, 16 Apr 2003 06:43:03 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 FL-Build: Fidolook Express 2001 UIExt. BuildID: 3BC00FAD (7/10/2001 11:17:49). X-Comment-To: Fred Ma