I am using X-server on Linux tutnix 3.13.0-30-generic #54-Ubuntu i686 i686 GNU/Linux
.
On X-server i am using schroot to change the root and after that I run my application on it.
Now the problem is I am trying to run gdbserver
(version 6.7.1) on X-server(say it remote machine) and gdb
(version 7.7) on Ubuntu machine(local machine or the machine where X-server is running), but its not working.
This is what I tried so far:-
executed below commands on remote machine
- MY_Application &
- gdbserver localhost:8888 --attach process_id
executed below commands on local machine
- gdb ./MY_Application
- (gdb)target remote :8888
Now on local machine gdb is showing this message
Could not load shared library symbols for 20 libraries, e.g. /usr/lib/libqt.so.3.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
As far as understand it, gdb is not able to load the shared libraries and there are 20 of them. As a result of this I am not able to find the symbols present in these shared libraries.
I tried to load the symbols from library files on local machine using symbol-file
command on gdb
but that leads to address mismatch
So I used the below command
- (gdb)set sysroot remote:/
but it is again showing an error message
Could not open 'remote:/usr/local/davis/lib/usr/lib/libqt.so.3' as an executable file: Function not implemented
Can anyone please tell me what am I doing wrong here? If there is an alternate solution to load the symbols from shared libraries please suggest.
P.S. Both the MY_Application binaries are same.