2013年8月31日星期六

The use of embedded gdb

1, pc client to use gdb, embedded board using gdbserver, because the board procedures used SIGALARM, second gdbserver will be interrupted, ask gdbserver how to shield this interrupt that does not affect the normal debugging?
2, how to program embedded in the pc side set a breakpoint? pc-gdb need to load the embedded-source? Or executable programs?

3, in addition to a little puzzled, embedded arm end use gdbserver at compile time did not involve platform options (arm9, arm11, arm cortex A8, etc.), gdbserver (or gdb) is How to obtain its register? Different platforms which registers should be different ah. . .
------ Solution ---------------------------------------- ----
first question seems to be in the gdb command line:
handle SIGALARM nostop noprint
try.
------ Solution --------------------------------- -----------
2 executable file containing debug information, or disassemble seemingly only see the information (as can tune, I have not tried)
- ----- Solution --------------------------------------------
gdb not understand, nor how multithreaded used.
Recommend quote posts so people can be notified to the post (in csdn notification icon), like me now. might be able to more effectively help you solve :).
someone else worry about the little deliberate Huitie own, but missed. Anyway csdn such a "quote = notice" I was not really know the logic: P

Consult / summon greatly:





------ For reference only ---------------------------------- -----
Upstairs two, thank you, you are good




Upstairs two, thank you, you are good
------ For reference only ---------------------------------------
While debuging a remote ; multithread program by means of gdb / gdbserver, frequently I see gdb complaints like this:

Program received signal SIG32, Real-time event 32.
0x400d7e84 in?? ()
(gdb)

Then gdb is suspended to wait for new commands, and on this occasion, typing 'c' can make the debuging continue . But instruction 'info threads' can not list correct information.

In fact, this results from stripped libpthread / libthread_db, which can be easily verified by means of '/ usr / bin / file'. ; To remove the problem, simply refer the libs to unstripped versions via gdb instructions like:

set solib-absolute-prefix [dir]

set solib-search-path [dir1]; [dir2]

As indicated above, my program is multi-threaded, when you start debugging the issue on appeal; Some say the Internet directly
handle SIG32 nostop noprint pass can be solved, but wanted to know why there is this SIG32, E text description above said strriped library problems, do not understand, you have to know < br> ------ For reference only ---------------------------------------
set solib-absolute-prefix Why gdb to set the shared library? Is the gdb settings or settings for gdbserver?

没有评论:

发表评论