SKGaur's Blog

January 25, 2010

five points for gdb over dbx knowledge

Filed under: Uncategorized — sumitkgaur @ 10:24 am

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.

Advertisement

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

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 )

Connecting to %s

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.