• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Am I being debugged?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Am I being debugged?
      • From: Jim Ingham <email@hidden>
References: 
 >Am I being debugged? (From: Matt Gough <email@hidden>)

  • Prev by Date: Re: Am I being debugged?
  • Next by Date: Re: Why do some build settings have lines through them?
  • Previous by thread: Re: Am I being debugged?
  • Next by thread: Re: Am I being debugged?
  • Index(es):
    • Date
    • Thread