Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remote Debugging XC 2.3 -> OS 10.3.9




On Jun 29, 2006, at 11:29 AM, Jeff Nordquist wrote:
I wish I knew Perl to understand what this line is doing:

exec perl -e 'while($len = sysread(STDIN, $buf, 1024)){$buf =~ s /- break-insert -l -1/-break-insert/g; syswrite(STDOUT, $buf, $len);}' | "$gdb" "$@"

The perl expression is simple, it's reading 1024 bytes from standard in into the variables $buf. Then it's replacing all instances of "- break-insert -l -1" with "-break-insert". Then it writes it to standard out.


I'm not really sure where this script is coming from or why it's avoiding buffered I/O. I'm not sure what the format of this data that's being piped to gdb is in but if I were writing it, it'd be

exec perl -ne 's/-break-insert -l -1/-break-insert/g;print' | "$gdb" "$@"

which I believe is less error prone since it'll read it a line at a time.

--
Steve Checkoway



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden

References: 
 >Remote Debugging XC 2.3 -> OS 10.3.9 (From: Jeff Nordquist <email@hidden>)
 >Re: Remote Debugging XC 2.3 -> OS 10.3.9 (From: Chris Espinosa <email@hidden>)
 >Re: Remote Debugging XC 2.3 -> OS 10.3.9 (From: Jeff Nordquist <email@hidden>)
 >Re: Remote Debugging XC 2.3 -> OS 10.3.9 (From: Michael Ryan Bannon <email@hidden>)
 >Re: Remote Debugging XC 2.3 -> OS 10.3.9 (From: Jeff Nordquist <email@hidden>)
 >Re: Remote Debugging XC 2.3 -> OS 10.3.9 (From: Michael Ryan Bannon <email@hidden>)
 >Re: Remote Debugging XC 2.3 -> OS 10.3.9 (From: Jeff Nordquist <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.