dbx has a gdb mode. It supports most gdb commands. To turn it on, at the dbx prompt, type this
(dbx) gdb on
And as usual, this can be automated by creating a .dbxrc and putting 'gdb on' there.
Now all the gdb commands such as c, b, i can be used.
If you want to step over a few lines of code without recompiling, use cont at
(dbx) cont at 221
will continue the program at line 221, skipping all the code between current line and 221.
r doesn't works for run though, and thats because its already set as an alias to something else.
pwd='kprint -r "$PWD"'
r='fc -e -'
suspend='kill -STOP $$'
But if you wish, you can redefine it to run
(dbx) alias r run
(And to make this permanent, put it in .dbxinit)
dbx also supports histories, accessed as usual using history and !!.
Conditional breakpoints are also supported. To set one, first set a normal breakpoint, e.g.
(dbx) b code.c:2197
(dbx) i b
 stop at "code.c":2197
and then make it conditional
(dbx) cond 1 'codePtr->id==12'
That's it, for this post.
Loved readingg this thank you
Post a Comment