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 > 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
symbolic debugger for UNIX cleopard HP-UX 3 07-10-2007 11:37 AM
unix debugger naamas03 UNIX for Dummies Questions & Answers 1 09-14-2006 02:31 PM
Unix GDB Debugger info kapi.goel UNIX for Advanced & Expert Users 1 01-13-2006 10:50 AM
how to use a c debugger in linux/unix wojtyla High Level Programming 1 02-18-2005 08:42 PM
wdb debugger Sven28 High Level Programming 4 12-07-2001 12:44 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-27-2002
surya321 surya321 is offline
Registered User
  
 

Join Date: Feb 2002
Location: India
Posts: 3
Question ADB Debugger On Unix

Hi guys,
I have posted this message on the UNIX begginers forum but on second thoughts felt that you all would know more about this as it has to do with debugging programs (cd be C). Anyways the doubt is
I want to print the values of the source level variables in the adb environment on Solaris platform, some command like the print variable name which is provided by the dbx environment.
I have tried with and w/o the -g compiled version of code with no success. If someone can throw some light on this it would be great ...........
regards
  #2 (permalink)  
Old 02-27-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,120
Adb doesn't know anything about source code and it ignores the information stored by the -g option. The only symbols it can find are external symbols.

If you to do source level debugging, you must use a source level debugger. You really need a strong grasp of assembly language to use adb. Sorry for the bad news.

(And I deleted your duplicate post.)
  #3 (permalink)  
Old 02-28-2002
surya321 surya321 is offline
Registered User
  
 

Join Date: Feb 2002
Location: India
Posts: 3
Even i thought so till i hit the
cm.bell-labs.com/7thEdMan/vol2/adb.bun site, on the 5th page it shows
*charp/s as the method to access the source level variables. But
it didnt work for me on Solaris.

Can u please suggest a few sites where i could find the details on debuggers(especially the adb) and how to choose which one and when(i mean the criteria for selection..). I am sorry if i am asking very trivial doubts, as i am new to debugging on the unix platform.
And thanks for deleting the other post. I wasnt sure where to post.
  #4 (permalink)  
Old 02-28-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,120
Well, that link you posted is actually a very good one! I'm gonna print that page out and add it to my library. The best docs I have found on adb is HP's adb manual. Search for it at docs.hp.com.

But let's take a look at a couple of quotes from your link...
Quote:
The request: $e
prints out the values of all external variables.
...
Therefore it is currently not possible to plant breakpoints at locations other than function entry points without a knowledge of the code generated by the C compiler.
Also, take a real good look at the sample program being debugged. Notice that all of the variables being debugged are externals. Few real programs are written like that. But those techniques being shown should work on Solaris for the same exact program.

As for symbolic debuggers, I don't know what to tell you. I have never heard of anyone shopping around for one. Each compiler comes with a debugger and I have always just gone with that. I have always assumed that the info deposited into a program by the -g option varies from compiler to compiler and therefore you can't mix and match compilers and debuggers. But now that I think of it, I'm not sure. There may be a standard.

And by the way, my idea of debugging is to just insert a few printf statements here and there as needed.
  #5 (permalink)  
Old 03-10-2002
loadc loadc is offline
Registered User
  
 

Join Date: Sep 2001
Posts: 40
adb

Just for historical reasons:


If you want the low down on adb on solaris and some really good uses for it, go on and get yo bad self:

PANIC! Unix System crash dump analysis


Great book and excellent tutorial on adb, and some really good background on how to handle panics and the core files for investigation of what your box did...



loadc
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 07:28 PM.


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