Dbx Based on the AIX 6.1 platform (we recommend that you directly view the help on the official website)
Start debugging
Command |
Description |
Dbx [pro] |
Debug unstarted program pro |
Dbx-A [pid] |
Debug a running process (PID) |
Detach |
Exit and debug the program (but do not exit DBX), so that the program continues to run |
Quit |
Exit dbx |
Command breakpoint during debugging
Command |
Description |
Cont |
Continue execution from the current breakpoint until the next breakpoint (if there is a next breakpoint) |
Delete |
Delete a breakpoint, as shown in figure Delete 1st breakpoints (you can use 'status' to find the breakpoint number ): (DBX) delete 1 |
Status |
Show all current breakpoints |
Stop in Function Stop at "file": Line |
Set breakpoints, as shown in figure Set the breakpoint at the function myfunc: (DBX) Stop in myfunc Set a breakpoint in row 100th of the source file main. C: (DBX) stop at "Main. c": 100 |
Use + [path] |
Add the source code search path of the program, such as use + ../src/OS |
Show Code
Command |
Description |
List |
Displays the currently executed code, as shown in figure 10 to 20 lines of code are displayed for the current file: (DBX) List 10, 20 |
Use + [path] |
Add the source code search path of the program, such as use + ../src/OS |
Multithreading
Command |
Description |
Thread |
Display All current threads, as shown in figure(dbx) thread thread state-k wchan state-u k-tid mode held scope function $t1 wait 0xf1000f0a1004a540 blocked 77922367 k no sys >$t2 run running 62128185 k no sys __fd_select $t3 wait running 76873903 k no sys Display details of thread 1: (dbx) thread info 1 thread state-k wchan state-u k-tid mode held scope function $t1 wait 0xf1000f0a1004a540 blocked 77922367 k no sys general: pthread addr = 0x00000001100aa2f8 size = 0x488 vp addr = 0x00000001100ac548 size = 0x330 thread errno = 0 start pc = 0x100002b04 joinable = yes pthread_t = 1 scheduler: kernel = user = 1 (other) nice = 60 event : event = 0x0 cancel = enabled, deferred, not pending stack storage: base = 0xfffffff00000000 size = 0xfffff910 limit = 0xffffffffffff910 sp = 0xffffffffffff610 |
References:
Ibm aix 6.1 Information Center: dbx