• 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: Variable array size declaration and the debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variable array size declaration and the debugger


  • Subject: Re: Variable array size declaration and the debugger
  • From: Jim Ingham <email@hidden>
  • Date: Fri, 26 Oct 2007 11:43:55 -0700

I filed a bug with gcc to support variable arrays, but it got pushed out of Leopard. I must admit that Fortran 90 is pretty impenetrable to me, so I'm not entirely sure what the example you cited means, but the ADA one below it is more what I had in mind. There you make up a synthetic type for this particular array, where the DW_AT_upper_bound for the array is a pointer to the variable that sets this.

However, both these examples assume that there are no more assignments to the variable that defines the size. To do the complete job you would also have to specify WHERE the array variable is allocated, so that the debugger could silently break there and capture the correct size before it gets altered. Then on entry into a function, the debugger would have to scan the variables defined in the function, and set these breakpoints for all the ones it finds.

Not rocket science, but definitely some work.

Jim


On Oct 26, 2007, at 1:15 AM, Jonas Maebe wrote:


On 26 Oct 2007, at 03:37, Jim Ingham wrote:

Making this work generically is not straightforward, which probably is why there's nothing in the DWARF standard to tell us how to deal with variable length arrays.

In Dwarf 3 it should be possible using DW_OP_push_object_address and DW_op_deref. They even give an example for variable length arrays in the appendix (p. 191 of http://dwarfstd.org/Dwarf3.pdf ). gdb doesn't support that yet though, afaik.



Jonas _______________________________________________ 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

_______________________________________________ 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: 
 >Variable array size declaration and the debugger (From: Nigel Redmon <email@hidden>)
 >Re: Variable array size declaration and the debugger (From: Jim Ingham <email@hidden>)
 >Re: Variable array size declaration and the debugger (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: Can I declare the Xcode 3 discussion open?
  • Next by Date: Re: X-Code 3?
  • Previous by thread: Re: Variable array size declaration and the debugger
  • Next by thread: Dimbulb Xcode include path question
  • Index(es):
    • Date
    • Thread