LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 06-20-2010, 02:25 PM   #1
sixstringking
LQ Newbie
 
Registered: Jun 2010
Posts: 1

Rep: Reputation: 0
gdb: "classname does not have any method named..."


Hi all,

Programming in C++ on Fedora 13, I have a console app with code spread throughout a half dozen files.

Debugging with gdb, I want to list the code from a class-member function so, at the gdb prompt I type:

list 'classn

and when I press <tab>, gdb completes the classname for me:

list 'classname

Next, I add the scope resolution operator and then type the first few characters of the function name and again press <tab>. gdb completes the function name and adds on the parameters list and even puts the final single-quote at the end of the line:

list 'classname::functionname(paramater list...)'

...but when I press enter I get an error message stating that "classname does not have any method named functionname" which seems like a strange complaint considering that gdb did most of the typing.

Similarly, trying to set a breakpoint at the top of this function yields this:

"Make breakpoint pending on future shared library load?"

As an aside: I am compiling all units with the -gstabs flag ( plain ol' -g didn't seem to get the job done.)

Thanks
 
Old 06-21-2010, 11:08 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,858
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Maybe it's an inline function? If so, you wouldn't necessarily be able to step into it.

STRONG SUGGESTION:
See if you can reproduce the problem with a simple test case, and post the full code (of the small test program) here.

Good luck .. PSM
 
  


Reply

Tags
c++, gdb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't locate object method "splitpath" via package "PACK001" at /usr/lib/perl5/5.8.8/ sajigeorge Linux - Software 1 01-11-2009 06:33 AM
gdb error "Failed to read a valid object file image from memory." Fejimush Programming 0 03-11-2007 01:40 PM
perl install error: Can't locate object method "new" via package "Module::Build::Vers powah Linux - Software 0 10-24-2006 01:57 PM
Can't locate object method "splitpath" via package "File::Spec" RobJohnston Linux - General 2 06-28-2003 09:59 AM
gdb assembly dump "i386-slackware-linux" centr0 Linux - General 0 06-11-2003 11:44 AM


All times are GMT -5. The time now is 04:37 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration