* 'Cannot find bounds of current function' when stepping with GDB 7.6 under OS X 10.6 / LLVM GCC 4.2
@ 2014-02-05 12:24 eranon
2014-02-06 15:10 ` eranon
0 siblings, 1 reply; 6+ messages in thread
From: eranon @ 2014-02-05 12:24 UTC (permalink / raw)
To: gdb
Hello. I'm porting a wxWidgets-based app towards Mac. For this, my dev
station is under OS X 10.6 Snow Leopard with the Xcode 4.2 tools (but I'm
using Codeblocks as IDE). I built wxWidgets 3.0.0 and my own project using
the Apple flavor of GCC (aka. LLVM GCC 4.2), indicating arch i386. My
problem is about debugging : to be able to plug a pretty printer for seeing
the wxWidgets structure (e.g. wxString), I need a Python-enabled gdb, and
the one provided by Apple in the Xcode tools is not. So, I've taken a try
with FSF gdb 7.6 as per http://sourceware.org/gdb/wiki/BuildingOnDarwin, but
I experience the impossibility to go step by step. Not talking about IDE,
but launching gdb from the command line, the first breakpoint is honored,
but using the "n" command to execute one step at a time, I get this error :
"cannot find bounds of current function". Since the Apple gdb is still under
/usr/bin/, I call the FSF gdb 7.6 with its absolute path (tried with an
in-place use and with make install under /usr/local/bin and it give the same
result/error). Of course, at this step not any pretty printer Python script
is involved (it will be the next stage if I solve my current issue). I tried
to rebuild my project passing an explicit "-ggdb" option rather than the
implicit "-g", but it doesn't change anything (same error during stepping).
So, what to do ? Do you have an idea about the reason why ? Is it because of
incompatible debug info, an issue about arch, a too big gap between the LLVM
GCC 4.2 and FSF GDB 7.6... ? I need your lighted advice for sure...
--
View this message in context: http://sourceware-org.1504.n7.nabble.com/Cannot-find-bounds-of-current-function-when-stepping-with-GDB-7-6-under-OS-X-10-6-LLVM-GCC-4-2-tp259756.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 'Cannot find bounds of current function' when stepping with GDB 7.6 under OS X 10.6 / LLVM GCC 4.2
2014-02-05 12:24 'Cannot find bounds of current function' when stepping with GDB 7.6 under OS X 10.6 / LLVM GCC 4.2 eranon
@ 2014-02-06 15:10 ` eranon
2014-02-06 15:31 ` Tristan Gingold
0 siblings, 1 reply; 6+ messages in thread
From: eranon @ 2014-02-06 15:10 UTC (permalink / raw)
To: gdb
What I get could look like what expressed in this thread :
http://sourceware-org.1504.n7.nabble.com/gdb-can-not-debug-hello-world-in-mac-os-x-td107600.html
In addition to the error I told about, at the same time, hitting the "n"
command, I get something like this too :
(gdb) n
0x00003045 in ?? ()
So, the question is maybe : What FSF gdb version should I use to debug a
i386 DEBUG build coming from the LLVM GCC 4.2 shipped with Xcode 4.2 under
OS X 10.6 (and I have OS X 10.8 with Xcode 4.6 too, but didn't installed my
dev environment in full under this station yet) ?
--
View this message in context: http://sourceware-org.1504.n7.nabble.com/Cannot-find-bounds-of-current-function-when-stepping-with-GDB-7-6-under-OS-X-10-6-LLVM-GCC-4-2-tp259756p259908.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 'Cannot find bounds of current function' when stepping with GDB 7.6 under OS X 10.6 / LLVM GCC 4.2
2014-02-06 15:10 ` eranon
@ 2014-02-06 15:31 ` Tristan Gingold
2014-02-06 17:56 ` eranon
0 siblings, 1 reply; 6+ messages in thread
From: Tristan Gingold @ 2014-02-06 15:31 UTC (permalink / raw)
To: eranon; +Cc: gdb@sourceware.org Development
On 06 Feb 2014, at 16:10, eranon <eric.anon@laposte.net> wrote:
> What I get could look like what expressed in this thread :
> http://sourceware-org.1504.n7.nabble.com/gdb-can-not-debug-hello-world-in-mac-os-x-td107600.html
>
> In addition to the error I told about, at the same time, hitting the "n"
> command, I get something like this too :
>
> (gdb) n
> 0x00003045 in ?? ()
>
> So, the question is maybe : What FSF gdb version should I use to debug a
> i386 DEBUG build coming from the LLVM GCC 4.2 shipped with Xcode 4.2 under
> OS X 10.6 (and I have OS X 10.8 with Xcode 4.6 too, but didn't installed my
> dev environment in full under this station yet) ?
I am almost sure that FSF gdb doesn't support binaries produced by recent version of
LLVM shipped by xcode. They use compact unwinding, which isn't handled by gdb.
This is on my todo list, but not that urgent because FSF gcc doesn't emit them (it
passes -no_compact_unwind to ld).
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 'Cannot find bounds of current function' when stepping with GDB 7.6 under OS X 10.6 / LLVM GCC 4.2
2014-02-06 15:31 ` Tristan Gingold
@ 2014-02-06 17:56 ` eranon
2014-02-07 8:55 ` Tristan Gingold
0 siblings, 1 reply; 6+ messages in thread
From: eranon @ 2014-02-06 17:56 UTC (permalink / raw)
To: gdb
Thanks for this informed info, Tristan. I keep track that it's on your TODO
list ;)
And I suppose this is not configurable by a switch/flag/option at LLVM GCC
4.2 side (to produce a FSF gdb compliant binaries of course) ?
Also, another question for another approach : Is it possible to go with FSF
GCC (ie. not the Apple-LLVM one) under OS X ?
--
View this message in context: http://sourceware-org.1504.n7.nabble.com/Cannot-find-bounds-of-current-function-when-stepping-with-GDB-7-6-under-OS-X-10-6-LLVM-GCC-4-2-tp259756p259954.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 'Cannot find bounds of current function' when stepping with GDB 7.6 under OS X 10.6 / LLVM GCC 4.2
2014-02-06 17:56 ` eranon
@ 2014-02-07 8:55 ` Tristan Gingold
2014-02-07 20:00 ` eranon
0 siblings, 1 reply; 6+ messages in thread
From: Tristan Gingold @ 2014-02-07 8:55 UTC (permalink / raw)
To: eranon; +Cc: gdb@sourceware.org Development
On 06 Feb 2014, at 18:56, eranon <eric.anon@laposte.net> wrote:
> Thanks for this informed info, Tristan. I keep track that it's on your TODO
> list ;)
>
> And I suppose this is not configurable by a switch/flag/option at LLVM GCC
> 4.2 side (to produce a FSF gdb compliant binaries of course) ?
This is a linker issue: try to link with -Wl,-no_compact_unwind (IIRC).
> Also, another question for another approach : Is it possible to go with FSF
> GCC (ie. not the Apple-LLVM one) under OS X ?
Yes, but AFAIK ObjC isn't up to date.
Tristan.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-07 20:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-05 12:24 'Cannot find bounds of current function' when stepping with GDB 7.6 under OS X 10.6 / LLVM GCC 4.2 eranon
2014-02-06 15:10 ` eranon
2014-02-06 15:31 ` Tristan Gingold
2014-02-06 17:56 ` eranon
2014-02-07 8:55 ` Tristan Gingold
2014-02-07 20:00 ` eranon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox