Could you explain me or point me to a doc to debug a shared library?
Thanks,
Alain.
Could you explain me or point me to a doc to debug a shared library?
Thanks,
Alain.
there should be some notes in qdn.qnx.com
it’s basically fairly easy:
look at the following directives in gdb/ddd:
set auto-solib-add 1 # for auto loading of symbols from .so’s
set solib-search-path blah
set solib-absolute-prefix blah
when you’re up, use ‘info shared’ to see what is loaded and if you got
the symbols or not.
i also sometimes use ‘set stop-on-solib-events 1’ so that every access
to a shared object will be a breakpoint
there is also the ‘shared’ command to load symbols from specific
files.
Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:
Could you explain me or point me to a doc to debug a shared library?
Thanks,
Alain.
–
Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579
Randy Martin a écrit :
there should be some notes in qdn.qnx.com
it’s basically fairly easy:
look at the following directives in gdb/ddd:
set auto-solib-add 1 # for auto loading of symbols from .so’s
set solib-search-path blah
set solib-absolute-prefix blahwhen you’re up, use ‘info shared’ to see what is loaded and if you got
the symbols or not.i also sometimes use ‘set stop-on-solib-events 1’ so that every access
to a shared object will be a breakpointthere is also the ‘shared’ command to load symbols from specific
files.Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Could you explain me or point me to a doc to debug a shared library?Thanks,
Alain.–
Randy Martin > randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems > www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579
i don’t know what’s wrong but it doesn’t work well. Now symbols are loaded,
but when the shared library’s source files are loaded, only a part of the
file is loaded (the beginning), and I get the following messages:
Single stepping until exit from function gesecr, which has no line
information
If I try to lookup one of the files, for example gesecr.c, I get
Line 1 of “/home/alain/src/gesecr/gesecr/gesecr.c” is at address 0xb0359646
<ge_SaisieNombre+134> but contains no code.
The information is very strange and it’s impossible to step in it!
My application is of course linked with the debug version of the library
and the library loaded is the debug version.
Thanks,
Alain.
does ‘info shared’ indicate success on loading everything?
is the path to your source okay?
i don’t know why it isn’t working for you with information posted… one thing
you could try is a very simple debug .so and make sure that a ‘helloworld’
app that uses it debugs okay.
Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:
Randy Martin a cerit :
there should be some notes in qdn.qnx.com
it’s basically fairly easy:
look at the following directives in gdb/ddd:
set auto-solib-add 1 # for auto loading of symbols from .so’s
set solib-search-path blah
set solib-absolute-prefix blahwhen you’re up, use ‘info shared’ to see what is loaded and if you got
the symbols or not.i also sometimes use ‘set stop-on-solib-events 1’ so that every access
to a shared object will be a breakpointthere is also the ‘shared’ command to load symbols from specific
files.Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
Could you explain me or point me to a doc to debug a shared library?Thanks,
Alain.–
Randy Martin > randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems > www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579i don’t know what’s wrong but it doesn’t work well. Now symbols are loaded,
but when the shared library’s source files are loaded, only a part of the
file is loaded (the beginning), and I get the following messages:Single stepping until exit from function gesecr, which has no line
informationIf I try to lookup one of the files, for example gesecr.c, I get
Line 1 of “/home/alain/src/gesecr/gesecr/gesecr.c” is at address 0xb0359646
ge_SaisieNombre+134> but contains no code.The information is very strange and it’s impossible to step in it!
My application is of course linked with the debug version of the library
and the library loaded is the debug version.Thanks,
Alain.
–
Randy Martin randy@qnx.com
Manager of FAE Group, North America
QNX Software Systems www.qnx.com
175 Terence Matthews Crescent, Kanata, Ontario, Canada K2M 1W8
Tel: 613-591-0931 Fax: 613-591-3579