• 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: Debuging
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Debuging


  • Subject: RE: Debuging
  • From: "Alex Sheh" <email@hidden>
  • Date: Tue, 16 Jan 2007 10:13:14 -0800
  • Thread-topic: Debuging

Google 'pt_deny_attach'.  The below link shows you how to disable the
pt_deny_attach behavior.

http://landonf.bikemonkey.org/code/macosx/Tiger_PT_DENY_ATTACH.200511210
20514.50199.zadder.html

-----Original Message-----
From: cocoa-dev-bounces+asheh=email@hidden
[mailto:cocoa-dev-bounces+asheh=email@hidden] On Behalf
Of Andrew Farmer
Sent: Tuesday, January 16, 2007 9:19 AM
To: I. Savant
Cc: CocoaDev list
Subject: Re: Debuging

On 16 Jan 07, at 09:02, I. Savant wrote:
> On Jan 16, 2007, at 11:46 AM, Olariu Adrian Mihai wrote:
>>    I'm currently developing a bundle(for itunes) and I want to debug
>> it using breakpoints. Is this possible? How?
>
> Both of these questions can be answered by reading your XCode user
> manual.

Actually, not. iTunes uses PT_DENY_ATTACH, so the answer is actually
"you can't". Debugging your bundle will be rather difficult.

ptrace(2) says: "PT_DENY_ATTACH: This request [...] allows a process
that is not currently being traced to deny future traces by its parent.
[...] An attempt by the parent to trace a process which has set this
flag will result in a segmentation violation in the parent."

And indeed:

% ps x|grep iTunes
   396  ??  S      7:26.64 /Applications/iTunes.app/Contents/MacOS/
iTunes -psn_0
% gdb
GNU gdb 6.3.50-20050815 (Apple version gdb-563) (Wed Jul 19 05:17:43 GMT
2006) Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "powerpc-apple-darwin".
(gdb) attach 396
Attaching to process 396.
zsh: segmentation fault  gdb
%
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Debuging (From: Andrew Farmer <email@hidden>)

  • Prev by Date: Re: Syntax of int Array in Message (OT: Objective-C Forum)
  • Next by Date: core data, selected items and undo
  • Previous by thread: Re: Debuging
  • Next by thread: Re: Debuging
  • Index(es):
    • Date
    • Thread