Re: Viewing A Pointer As An Array
Re: Viewing A Pointer As An Array
- Subject: Re: Viewing A Pointer As An Array
- From: "Sherm Pendley" <email@hidden>
- Date: Fri, 23 May 2008 17:30:17 -0400
On Fri, May 23, 2008 at 3:00 PM, Boyd Collier <
email@hidden> wrote:
I entered them into my source code, which didn't seem reasonable
Your instincts were correct - the _expression_ Rick mentioned is something one uses in the debugger, not one's source code.
but I'm willing to try anything to be able to look at contents of arrays. I thought that entering them into the debugger might be appropriate, but although I can use the debugger console to look at stuff, I'm very inexperienced at using it to enter expressions that make something happen, so to speak. Can you point out something in the docs that I should read up on? (As I said, I'm a little obtuse.)
Sure! The GDB docs at Apple detail expressions used to view data in GDB:
<
http://developer.apple.com/documentation/DeveloperTools/gdb/gdb/gdb_9.html>
The _expression_ Rick gave is described in the section about "artificial arrays".
The above is a direct HTML translation of the GDB man page, so the examples given simply use GDB's "p" command to simply print the value of the _expression_ to the debugger console. But, Xcode also has an expressions window, which Rick alluded to - you can bring that up in Xcode with "Debug / Tools / Expressions..." menu item (2.x) or "Run / Show / Expressions..." (3.x).
sherm--
--
Cocoa programming in Perl:
http://camelbones.sourceforge.net
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden