2011-01-19

Set Eclipse to Find Target Libraries Correctly

When doing remote debug with gdbserver, Eclipse needs to know the location of the libraries of target. There's no direct place to tell Eclipse. This can be done by puting the information in 'gdbinit' file:

  set solib-absolute-prefix /path/to/target/nfsroot

And tell Eclipse to read this file in Debug Configurations dialog tab Debugger -> Main, by item "GDB command file:".
This also resolves some error messages on target reported by gdbserver like below:

# gdbserver 192.168.1.250:10000 ./controller
Process ./controller created; pid = 588
Listening on port 10000
Remote debugging from host 192.168.1.2
gdb: error initializing thread_db library: version mismatch between libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between libthread_db and libpthread
gdb: error initializing thread_db library: version mismatch between libthread_db and libpthread

No comments:

Post a Comment