Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Iztok Kobal <iztok.kobal@sysen.si>
Cc: gdb@sources.redhat.com
Subject: Re: Problem debugging SOs
Date: Mon, 26 Aug 2002 02:43:00 -0000	[thread overview]
Message-ID: <3D69F82C.9020109@sysen.si> (raw)
In-Reply-To: <1020823145316.ZM626@localhost.localdomain>

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
>
>
>  
>




  reply	other threads:[~2002-08-26  9:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-23  2:43 Iztok
2002-08-23  7:53 ` Kevin Buettner
2002-08-26  2:43   ` Iztok Kobal [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D69F82C.9020109@sysen.si \
    --to=iztok.kobal@sysen.si \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox