• 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: Viewing arrays in the debugger?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Viewing arrays in the debugger?


  • Subject: Re: Viewing arrays in the debugger?
  • From: Jim Ingham <email@hidden>
  • Date: Mon, 20 Sep 2004 10:47:35 -0700


The Xcode expressions window follows all the conventions of the gdb expression parser. The docs for this are at:


file:///Developer/ADC Reference Library/documentation/ DeveloperTools/gdb/gdb/gdb_toc.html

and particularly the section on "Artificial arrays":

file:///Developer/ADC Reference Library/documentation/ DeveloperTools/gdb/gdb/gdb_9.html#SEC58

which explains what is going on pretty well.

In your case, you want to do:

*pArray@10


On Sep 19, 2004, at 2:13 PM, Quinn Dunki wrote:

Hello, folks!

I'm new to XCode (coming from Visual Studio .NET on PCs), and I'm stumped by something. If I have a pointer to what I know is an array of objects, how do I view that array in the debugger?

Example:

MyClass *pArray = new MyClass[10];

XCode shows this as a pointer to one instance of MyClass (as debuggers usually do):

	|>  pArray				|   <address>     |

Clicking the flippy triangle merely dereferences the pointer once and shows me the first instance in my array. But in .NET, I could do this in an expressions window to see my array:

	pArray,10

...which says to the debugger, "Trust me, I know there are 10 of those in a row". Can XCode do something like this? For now, I'm manually viewing my array entries by typing this into the Expressions Window:

	pArray[0]
	pArray[1]
	...

Tedious, to say the least! I searched Google, the XCode docs, and this list archive, to no avail. Any help would be appreciated!

Jim _______________________________________________ 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
References: 
 >Viewing arrays in the debugger? (From: Quinn Dunki <email@hidden>)

  • Prev by Date: trouble using MallocDebug
  • Next by Date: re: trouble using MallocDebug
  • Previous by thread: Re: Viewing arrays in the debugger?
  • Next by thread: custom build rule dependency
  • Index(es):
    • Date
    • Thread