The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
multiprocess debugger rvan High Level Programming 1 07-20-2007 01:14 AM
unix debugger naamas03 UNIX for Dummies Questions & Answers 1 09-14-2006 10:31 AM
Kernel debugger sriram.ec UNIX for Advanced & Expert Users 0 03-23-2006 04:06 AM
where to get Kernel debugger sriram.ec UNIX for Advanced & Expert Users 0 03-22-2006 07:51 AM
ADB Debugger On Unix surya321 High Level Programming 4 03-09-2002 09:44 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 12-03-2001
Registered User
 

Join Date: Oct 2001
Location: Germany
Posts: 7
wdb debugger

Hi all,
is it possible to skip a function with the wdb debugger ?
could be helpful instead of compiling the whole bunch again
does someone know how to do this ?

thx

Sven
Reply With Quote
Forum Sponsor
  #2  
Old 12-03-2001
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
As I understand it, wdb is just a front-end to gdb. If so, you can "jump" past any function easily. For example, if you are debugging the following code:

Code:
printf("hello, world\n");
this_is_my_function();
printf("goodbye, world\n");
as you are stepping through the code -- lets say you are at line 1 -- you can enter "jump 3" to jump immediately to line 3 thereby skipping line 2 and the function call entirely. If you want to automatically skip a function as the program runs (with no input needed), you might give the following commands to the debugger:

Code:
break this_is_my_function
commands
return
continue
end
That would tell gdb to stop at the specified function, and automatically execute the commands "return" and "continue" which would have the same effect as skipping the function entirely.
Reply With Quote
  #3  
Old 12-05-2001
Registered User
 

Join Date: Oct 2001
Location: Germany
Posts: 7
Quote:
Originally posted by PxT
As I understand it, wdb is just a front-end to gdb. If so, you can "jump" past any function easily. For example, if you are debugging the following code:

Code:
printf("hello, world\n");
this_is_my_function();
printf("goodbye, world\n");
as you are stepping through the code -- lets say you are at line 1 -- you can enter "jump 3" to jump immediately to line 3 thereby skipping line 2 and the function call entirely. If you want to automatically skip a function as the program runs (with no input needed), you might give the following commands to the debugger:

Code:
break this_is_my_function
commands
return
continue
end
That would tell gdb to stop at the specified function, and automatically execute the commands "return" and "continue" which would have the same effect as skipping the function entirely.

And how do i get the line number ? where im currently at ?
Reply With Quote
  #4  
Old 12-05-2001
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
In gdb as you step through the code the line numbers are displayed. You can type "l" or "list" to see a block of code around the current line. You can type "bt" or "backtrace" to see the function stack.
Reply With Quote
  #5  
Old 12-07-2001
Registered User
 

Join Date: Oct 2001
Location: Germany
Posts: 7
thx helped very much
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:20 AM.


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