Discussion:
[Bug gdb/18449] New: GDB crashes on OSX
andy.somogyi at gmail dot com
2015-05-22 15:39:41 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18449

Bug ID: 18449
Summary: GDB crashes on OSX
Product: gdb
Version: 7.9
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: andy.somogyi at gmail dot com
Target Milestone: ---

When debugging any non-trivial program, such as the python interpreter, or
virtually any other non-trivial program, gdb will hang on OSX with 100% cpu
usage.

The problem started somewhere after 6.3, as the Apple provided GDB 6.3 works
perfectly. I've verified this problem with GDB 7.9 and 7.7. Also verified this
on 3 different machines, with 3 different OSX versions.

On OSX 10.7, when using the built in GDB 6.3, no problems are found. However,
when installing GDB 7.9 from homebrew, the problem exists. On two other
machines, with OSX 10.9 and 10.10, has the same problems with GDB 7.7 and 7.9
and 7.9.1

This is using GDB through eclipse.

The initial breakpoint in main is always found just fine, and the first 3-4
breakpoints are also found, then after say 3-4 continues, gdb itself will hang
with 100% cpu usage.
--
You are receiving this mail because:
You are on the CC list for the bug.
keiths at redhat dot com
2015-05-22 18:17:13 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18449

Keith Seitz <keiths at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |keiths at redhat dot com

--- Comment #1 from Keith Seitz <keiths at redhat dot com> ---
(In reply to Andy Somogyi from comment #0)
Post by andy.somogyi at gmail dot com
When debugging any non-trivial program, such as the python interpreter, or
virtually any other non-trivial program, gdb will hang on OSX with 100% cpu
usage.
If you could attach GDB to that hung (GDB) process and send in a backtrace,
that might prove really helpful. *Very* few of us active developers have
Mac-based systems. [gdb /path/to/gdb -p $pid_of_gdb -ex "thread apply all bt"
should do the trick]
Post by andy.somogyi at gmail dot com
The problem started somewhere after 6.3, as the Apple provided GDB 6.3 works
perfectly. I've verified this problem with GDB 7.9 and 7.7. Also verified
this on 3 different machines, with 3 different OSX versions.
For the record, 6.3 (Apple's version) is not really FSF GDB. It was heavily
modified (as was GCC) by Apple and its related community. Comparing Apple 6.3
vs FSF GDB therefore only tells me that it is likely some modification that was
never submitted/accepted/committed in upstream FSF GDB.
Post by andy.somogyi at gmail dot com
On OSX 10.7, when using the built in GDB 6.3, no problems are found.
The initial breakpoint in main is always found just fine, and the first 3-4
breakpoints are also found, then after say 3-4 continues, gdb itself will
hang with 100% cpu usage.
To even begin to help out, we're going to need you to run gdb independently of
Eclipse. That one step alone will help us isolate the problem all the quicker.

Other useful information: What compiler/version are you using? [I'm assuming
Apple's or MacPorts GCC.]
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-15 19:33:45 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=18449

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Target| |*-*-darwin*
Status|NEW |WAITING
CC| |tromey at sourceware dot org

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
Is this bug still relevant?
gdb on macOS has a number of problems but I haven't encountered this one.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...