LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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
  Search this Thread
Old 09-28-2006, 03:47 PM   #1
astropirhana
LQ Newbie
 
Registered: Jul 2006
Distribution: Debian 3.X
Posts: 14

Rep: Reputation: 0
gdb hangs on function call


OS: Debian GNU/Linux 3.1
GNU gdb 6.3-debian

I wrote a program that has 3 source files.

I am calling an external function in one of my source files (function from a different source file).

When I run the executible, there is no problem.

When I debug, however and try to step into the extern,
it hangs up indefineitely. It will not recover.

I am purely command line, no X - Windows here.

I believe that it may have to do with updating symbols at this point.

Is there a good way to do this?

Astro

Last edited by astropirhana; 09-28-2006 at 04:28 PM.
 
Old 09-29-2006, 02:51 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 110Reputation: 110
Maybe you forgot to compile the other source file with gcc's "-g" option, and the function you called from the other source file hangs (infinite loop or blocking syscall or so...) ??
 
Old 09-29-2006, 09:01 AM   #3
astropirhana
LQ Newbie
 
Registered: Jul 2006
Distribution: Debian 3.X
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for your response,
I do compile with the -g option.

Not blocking or looping just stepping into the function.

I am also noting that it takes a while to execute TCP/IP functions in the debugger.

Why would it hang this way?


Astro
Solved: Not really sure why, but the debugger seems to have updated the symbol file on its own.
Theories are welcome though.

Last edited by astropirhana; 09-29-2006 at 02:32 PM.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to step through function in shared object library using gdb markhod Programming 2 01-03-2009 03:00 AM
understanding gdb output of a C function in disassembled form. koodoo Programming 7 04-12-2006 11:55 AM
How to call another function from a function? geminigal Programming 4 04-21-2005 11:41 PM
gdb won't single step thru the function frankie_DJ Programming 2 10-06-2004 06:50 AM
how to call function?? harpal Programming 3 04-29-2003 06:59 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:44 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration