Re: Am I being debugged?
Re: Am I being debugged?
- Subject: Re: Am I being debugged?
- From: Justin Walker <email@hidden>
- Date: Tue, 17 Feb 2004 09:11:39 -0800
On Tuesday, February 17, 2004, at 02:26 AM, Matt Gough wrote:
In my Development build, I would like to be able to determine (at
runtime)
whether I am running inside gdb, or just running normally. What is the
best
way to do this?
Also, could I determine if I started normally, but have been attached
to
gdb?
The only way I know of to see that you are running inside gdb is to
find your parent process's PID, and figure out whether that is 'gdb'.
This doesn't tell you whether you are being bugged; just that you are
being bugged by 'gdb' (the admittedly pedantic point being that there
may be other debuggers out there...)
I know of no way to determine that 'gdb' has attached to your process.
There may be something Mach-like that will give you some or all of this
information, but I'm not aware of anything specific.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | It's not whether you win or
lose...
| It's whether *I* win or lose.
*--------------------------------------*-------------------------------*
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.