From: Paul Starzetz <paul@free.ihaquer.com>
To: Tristan Gingold <gingold@adacore.com>
Cc: gdb@sourceware.org
Subject: Re: gdb darwin target on Linux host?
Date: Wed, 20 Oct 2010 15:45:00 -0000 [thread overview]
Message-ID: <20101020154517.29C5231366@nx.neverkill.us> (raw)
In-Reply-To: <1287588922.28107.281.camel@hp>
On Wed, 2010-10-20 at 17:35 +0200, Peter Steiner wrote:
> > > file /home/exchange/ls
> > > /home/exchange/ls: Mach-O fat file with 2 architectures
> >
> > You can't debug fat binaries. You have to extract the executable you really want to debug.
> >
>
> tried this - no luck at all!
>
> lipo -extract x86_64 /bin/ls -output ls.64
> lipo -extract i386 /bin/ls -output ls.32
ok ok I see my error... I must use -thin:
lipo -thin x86_64 /bin/ls -output ls.64
now I can load it into native box gdb7.2:
gdb-7.2 root# ./gdb/gdb /opt/src/ls.64
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 "x86_64-apple-darwin10.0.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /opt/src/ls.64...(no debugging symbols
found)...done.
BUT: on a cross-gdb compiled on Linux host I get now another error
trying to read the "thinned" ls.64:
gdb-7.2/gdb
# /usr/local/gdb/bin/x86_64-apple-darwin-gdb /home/exchange/ls.64
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= --target=x86_64-apple-darwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/exchange/ls.64...I'm sorry, Dave, I can't do
that. Symbol format `mach-o-x86-64' unknown.
Setting up the environment for debugging gdb.
why is that? I compiled on native darwin and Linux from the same tarball
7.2.
prev parent reply other threads:[~2010-10-20 15:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 13:53 Peter Steiner
2010-10-20 14:20 ` Tristan Gingold
2010-10-20 14:26 ` Pedro Alves
2010-10-20 14:41 ` Tristan Gingold
2010-10-20 14:50 ` Pedro Alves
2010-10-20 14:52 ` Nathan Froyd
2010-10-20 15:09 ` Pedro Alves
[not found] ` <20101020150949.4841131366@nx.neverkill.us>
2010-10-20 15:15 ` Peter Steiner
[not found] ` <20101020143016.6BE9131366@nx.neverkill.us>
2010-10-20 14:42 ` Peter Steiner
2010-10-20 15:12 ` Tristan Gingold
[not found] ` <20101020151257.25F2D31366@nx.neverkill.us>
2010-10-20 15:24 ` Peter Steiner
2010-10-20 17:12 ` Stan Shebs
2010-10-21 7:49 ` Tristan Gingold
2010-10-20 15:35 ` Peter Steiner
[not found] ` <1287588922.28107.281.camel@hp>
2010-10-20 15:45 ` Paul Starzetz [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=20101020154517.29C5231366@nx.neverkill.us \
--to=paul@free.ihaquer.com \
--cc=gdb@sourceware.org \
--cc=gingold@adacore.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