five points for gdb over dbx knowledge

I used to work with dbx for debugging any code realated bug but last project I had worked with gdb as project was for linux platform. Here are five points for gdb, need to consider too for dbx users

1) To check any hex dump for a void * type of variable use following command in gdb
(gdb) x/256xb buffer
where 256 is the size of buffer that you could change as per your requirement.

2) gdb supports all the short cuts that we used to do in bash shell like command search for ctrl+r.

3) T check what is in the processor registers
info registers

4) I see the assembly code my program is running use disassemble commad e.g.
disassemble main

5) For adding source path we are using directory command that was pathmap in dbx.

Advertisements
This entry was posted in Solaris/Linux. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s