Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Xu Haojun-a18535 <hjXu@motorola.com>
Cc: gdb@sourceware.org
Subject: Re: Help with stepping into shared-library with stripped ld-linux 	on arm board
Date: Thu, 22 Mar 2007 15:45:00 -0000	[thread overview]
Message-ID: <20070322154506.GA7032@caradoc.them.org> (raw)
In-Reply-To: <6D989D7EEBF1A34EA5CAF6A24FD3E15801E3CB50@zmy16exm63.ds.mot.com>

On Thu, Mar 22, 2007 at 11:29:14PM +0800, Xu Haojun-a18535 wrote:
> Hello, gdb experts.
> 
> Recently we are trying to stepping into shared-library on arm board
> using GDB 6.3 with gdbserver
> 
> First we find ld-linux.so is stripped so that gdb cannot insert a
> breakpoint at _dl_debug_state. Then it has to continue with SINGLE_STEP
> out of the linker codes, which is quite slow!!
> Then one option we used is to re-compile the glibc with symbol info and
> put it into arm board, then it works.

I suggest you have two copies of your root filesystem.  Point GDB at
one on your host that is not stripped, and run one that is exactly the
same but stripped on the target.  Then everything will work much
better.

> Any clue about this? What makes gdb decide to send SINGLE_STEP or CONT
> to gdbserver during stepping into a shared library? It looks it keep
> sending SINGLE_STEP command to gdbserver, till out of linker code. Do I
> miss something besides enable_break() in solib-srv4.c?

It needs to know what function it's in to recognize shared library
trampolines.  Without symbols, it's not going to work.

A compromise which might help is to use strip -g for ld.so and
libpthread.so on your target instead of strip; that will leave the
symbol tables, and remove only the debug info.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-03-22 15:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-22 15:29 Xu Haojun-a18535
2007-03-22 15:45 ` Daniel Jacobowitz [this message]
     [not found]   ` <1174588974.9964.9.camel@localhost.localdomain>
     [not found]     ` <6D989D7EEBF1A34EA5CAF6A24FD3E15801E3D06D@zmy16exm63.ds.mot.com>
2007-03-23 11:55       ` Help with stepping into shared-library with stripped ld-linuxon " Daniel Jacobowitz
2007-03-23 13:12         ` Help with stepping into shared-library with strippedld-linuxon " Xu Haojun-a18535
2007-03-23 13:16           ` Daniel Jacobowitz

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=20070322154506.GA7032@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=hjXu@motorola.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