LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-01-2009, 10:56 AM   #1
pamparana
LQ Newbie
 
Registered: Apr 2009
Posts: 2

Rep: Reputation: 0
Debugging a GUI application with gdb


Hello everyone,

I need to debug a gui application with gdb but have run into some problems.

So, I invoke gdb as follows:

gdb [application]
and at the gdb prompt
run [application]

Now, the problem is that the application takes over and I do not get a gdb prompt anymore. I can get the prompt by typing Ctrl+z but then I cannot reactivate my application anymore even after typing Continue or whatever. It is really strange. I need to debug a shared object and gdb does not allow me to put breakpoints before I type run and then I have no opportunity to do it anymore!

Does anyone know how I can work around this??! I am really going crazy over this problem.

I am using Cent OS 5 and using the GNU gdb 6.5.

Would really appreciate some help on this.

/Luca
 
Old 04-01-2009, 11:36 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Just put a breakpoint somewhere.
To put a breakpoint right at the start:

gdb [application]
and at the gdb prompt
br main
run [application]
 
  


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
thread debugging gdbserver gdb 256Doofus Linux - Embedded & Single-board computer 6 04-13-2009 06:13 AM
Debugging Problem in Gdb akm3 Programming 5 01-01-2009 10:03 AM
debugging remote process in gdb arunachalam Linux - Software 2 02-18-2008 10:27 PM
using GDB for remote kernel debugging vibhooti Linux - Software 0 04-23-2007 01:17 AM
Difference between kernel - debugging and application debugging topworld Linux - Software 2 03-30-2006 12:50 AM

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

All times are GMT -5. The time now is 09:35 AM.

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
Open Source Consulting | Domain Registration