This is the mail archive of the insight@sourceware.org mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]