Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > view registers in Terminal window with gdb?

view registers in Terminal window with gdb?
Thread Tools
Mac Enthusiast
Join Date: Jul 2002
Status: Offline
Reply With Quote
Apr 11, 2003, 02:34 AM
 
Is there a way to have a "live" view of registers while stepping through code in gdb in the Terminal? The distribution that comes with X doesn't appear to be configured with --enable-tui...
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
Apr 11, 2003, 03:43 AM
 
create a text file in your home directory called ".gdbinit". Give it the following contents:
source /usr/libexec/gdb/plugins/MacsBug/gdbinit-MacsBug


Make sure that your terminal window is nice'n'large and type 'mb'. Type 'mb' again to get out. 'help macsbug' to see your newly installed commands (mostly stuff for stepping through ASM).

If you use the step commands ('so' and 'si', you'll get a live register display without needing to enter the 'mb' mode.
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Mac Enthusiast
Join Date: Jul 2002
Status: Offline
Reply With Quote
Apr 11, 2003, 04:17 AM
 
Exactly what I needed, thanks.
     
   
Thread Tools
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -5. The time now is 03:23 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2