Opened 5 years ago
Last modified 15 months ago
#63483 assigned defect
gdb-apple: notes tell user to edit an uneditable system file
| Reported by: | spencerandy | Owned by: | jeremyhu (Jeremy Huddleston Sequoia) |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | |
| Keywords: | Cc: | cooljeanius (Eric Gallager) | |
| Port: | gdb-apple |
Description
Once installed with command sudo port on Terminal, the window returns a note about need to make sure a filename that don't exist. When entering into the path, the filename don't appear. I recommend to don't return any notes about this port.
Change History (7)
comment:1 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
| Owner: | set to jeremyhu |
|---|---|
| Status: | new → assigned |
| Summary: | About GDB on Apple → gdb-apple: notes refer to nonexistent system file |
| Type: | submission → defect |
comment:2 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)
| Summary: | gdb-apple: notes refer to nonexistent system file → gdb-apple: notes tell user to edit an uneditable system file |
|---|
Not sure what system you're on, but even on Big Sur, /System/Library/LaunchDaemons/com.apple.taskgated.plist still exists.
comment:3 Changed 5 years ago by mouse07410 (Mouse)
I suspect the problem the OP complains about is not the absence of that file - but inability to edit it because SIP doesn't allow it.
comment:4 follow-up: 7 Changed 5 years ago by kencu (Ken)
gdb-apple is so old we should block it from anything newer than about Leopard anyway.
people should be using the gdb port.
comment:5 Changed 3 years ago by ojfd
In High Sierra, if you disable SIP, you can edit 'com.apple.taskgated.plist' and add -p option, but gdb-apple still produces
Unable to find Mach task port for process-id XXX: (os/kern) failure (0x5)
error and, of course, does not work. Creating certificate in KeyChain and codesigning gdb-apple with it doesn't help either. I've just spent a whole day trying to make it work with no success whatsoever. In Yosemite it works like a charm.
Someone, please look into this issue. I find this old gdb quite useful, mostly thanks to availability of https://github.com/gdbinit/Gdbinit
comment:6 Changed 15 months ago by cooljeanius (Eric Gallager)
| Cc: | cooljeanius added |
|---|
comment:7 Changed 15 months ago by cooljeanius (Eric Gallager)
Replying to kencu:
gdb-apple is so old we should block it from anything newer than about Leopard anyway.
people should be using the gdb port.
It's got code in it conditionalized for Lion; latest ChangeLog entry is from 2013, which was after Mountain Lion, so restricting it to Leopard seems to be going a bit too far... Also, there are features in the gdb-apple port that never got upstreamed back to the mainline FSF gdb, so there are still reasons people might want to use it instead. I tried combining them at one point, but only made a mess of things: https://github.com/cooljeanius/apple-gdb-1824 (help wanted)

The notes say:
---> gdb-apple has the following notes: You will need to make sure /System/Library/LaunchDaemons/com.apple.taskgated.plist has the '-p' option, e.g. <key>ProgramArguments</key> <array> <string>/usr/libexec/taskgated</string> <string>-sp</string> </array>Editing this file presumably is still necessary on older systems for this port to work.
On my macOS High Sierra system, the file still exists, but of course cannot be edited due to System Integrity Protection. I do not know whether the port will work on these newer systems if this file is not edited.