From: Jack Howarth <howarth@bromo.med.uc.edu>
To: Jonas Maebe <jonas.maebe@elis.ugent.be>
Cc: gdb@sourceware.org
Subject: Re: gdb seems to be broken on darwin 10.5.8 and later
Date: Fri, 02 Oct 2009 01:53:00 -0000 [thread overview]
Message-ID: <20091002015303.GA29817@bromo.med.uc.edu> (raw)
In-Reply-To: <8A12DBCB-8C04-4FAD-85ED-2447CD01F1ED@elis.ugent.be>
On Thu, Oct 01, 2009 at 01:29:28PM +0200, Jonas Maebe wrote:
>
> On 30 Sep 2009, at 18:20, Jack Howarth wrote:
>
>> Now gdb errors out earlier and claims that darwin executables
>> aren't valid executable files. Is anyone else seeing that on
>> darwin?
>
> Since you mentioned later that you are on 10.6, might the problem be
> that previously you only tested gdb on programs compiled under 10.5.x or
> with "-mmacosx-version-min 10.5" (or earlier), while you are now trying
> with a program compiled on and for 10.6? Apple added/changed some things
> to the Mach-O object format in 10.6 (just like in 10.5), and e.g. (some?)
> binaries compiled for 10.6 are not recognised as valid executables at all
> on 10.5 or earlier. gdb might be confused for similar reasons.
>
> You may want to try compiling your program with "-mmacosx-version-min
> 10.5" and check again.
>
>
> Jonas
Actually tonight's gdb cvs built on x86_64-apple-darwin10 seems to work
fairly well with the proposed macho changes as long as I run as root.
Targeting binaries for 10.6 doesn't seem to be a problem. The only issue
I have run into so far is with binaries built at -O3 with gcc trunk.
With Apple's gcc-4.2 compiler, if I compile...
gcc -m64 -g -O3 himenoBMTxpa.c
break points are set normally...
(gdb) break 4
Breakpoint 1 at 0x100001b14: file himenoBMTxpa.c, line 4.
but with binaries built with gcc 4.5, I find that this doesn't work...
(gdb) break 4
Breakpoint 1 at 0x100002832: file himenoBMTxpa.c, line 70. (4 locations)
The problem disappears if I regress the compile back to -O2 with gcc 4.5.
Is this problem being seen with gdb under linux?
Jack
next prev parent reply other threads:[~2009-10-02 1:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-23 22:09 [gdb-7.0] One week to the gdb-7.0 release! Joel Brobecker
2009-09-29 23:17 ` Anirban Sinha
2009-09-30 0:13 ` Joel Brobecker
2009-09-30 0:44 ` Anirban Sinha
2009-09-30 16:20 ` Jack Howarth
2009-09-30 16:30 ` Joel Brobecker
2009-09-30 16:59 ` Jack Howarth
2009-09-30 17:08 ` Paul Pluzhnikov
2009-09-30 17:31 ` Jack Howarth
2009-09-30 17:42 ` Paul Pluzhnikov
2009-09-30 17:45 ` Jack Howarth
2009-09-30 17:34 ` Joel Brobecker
2009-10-01 11:29 ` gdb seems to be broken on darwin 10.5.8 and later Jonas Maebe
2009-10-02 1:53 ` Jack Howarth [this message]
2009-10-02 15:40 ` Joel Brobecker
2009-10-02 16:12 ` Jack Howarth
2009-10-02 16:20 ` Joel Brobecker
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=20091002015303.GA29817@bromo.med.uc.edu \
--to=howarth@bromo.med.uc.edu \
--cc=gdb@sourceware.org \
--cc=jonas.maebe@elis.ugent.be \
/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