Forum Administrator
Joined: 09 Jul 2004 Posts: 45 Location: Lake Oswego, OR
|
Posted: Wed Jan 09, 2013 5:21 pm Post subject: Troubleshooting PGDBG on Mac OS X |
|
|
This posting provides a summary of how to troubleshoot problems running PGDBG on Mac OS X. This applies to PGI 13.x and before.
I. Security Considerations:
PGI 13.5 and above do not require the system configuration for debugging
and profiling that has been required in previous releases. The debugger
and profile data collector no longer need to run using "group procmod"
privileges. However, to use the PGDBG to attach PGDBG to a running
process, users must be able to enter the authentication credentials of a
user that is a member of the unix group "_developer".
Add a user to a group as follows:
| Code: | | sudo dseditgroup -o edit -a usernametoadd -t user _developer |
See the PGI Installation Guide for details.
For 13.4 PGDBG, we recommend using the text mode debugger
(pgdbg -text) due to an OSX GUI bug.
For 13.3 and previous releases, you might see error messages
saying something like "task_for_pid failure". Follow the instructions
below or upgrade to 13.5 to eliminate these errors.
If you are using the Mountain Lion OS (10.8), then you must run PGDBG or PGCOLLECT as an admin user (e.g. root).
Make sure that the PGI software is installed on a local drive (not a network drive)
Make sure that the pgdebug, pgserv, and pgsampt executables have setgid 'procmod' permissions
| Code: | -rwxrwsr-x 1 root procmod 23031904 Oct 19 16:35 pgdebug
-rwxrwsr-x 1 root procmod 1715760 Oct 19 16:35 pgsampt
-rwxrwsr-x 1 root procmod 135816 Oct 19 16:35 pgserv
|
Make sure that the debugger user is a member of the Unix group 'procmod'
| Code: | $ id
uid=1010(myuser) gid=1004(users) groups=1004(users),9(procmod)
|
Make sure that the taskgated(8) daemon is configured to use the '-p' option in /System/Library/LaunchDaemons/com.apple.taskgated.plist. Find the 'ProgramArguments' section and make sure that '-p' is listed as shown below.
| Code: | <key>ProgramArguments</key>
<array>
<string>/usr/libexec/taskgated</string>
<string>-p</string>
<string>-s</string>
</array> |
II. Troubleshooting dynamic library issues
PGDBG does not currently support debugging dynamic libraries on Mac OS X
III. Troubleshooting CANNOT LOAD errors:
(1) make sure that the main executable of the program has been built with ASLR disabled* this is the default when using the PGI compiler driver to link
* if not using the PGI compiler driver to link, link with '--no_pie' |
|