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: gdb of va_alist?



On 15 Oct 08, at 09:23, David Springer wrote:
Folks,
I am looking into some legacy code that is called from a third-party
library.  The function being called has this signature:

AStringClass PlatformSpecificImplClass::formatMessage(unsigned int code,
va_list* argList)


The problem is that on x86 platforms, |argList| seems to point to a valid
4-byte unicode string "(null)", but on PPC, this string appears to be
garbled. I say "appears to be" because I can't actually tell, since in
Xcode I have no visibility into |argList|. Is there a way I can examine the
contents of this pointer?

va_list is generally treated as an opaque type (it's defined in stdarg.h). If you know exactly how it's laid out, you can try something like


(gdb) x/4x argList

but don't assume anything about its layout outside a debugging context.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >gdb of va_alist? (From: "David Springer" <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.