Re: [PATCH] print format does not match argument type

Keith Seitz <[email protected]> Tue, 10 Apr 2012 09:27:42 -0700
Newsgroups gmane.comp.debugging.insight
Message-ID <[email protected]>
On 04/10/2012 09:08 AM, Patrick Monnerat wrote:

> I think I've found the universal (well: almost!) coding:
>
> Use format "%llx" and cast arg to (unsigned long long): This is C99 and
> supported by MSVC, at least since 2005. Not OK for C89 :-(

To be honest, I didn't even know that we did this. [The register code is 
some of the oldest code in insight.] Passing host memory addresses into 
the interpreter and back again as a string is just plain evil.

The C code should create a map/hashtable and store the pointers to the 
types itself; then pass a string representation of the key into the 
interpreter.

But for now, if your suggestion works (Roland will hopefully verify), 
then I say we go with that for the time being.

Thank you!
Keith