Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Inability to view a header file source in a debugger

Reply
Thread Tools

Inability to view a header file source in a debugger

 
 
Generic Usenet Account
Guest
Posts: n/a
 
      03-14-2006
In our environment we have several C++ header files that have some
inline member function definitions. For some reason, I am unable to
step through the source code of those member functions in my debugger
(Insight debugger, which is a GUI front-end to GDB version 5.3). In
fact, when I try to view the header file, all I see is assembly
language. There is another header file in the same directory, which
does not have any inline member function definitions. I am able to
view that header file just fine. Since the only difference between the
two files is the fact that in one header file inline member functions
are defined, while they are not in the other header file, I suspect
that my inability to see the source code in the header file has
something to do with inlining. BTW, the source code is compiled with
the -g option, and we are not stripping the executable.

Does anyone have any idea under what circumstances will source files
not be viewable in a debugger?

Thanks,
Song

 
Reply With Quote
 
 
 
 
Puppet_Sock
Guest
Posts: n/a
 
      03-14-2006
Generic Usenet Account wrote:
[debugger question]

You will get better help by posting this in a news group where
they talk about your particular development platform. Here we
only talk about language issues for standard C++. You want
a news group that deals with your compiler/debugger. You
could start with a search at groups.google.com.
Socks

 
Reply With Quote
 
 
 
 
Phlip
Guest
Posts: n/a
 
      03-14-2006
Generic Usenet Account wrote:

> (Insight debugger, which is a GUI front-end to GDB version 5.3)


You need to use Google to find a forum responsible for that debugger.

This newsgroup is only qualified to answer questions about the raw C++
language itself. If I took a guess and were wrong (what are the odds??),
others here would not be able to correct me.

Posting to the most topical newsgroup or mailing list is in your best
interest.

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
 
Reply With Quote
 
Jacek Dziedzic
Guest
Posts: n/a
 
      03-15-2006
Generic Usenet Account wrote:
> In our environment we have several C++ header files that have some
> inline member function definitions. For some reason, I am unable to
> step through the source code of those member functions in my debugger


Pardon my ignorance, but if these functions are _inlined_,
*what* do you expect to step through? Isn't it the case of
"if you optimized it, forget debugging it"?

- J.
 
Reply With Quote
 
Phlip
Guest
Posts: n/a
 
      03-15-2006
Jacek Dziedzic wrote:

> Generic Usenet Account wrote:
>> In our environment we have several C++ header files that have some
>> inline member function definitions. For some reason, I am unable to
>> step through the source code of those member functions in my debugger

>
> Pardon my ignorance, but if these functions are _inlined_,
> *what* do you expect to step through? Isn't it the case of
> "if you optimized it, forget debugging it"?


Inline doesn't mean the opcodes are inlined. It means the function is
excempt from aspects of the "one definition rule" that ordinarily says a
function's body must appear in only one translation unit.

A compiler has an easier time optimizing such a function, typically by
inlining its opcodes. And compiling with the -g option probably enabled
such optimization. So, turn off -g, or wait for a debugger that can track
raw opcodes back to their inlinable function definitions.

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
baffled by inability to debug asp.net page =?Utf-8?B?Q2hhcmxlc0E=?= ASP .Net 5 03-02-2007 04:51 PM
recurring inability to connect Jeff Wireless Networking 2 07-18-2006 09:25 PM
Inability to follow good programming practice by qualifying a pointer parameter with 'const' hzmonte@hotmail.com C Programming 18 11-15-2005 01:45 PM
Inability to access web site William Matthewson Computer Support 3 10-27-2004 06:27 PM
inability to install win sp1a............... cearl Computer Support 7 07-17-2003 09:40 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57