public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Kris Warkentin <kewarken@qnx.com>
To: Hinko Kocevar <hinko.kocevar@iskramedical.si>
Cc: gdb@sources.redhat.com
Subject: Re: remote debugging and source files
Date: Wed, 25 Aug 2004 14:33:00 -0000	[thread overview]
Message-ID: <412CA1C7.6090403@qnx.com> (raw)
In-Reply-To: <412C9AFC.70608@iskramedical.si>

Hinko Kocevar wrote:

> It is same version on the host and on the target - glibc-2.3.2., but 
> the one on target is cross compiled for ARM architecture, though. Is 
> there any other kind of difference we are interested here?

No, what I mean is that gdb loads the arm binaries from the host.  Those 
binaries need to be the same binaries as the target is running.

>
> Sounds easy, but to me, it is not - at all :).
> OK, here goes...
> I did 'maintenance info breakpoints' while debugging native app:
> ...
> -16 shlib events   keep y   0x4000dd60 <_dl_debug_state_internal>
>         breakpoint already hit 3 times
> ...
>
> So debugger stoped on shared library event 3 times (three dynamic libs 
> were loaded) at <_dl_debug_state_internal> symbol found in 
> ld-2.3.2.so. Using objdump I got the same offset, 0x0000dd60, for 
> _dl_debug_state_internal.
>
> On ARM target using the same technique, shlib events are at 0x4000b8d8 
> while arm-linux-objdump says that _dl_debug_state_internal is at 
> offset 0x0000c258. After setting breakpoint to 0x0000c258 debugger 
> stopped 7 times (according to comments around r_debug that is OK) 
> before my app was stated.
>
> Offset 0x0000b8d8 is location in _dl_signal_error.
>
> So how do I convince gdb to use correct address for shlib event?


At this stage I'm beginning to get confused about which binaries are 
being discussed here since you're comparing the native version with the 
remote.  What I need to verify first is whether or not the ARM binaries 
(libs and app) on the host are EXACTLY the same as the binaries on the 
target.  Then we need to verify that gdb is finding the correct ones.  
If all that is true and it's still not working, then we may need to dig 
deeper into why the solib breakpoint is being calculated incorrectly.  
Can you verify that auto-solib-add is on as well?

cheers,

Kris

      parent reply	other threads:[~2004-08-25 14:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-24 14:05 Hinko Kocevar
2004-08-24 15:34 ` Hinko Kocevar
2004-08-24 15:56   ` Hinko Kocevar
2004-08-24 16:35     ` Kris Warkentin
2004-08-24 17:42       ` Hinko Kocevar
2004-08-24 17:53         ` Daniel Jacobowitz
2004-08-24 18:05         ` Kris Warkentin
2004-08-25 13:58           ` Hinko Kocevar
2004-08-25 14:16             ` Daniel Jacobowitz
2004-08-25 14:30               ` Hinko Kocevar
2004-08-26 19:38                 ` remote debugging and source files - SOLVED Hinko Kocevar
2004-08-25 14:33             ` Kris Warkentin [this message]

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=412CA1C7.6090403@qnx.com \
    --to=kewarken@qnx.com \
    --cc=gdb@sources.redhat.com \
    --cc=hinko.kocevar@iskramedical.si \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).