The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
unable to use command line to cd or ls bosh UNIX for Dummies Questions & Answers 3 03-08-2008 05:42 AM
Display a particular line from a file Rohini Vijay Shell Programming and Scripting 5 07-31-2006 04:27 AM
Unable to display the date-time in seconds on AIX me_haroon AIX 6 07-11-2006 06:18 AM
xhost unable to open display ymg UNIX for Advanced & Expert Users 5 05-21-2006 11:31 PM
xhost: unable to open display???? soestx UNIX for Dummies Questions & Answers 5 05-03-2005 01:18 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 01-15-2006
Registered User
 

Join Date: Apr 2005
Posts: 42
unable to display the souce line in gdb

Hi All,

I am unable to display the code in gdb. When i put list command i dont get any line. I mean i am unable to display the source line in gdb.

Can any body help me.

Thanks & Regards
Gauri
Reply With Quote
Forum Sponsor
  #2  
Old 01-15-2006
vino's Avatar
Supporter (in vino veritas)
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,683
Some of the things which need to be done before your run your application in gdb.

Make sure the application is compiled with the -ggdb flag. Minimally the -g flag should be there. None of -O flags should be present.

Try running your app and see if you can see the source code displayed.
Reply With Quote
  #3  
Old 01-15-2006
Registered User
 

Join Date: Apr 2005
Posts: 42
Hi Vino,

Thanks for the reply. But i have just exe file. How can i check these flags in a complied version.

Thanks & Regards
Gauri
Reply With Quote
  #4  
Old 04-19-2007
Registered User
 

Join Date: Apr 2007
Posts: 23
Hi, does anyone know how can I skip a loop 'n' number of times in gdb.

For e.g:

for (i= 0; i< 100; i++) {
...
}

Lets say I am single stepping the program and I reach this loop. Now I want to skip running the loop 10 times. (I do not want to single step inside the loop for the first 10 iterations)

Can I do that ?

Thank you !!
Reply With Quote
  #5  
Old 04-19-2007
reborg's Avatar
Administrator
 

Join Date: Mar 2005
Location: Ireland
Posts: 3,590
You should have created a new thread for this as it is a new topic. The simplest solution I can think of is to use a conditional breakpoint, where you would set the condition based on the value of i.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:47 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0