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

Re: STL vector debugging


  • Subject: Re: STL vector debugging
  • From: "Bruce Q. Hammond" <email@hidden>
  • Date: Mon, 06 Feb 2006 13:29:06 -0800

Title: Generic Template:
Robb,
Be sure set Xcode's "Level Of Debug Symbols" to "All Symbols" (-gfull)   for full debugging info  or else GDB will not have all the data it needs to debug templates.

You still may not have any built-in summary info for the objects, but at least you can drill down into the data structures.
This drove me nuts until I found out the the default settings (-g) were deficient in this regard.

Cheers,
--BQ


Robb Olsen-Albright wrote:
Greetings list,

The Mac team where I work (well, it's me and one other developer)  is working on converting our fairly large cross-platform Codewarrior project to Xcode (isn't everybody :) )

My question is regarding debugging code that uses STL vectors.

As an example, if I create a new c++ tool and create a vector of some POD type and fill it in, such as:

int main (int argc, char * const argv[]) {
std::vector<unsigned long> ulVector;
ulVector.push_back(1);
ulVector.push_back(2);
ulVector.push_back(3);
ulVector.push_back(4);
ulVector.push_back(5);
}

... and put a breakpoint somewhere after adding a value (like line 4), I may be interested in seeing some info about the vector (such as number of items, etc).

Well, in the current version of Xcode (2.2.1), I don't see any usable info in the debugger window for ulVector. In addition, drilling down into the contents of the variable, I don't see any members that provide useful info either.

I'm pretty sure that in some previous version of Xcode, I at least saw a size:{x} in the summary column. Codewarrior kinda sucked with their implementation of debugging views for stl, but it was getting better, and I could at least see a size member if I drilled down far enough. And now that VS.Net 2005 has improved debugging for STL, I'm getting some grief from my Windows counterparts too :)

Now, we have created data formatters (CustomDataView) for wide strings, so we can certainly roll our own and get something useful ourselves, but what's confusing me is the presence of the Vector.plist in /Library/Application Support/Apple/Developer Tools/CustomDataViews. It has entries for various flavours of vectors (including specifically 'unsigned long' which is why I used the example above), along with a formatting string that just includes %1%, %2%, etc., which are just referring to 'child paths' by number; however, nothing shows up in the summary column at all.

So, anybody know how to get the Vectors.plist file to do anything, or have any other info about debugging STL containers in Xcode 2.2.1?

thanks,

robb olsen-albright
email@hidden
vernier software & technology
portland, or


--

Bruce Q. Hammond

Sr. Software Engineer

Extensis

http://www.extensis.com/

phone: 503.274.2020 x228

email: email@hidden


Software management solutions for your fonts and creative assets


To learn more about Extensis Solutions, visit:

http://www.extensis.com/en/solutions/index.jsp  


Notice:  This communication may contain privileged or other confidential information.  If you are not the intended recipient, or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, or otherwise use the information.  Also, please indicate to the sender that you have received this email in error, and delete the copy you received.  Thank you.

 _______________________________________________
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

  • Follow-Ups:
    • Re: STL vector debugging
      • From: Steve Baxter <email@hidden>
References: 
 >STL vector debugging (From: Robb Olsen-Albright <email@hidden>)

  • Prev by Date: STL vector debugging
  • Next by Date: Re: Strip
  • Previous by thread: STL vector debugging
  • Next by thread: Re: STL vector debugging
  • Index(es):
    • Date
    • Thread