The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 08:42 AM
Display a particular line from a file Rohini Vijay Shell Programming and Scripting 5 07-31-2006 07:27 AM
Unable to display the date-time in seconds on AIX me_haroon AIX 6 07-11-2006 09:18 AM
xhost unable to open display ymg UNIX for Advanced & Expert Users 5 05-22-2006 02:31 AM
xhost: unable to open display???? soestx UNIX for Dummies Questions & Answers 5 05-03-2005 04:18 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-16-2006
gauri gauri is offline
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
  #2 (permalink)  
Old 01-16-2006
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,796
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.
  #3 (permalink)  
Old 01-16-2006
gauri gauri is offline
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
  #4 (permalink)  
Old 04-19-2007
tantric tantric is offline
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 !!
  #5 (permalink)  
Old 04-19-2007
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,209
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On




All times are GMT -4. The time now is 01:17 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0