* Problem debugging SOs
@ 2002-08-23 2:43 Iztok
2002-08-23 7:53 ` Kevin Buettner
0 siblings, 1 reply; 8+ messages in thread
From: Iztok @ 2002-08-23 2:43 UTC (permalink / raw)
To: gdb
Version 5.0
Platform i386 Linux SuSE 7.0
I've got situation when shared object is loaded at runtime via the
dlopen function. GDB afterwards shows that the symbols from this shared
object are loaded but when trying to step into the function from this SO
nothing shows.
Full debugging info is included in SO.
How should I prepare the system to debug such SW ?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem debugging SOs
2002-08-23 2:43 Problem debugging SOs Iztok
@ 2002-08-23 7:53 ` Kevin Buettner
2002-08-26 2:43 ` Iztok Kobal
0 siblings, 1 reply; 8+ messages in thread
From: Kevin Buettner @ 2002-08-23 7:53 UTC (permalink / raw)
To: Iztok, gdb
On Aug 23, 11:43am, Iztok wrote:
> Version 5.0
> Platform i386 Linux SuSE 7.0
>
> I've got situation when shared object is loaded at runtime via the
> dlopen function. GDB afterwards shows that the symbols from this shared
> object are loaded but when trying to step into the function from this SO
> nothing shows.
>
> Full debugging info is included in SO.
>
> How should I prepare the system to debug such SW ?
I think you may be seeing a linker bug. Newer versions of gdb have
a fix to work around the bug, but gdb-5.0 did not.
For more information, see the threads associated with:
http://sources.redhat.com/ml/gdb/2001-08/msg00221.html
http://sources.redhat.com/ml/gdb-patches/2001-09/msg00003.html
The simple fix is to update to a newer version of gdb. Either 5.2
or the current development sources should be fine.
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Problem debugging SOs
2002-08-23 7:53 ` Kevin Buettner
@ 2002-08-26 2:43 ` Iztok Kobal
2002-08-26 8:43 ` Kevin Buettner
0 siblings, 1 reply; 8+ messages in thread
From: Iztok Kobal @ 2002-08-26 2:43 UTC (permalink / raw)
Cc: gdb
Thanks Kevin.
I am responding a little bit late since I was out of the office for the
week-end.
I have taken a look to the references you wrote and, yes, that is
exactly the thing that is happening. I have been also peep-ing into the
gdb's source code and the code-in-the-matter is already included into
the latest gdb-5.2.1 version which I am trying to use also.
I have been trying with the 5.1.x and lately 5.2.1 (downloaded from
ftp.gnu, configured without any options and compiled on my machine with
the gcc 2.95.x) with the something better and something worse success:
1. SO's symbol resolving is behaving slightly better. But !!! I have to
step into the function from the SO with the <Step Into Instruction> and
go through the whole SO resolving stuff to come into the function body -
instead of using simply Step Into command. And I have also changed my SO
dlopen-ing from RTLD_LAZY to the RTLD_NOW | RTLD_GLOBAL so I could have
presumed that the resolving stuff would not be executed anymore... with
no obvious difference.
2. <Step Into> generally does not work for me anymore - it usually
behaves as it was Step Over command really - I again have to execute
<Step Into Instruction> and after that <Step Into> to come into the
called function body. Pretty annoying, isnt't it ? Or setting the bunch
of the breakpoints all over the code so the whole debugging process
takes me a lot more than too much time.
I was starting to think that the problem was related to the gcc stub
info generation and I am going to try a gcc-3.0.4 instead of a 2.95.x
which came with my SuSE distro. Please spare me the time and tell me if
it would not work either !
Iztok
Kevin Buettner wrote:
> On Aug 23, 11:43am, Iztok wrote:
>
>
>
>> Version 5.0
>> Platform i386 Linux SuSE 7.0
>>
>> I've got situation when shared object is loaded at runtime via the
>> dlopen function. GDB afterwards shows that the symbols from this
>> shared object are loaded but when trying to step into the function
>> from this SO nothing shows.
>>
>> Full debugging info is included in SO.
>>
>> How should I prepare the system to debug such SW ?
>>
>
>
> I think you may be seeing a linker bug. Newer versions of gdb have
> a fix to work around the bug, but gdb-5.0 did not.
>
> For more information, see the threads associated with:
>
> http://sources.redhat.com/ml/gdb/2001-08/msg00221.html
> http://sources.redhat.com/ml/gdb-patches/2001-09/msg00003.html
>
> The simple fix is to update to a newer version of gdb. Either 5.2
> or the current development sources should be fine.
>
> Kevin
>
>
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem debugging SOs
2002-08-26 2:43 ` Iztok Kobal
@ 2002-08-26 8:43 ` Kevin Buettner
2002-08-26 22:41 ` Iztok Kobal
0 siblings, 1 reply; 8+ messages in thread
From: Kevin Buettner @ 2002-08-26 8:43 UTC (permalink / raw)
To: Iztok Kobal; +Cc: gdb
On Aug 26, 11:43am, Iztok Kobal wrote:
> I was starting to think that the problem was related to the gcc stub
> info generation and I am going to try a gcc-3.0.4 instead of a 2.95.x
> which came with my SuSE distro. Please spare me the time and tell me if
> it would not work either !
I don't know. I'm actually surprised that you're still having
problems. Clearly there's some kind of mismatch somewhere, but I
don't know where. When you figure out what it is, let me know!
Thanks,
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem debugging SOs
2002-08-26 8:43 ` Kevin Buettner
@ 2002-08-26 22:41 ` Iztok Kobal
2002-08-27 8:04 ` Kevin Buettner
0 siblings, 1 reply; 8+ messages in thread
From: Iztok Kobal @ 2002-08-26 22:41 UTC (permalink / raw)
Cc: gdb
Kevin Buettner wrote:
>On Aug 26, 11:43am, Iztok Kobal wrote:
>
>
>
>>I was starting to think that the problem was related to the gcc stub
>>info generation and I am going to try a gcc-3.0.4 instead of a 2.95.x
>>which came with my SuSE distro. Please spare me the time and tell me if
>>it would not work either !
>>
>>
>
>I don't know. I'm actually surprised that you're still having
>problems. Clearly there's some kind of mismatch somewhere, but I
>don't know where. When you figure out what it is, let me know!
>
Well, I took the sources for the gdb-5.0 from the original SuSE 7.0
distro, applied the patches found through the links that you have given
and it seems that the gdb-5.0-SOpatched works as it should regarding the
SO debugging. As well as the program debugging flow controls for the
gcc-2.95.2 compiled code.
I have tried to apply gcc-3.2 but I could not manage to compile
KDevelop-made project anymore for some reason so it is still unknown to
me why the gdb-5.2.1 does not work properly.
If you are still willing to make some suggestions, Kevin, let us start
from the scratch:
I have downloaded the gdb-5.2.1 sources from the ftp.gnu.org.
platform: i386 Linux SuSE 7.0
./configure (autodetected platform was i686-pc-linux-gnu)
make
did not make install
instead copy/rename gdb to the /usr/bin/gdb-5.2.1
in the /usr/bin ln -s gdb-5.2.1 gdb
code to be debugged was compiled with the gcc-2.95.2 -g3
No more problems seem to be directly related to the SO debugging
New problem with gdb-5.2.1 is that the <Step Into> (gdb step) behaves as
if it was the <Step Over) (gdb next) even in the simplest (statically
linked single .c) projects.
Is there some problem with the ./configure or should I make install
instead of simple copy ? Or simply the gcc version was inappropriate ?
As already written, I have suspected that the problem is related to the
stub information that the gcc-2.95.2 created for me. So I intended to
use the gcc-3.2 instead but I have given up because either gcc-3.2 or
KDevelop obviously need the updated autoconf and automake and maybe
something more to digest my KDevelop based projects.
Iztok
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem debugging SOs
2002-08-26 22:41 ` Iztok Kobal
@ 2002-08-27 8:04 ` Kevin Buettner
2002-08-27 22:17 ` Iztok Kobal
0 siblings, 1 reply; 8+ messages in thread
From: Kevin Buettner @ 2002-08-27 8:04 UTC (permalink / raw)
To: Iztok Kobal; +Cc: gdb
On Aug 27, 7:40am, Iztok Kobal wrote:
> code to be debugged was compiled with the gcc-2.95.2 -g3
>
> No more problems seem to be directly related to the SO debugging
> New problem with gdb-5.2.1 is that the <Step Into> (gdb step) behaves as
> if it was the <Step Over) (gdb next) even in the simplest (statically
> linked single .c) projects.
Are you certain that the files containing the functions that you're
trying to step into were compiled with -g ? The only time I see the
behavior you describe is when I've forgotten to use -g.
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem debugging SOs
2002-08-27 8:04 ` Kevin Buettner
@ 2002-08-27 22:17 ` Iztok Kobal
2002-08-27 22:57 ` Kevin Buettner
0 siblings, 1 reply; 8+ messages in thread
From: Iztok Kobal @ 2002-08-27 22:17 UTC (permalink / raw)
Cc: gdb
Kevin Buettner wrote:
>On Aug 27, 7:40am, Iztok Kobal wrote:
>
>
>
>>code to be debugged was compiled with the gcc-2.95.2 -g3
>>
>>No more problems seem to be directly related to the SO debugging
>>New problem with gdb-5.2.1 is that the <Step Into> (gdb step) behaves as
>>if it was the <Step Over) (gdb next) even in the simplest (statically
>>linked single .c) projects.
>>
>>
>
>Are you certain that the files containing the functions that you're
>trying to step into were compiled with -g ?
>
The test executable code was compiled using gcc-2.95.2 with the -g3 option.
Using the same test executable code: Steps Into with the gdb-5.0 and
gdb-5.1.0.1 but not with gdb-5.2 or gdb-5.2.1.
All gdb executables were generated and installed the same way on the
same machine/enviroment for the same platform (i686-pc-linux-gnu).
If you are interested, I can send you all execs and needed sources in
concern, as they are.
> The only time I see the
>behavior you describe is when I've forgotten to use -g.
>
True, yet I have not forgotten ...
>
>Kevin
>
>
>
Iztok
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Problem debugging SOs
2002-08-27 22:17 ` Iztok Kobal
@ 2002-08-27 22:57 ` Kevin Buettner
0 siblings, 0 replies; 8+ messages in thread
From: Kevin Buettner @ 2002-08-27 22:57 UTC (permalink / raw)
To: Iztok Kobal; +Cc: gdb
On Aug 28, 7:16am, Iztok Kobal wrote:
> >Are you certain that the files containing the functions that you're
> >trying to step into were compiled with -g ?
> >
> The test executable code was compiled using gcc-2.95.2 with the -g3 option.
> Using the same test executable code: Steps Into with the gdb-5.0 and
> gdb-5.1.0.1 but not with gdb-5.2 or gdb-5.2.1.
>
> All gdb executables were generated and installed the same way on the
> same machine/enviroment for the same platform (i686-pc-linux-gnu).
>
> If you are interested, I can send you all execs and needed sources in
> concern, as they are.
Okay, send them to me. (Just me, not the list.)
Thanks,
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-08-28 5:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-23 2:43 Problem debugging SOs Iztok
2002-08-23 7:53 ` Kevin Buettner
2002-08-26 2:43 ` Iztok Kobal
2002-08-26 8:43 ` Kevin Buettner
2002-08-26 22:41 ` Iztok Kobal
2002-08-27 8:04 ` Kevin Buettner
2002-08-27 22:17 ` Iztok Kobal
2002-08-27 22:57 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox