Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Leon Pollak <leonp@plris.com>
Cc: gdb@sourceware.org
Subject: Re: Restarting gdbserver
Date: Sun, 23 Jan 2011 16:48:00 -0000	[thread overview]
Message-ID: <20110123164837.GA16407@host1.dyn.jankratochvil.net> (raw)
In-Reply-To: <201101231843.44877.leonp@plris.com>

On Sun, 23 Jan 2011 17:43:44 +0100, Leon Pollak wrote:
> Thank you, Jan.
> 
> I hope I understood and did what you said:
> 
> bash-4.1$ ./gdb -nx -ex file /opt/FS/common/csu -ex target extended-remote 
> 192.168.50.4:44000 -ex set sysroot /opt/FS -ex set remote exec-file 
> /common/csu -ex start
> GNU gdb (GDB) 7.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=armv5tl-
> montavista-linux-gnueabi".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Reading symbols from /opt/FS/common/csu...done.
> Remote debugging using 192.168.50.4:44000
> Temporary breakpoint 1 at 0x20374: file /Projects/CSU/src/main.cpp, line 16.
> Starting program: /opt/FS/common/csu 
> 
> Temporary breakpoint 1, main () at /Projects/CSU/src/main.cpp:16
> 16              MsgLog("OFP Version: %s dated %s", OFP_VERSION, 
> __TIMESTAMP__);
> (gdb) c
> Continuing.
> ^C
> Program received signal SIGINT, Interrupt.
> 0x400314bc in pthread_cond_wait@@GLIBC_2.4 () from /opt/FS/lib/libpthread.so.0
> (gdb) bt
> #0  0x400314bc in pthread_cond_wait@@GLIBC_2.4 () from 
> /opt/FS/lib/libpthread.so.0
> #1  0x00000000 in ?? ()
> (gdb) 
> ----------------------------------------------------------------------------
> God knows why it decided to stop at main...

This is done intentionally by the GDB command `start'.


> Is it what you meant?

So symbols from /opt/FS/common/csu work as can be seen in the main function.

Symbols from remote `/lib/libpthread.so.0' do not work. I guess it uses
separate debug info.  You can try:
readelf -wi /opt/FS/lib/libpthread.so.0
readelf -wi /opt/FS/usr/lib/debug/opt/FS/lib/libpthread.so.0
readelf -wi /opt/FS/usr/lib/debug/opt/FS/lib/libpthread.so.0.debug
# There are just guesses, it depends on the montavista distro from which comes
# /opt/FS/lib/libpthread.so.0 and I do not know montavista. readelf should
# come from the montavista cross binutils package.

I guess you should really use also the part of the reproducer from me:
  -ex 'set debug-file-directory /host1/usr/lib/debug
that is in your case:
  -ex 'set debug-file-directory /opt/FS/usr/lib/debug

And you should also verify the separate debug info files from montavista are
installed under /opt/FS/usr/lib/debug (for example *-debuginfo.rpm packages in
Fedora).


Regards,
Jan


  reply	other threads:[~2011-01-23 16:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20  9:25 Leon Pollak
2011-01-20  9:36 ` Jan Kratochvil
2011-01-20 14:07   ` Leon Pollak
2011-01-20 14:11     ` Jan Kratochvil
2011-01-20 14:55       ` Leon Pollak
2011-01-20 17:29         ` Jan Kratochvil
2011-01-21 22:48           ` Leon Pollak
2011-01-23 13:28             ` Jan Kratochvil
2011-01-23 16:39               ` Leon Pollak
2011-01-23 16:48                 ` Jan Kratochvil [this message]
2011-01-23 18:01                   ` Leon Pollak
2011-01-23 18:20                     ` Jan Kratochvil
2011-01-23 18:25                     ` Andreas Schwab
2011-01-20 14:10 Leon Pollak

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=20110123164837.GA16407@host1.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=leonp@plris.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