🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3519

gdb can't locate breakpoint of inline function

#3519
From: Fred Ma
Date: Wed, 16 Apr 2003 05:33
22 lines
1916 bytes
Hello,

I'm using g++ 3.2.1 on solaris 8.  I used both
-g and "-gstabs+ -DDBUG" options to get extra
gnu debugging information.  The problem I'm
seeing is that I can't view the source code and
step through it if I set a breakpoint on an inline
function (gdb 5.3).  If I try to display the frame,
it just shows the starting point of main.  However,
if I make the same function non-inline and move
it from its hpp file to a cpp file, I can breakpoint
at that function and view the source code.

Normally, I'd just assume that inline functions
can't be viewed at the source level.  But it turns
out that inline member functions of a class *can*
have a breakpoint set on it, and I can view the
source code.  Maybe it's because member
functions are special.  Is this normal gdb
behaviour?

Fred
Technical Details
Message-ID: <3E9CEB44.680118E6@doe.carleton.ca>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news.uunet.ca!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,befedf9fb6f7d8c1,start
X-Google-Attributes: gid11318c,public
X-Google-Thread: fc89c,befedf9fb6f7d8c1,start
X-Google-Attributes: gidfc89c,public
X-Google-ArrivalTime: 2003-04-15 22:54:34 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news.uunet.ca!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail
Message-ID: <3E9CEB44.680118E6@doe.carleton.ca>
From: Fred Ma <fma@doe.carleton.ca>
X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.unix.programmer,gnu.gcc.help
Subject: gdb can't locate breakpoint of inline function
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 23
Date: Wed, 16 Apr 2003 01:33:56 -0400
NNTP-Posting-Host: 64.230.66.248
X-Complaints-To: abuse@sympatico.ca
X-Trace: news20.bellglobal.com 1050471560 64.230.66.248 (Wed, 16 Apr 2003 01:39:20 EDT)
NNTP-Posting-Date: Wed, 16 Apr 2003 01:39:20 EDT
Organization: Bell Sympatico