Opened 8 years ago
Closed 8 years ago
#17176 closed defect (fixed)
Gdb on Yosemite
Reported by: | vbraun | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | packages: optional | Keywords: | yosemite |
Cc: | ohanar | Merged in: | |
Authors: | Volker Braun | Reviewers: | John Palmieri |
Report Upstream: | N/A | Work issues: | |
Branch: | c2ff01b (Commits, GitHub, GitLab) | Commit: | c2ff01b24aa9bc150498acbb370af5fdcae347d0 |
Dependencies: | Stopgaps: |
Description (last modified by )
Apple moved setjmp.h
, see https://trac.macports.org/ticket/43973
Upstream bug: https://sourceware.org/bugzilla/show_bug.cgi?id=17046
Change History (14)
comment:1 Changed 8 years ago by
Authors: | → Volker Braun |
---|---|
Component: | PLEASE CHANGE → packages: optional |
Description: | modified (diff) |
Keywords: | yosemite added |
Type: | PLEASE CHANGE → defect |
comment:2 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 8 years ago by
Branch: | → u/vbraun/gdb_on_yosemite |
---|
comment:4 Changed 8 years ago by
Commit: | → c2ff01b24aa9bc150498acbb370af5fdcae347d0 |
---|
comment:5 Changed 8 years ago by
Description: | modified (diff) |
---|---|
Status: | new → needs_review |
comment:6 Changed 8 years ago by
Tried the following to be able to use gdb:
- Made a
gdbc
certificate (can only be done in the GUI, wtf): http://blog.panks.me/posts/2013/11/install-gdb-on-os-x-mavericks-from-source/ - Sign:
codesign -fs gdbc ./gdb/gdb
- Put the
gdb
binary in theprocmod
group and make it chgrp$ ls -al gdb -rwxrwsr-x 1 vbraun procmod 6717344 Oct 19 12:31 gdb
- Add myself to the groups
admin
,_developer
,procmod
,procview
:dscl . append /Groups/procmod GroupMembership vbraun
- Rebooted
Still can't run without root:
$ ./gdb ~/Sage/local/bin/patch .... Starting program: /Users/vbraun/Sage/local/bin/patch Unable to find Mach task port for process-id 476: (os/kern) failure (0x5). (please check gdb is codesigned - see taskgated(8))
More info:
$ codesign -d --verbose gdb Executable=/Users/vbraun/Code/gdb-7.8/gdb/gdb Identifier=org.gnu.gdb Format=Mach-O thin (x86_64) CodeDirectory v=20100 size=32700 flags=0x0(none) hashes=1630+2 location=embedded Signature size=1237 Signed Time=Oct 19, 2014, 12:31:26 PM Info.plist entries=4 TeamIdentifier=not set Sealed Resources=none Internal requirements count=2 size=448
comment:7 Changed 8 years ago by
Cc: | ohanar added |
---|
Of course if you run gdb as root (e.g. suid rood) then it will erase DYLD_LIBRARY_PATH
from the environment. This is generally good idea for a suid binary, but really crappy if you want to debug Sage.
comment:8 Changed 8 years ago by
This seems to work on an OSX 10.9 machine. I actually see both files /usr/include/setjmp.h
and /usr/include/machine/setjmp.h
, and they differ: the second one basically just contains these lines:
#ifndef _MACHINE_SETJMP_H_ #define _MACHINE_SETJMP_H_ #include <setjmp.h> #endif /* _MACHINE_SETJMP_H_ */
Is it an issue to not use that one? I also don't have access to earlier versions of OS X to test there.
comment:9 Changed 8 years ago by
Interesting, but the latter is probably left-over from an earlier SDK. I removed all files and reinstalled the CLT and got:
$ ls /usr/include/machine/setjmp.h ls: /usr/include/machine/setjmp.h: No such file or directory
comment:10 Changed 8 years ago by
Oh you said 10.9. Thats probably what it was, then.
In any case /usr/include/setjmp.h
is the standard location (or anything directly in the system include path). There was probably some old Apple SDK that didn't do that right, which prompted gdb to include setjmp.h it from a somewhat weird place.
comment:11 Changed 8 years ago by
Anybody care to review this? Without gdb its hard to debug stuff on OSX
comment:12 Changed 8 years ago by
It worked for me before on OS X 10.9, and it works for me now on OS X 10.10. I have no way of testing earlier versions of OS X.
Is this good enough for a positive review, given that it's an optional package?
comment:13 Changed 8 years ago by
Reviewers: | → John Palmieri |
---|---|
Status: | needs_review → positive_review |
IMHO thats enough
comment:14 Changed 8 years ago by
Branch: | u/vbraun/gdb_on_yosemite → c2ff01b24aa9bc150498acbb370af5fdcae347d0 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Aaand codesign doesn't work, can only run gdb as root.
New commits:
Adjust header location for setjmp