* Debugging with linked shared libraries ....
[not found] <1130247165.27815.ezmlm@sources.redhat.com>
@ 2005-10-25 13:46 ` Roberto Brunelli
2005-10-25 13:55 ` Christophe LYON
0 siblings, 1 reply; 3+ messages in thread
From: Roberto Brunelli @ 2005-10-25 13:46 UTC (permalink / raw)
To: gdb
I apologize if this is not the correct place for posting.
I would like to debug a c++ program that links shared libraries (files)
in non standard places:
1. I set the LD_LIBRARY_PATH so that the program runs fine from my (c)sh
2. I execute
gdb myProg
3. but when I 'run'
> error while loading shared libraries: librandomLib.so: cannot open
> shared object file: No such file or directory
4. If I make the program generate a core and perform
gdb myProg core.xxxx
I read
> Reading symbols from
> >/hardmnt/..../randomLib/librandomLib.so...done.
and I am actually able to list the functions within the library and
to access data within the code of myProg.
What am I doing wrong??
Thanx a lot for any help!
--
<r/>
| Roberto Brunelli, Research Scientist
| TeV Group - ITC-irst
|
| 'You cannot manipulate a marionette with only one string'
| from Chapterhouse Dune, by F. Herbert
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Debugging with linked shared libraries ....
2005-10-25 13:46 ` Debugging with linked shared libraries Roberto Brunelli
@ 2005-10-25 13:55 ` Christophe LYON
0 siblings, 0 replies; 3+ messages in thread
From: Christophe LYON @ 2005-10-25 13:55 UTC (permalink / raw)
To: Roberto Brunelli; +Cc: gdb
> I would like to debug a c++ program that links shared libraries (files)
> in non standard places:
>
> 1. I set the LD_LIBRARY_PATH so that the program runs fine from my (c)sh
>
> 2. I execute
>
> gdb myProg
>
> 3. but when I 'run'
>
Presumably your .cshrc resets your LD_LIBRARY_PATH.
'run' starts a new shell, and thus sources your .cshrc.
You have to set your LD_LIBRARY_PATH in your .cshrc
Christophe.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Debugging with linked shared libraries ....
@ 2005-10-25 14:46 Kris Warkentin
0 siblings, 0 replies; 3+ messages in thread
From: Kris Warkentin @ 2005-10-25 14:46 UTC (permalink / raw)
To: 'Christophe LYON', Roberto Brunelli; +Cc: gdb
Best to 'set solib-search-path <path to my stuff>' in gdb. Try putting it
in your .gdbinit.
cheers,
Kris
> -----Original Message-----
> From: gdb-owner@sources.redhat.com
> [mailto:gdb-owner@sources.redhat.com] On Behalf Of Christophe LYON
> Sent: Tuesday, October 25, 2005 9:55 AM
> To: Roberto Brunelli
> Cc: gdb@sources.redhat.com
> Subject: Re: Debugging with linked shared libraries ....
>
>
> > I would like to debug a c++ program that links shared libraries
> > (files) in non standard places:
> >
> > 1. I set the LD_LIBRARY_PATH so that the program runs fine from my
> > (c)sh
> >
> > 2. I execute
> >
> > gdb myProg
> >
> > 3. but when I 'run'
> >
>
> Presumably your .cshrc resets your LD_LIBRARY_PATH.
> 'run' starts a new shell, and thus sources your .cshrc.
>
> You have to set your LD_LIBRARY_PATH in your .cshrc
>
> Christophe.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-10-25 14:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1130247165.27815.ezmlm@sources.redhat.com>
2005-10-25 13:46 ` Debugging with linked shared libraries Roberto Brunelli
2005-10-25 13:55 ` Christophe LYON
2005-10-25 14:46 Kris Warkentin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).