Opened 3 years ago

Last modified 4 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:
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 (5)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to jeremyhu
Status: newassigned
Summary: About GDB on Applegdb-apple: notes refer to nonexistent system file
Type: submissiondefect

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.

comment:2 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

Summary: gdb-apple: notes refer to nonexistent system filegdb-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 3 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 Changed 3 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 4 months 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

Note: See TracTickets for help on using tickets.