Open alexandernst opened 11 years ago
UD_STANDALONE should be defined as kernel source is built with KERNEL defined, are you building this as a regular module?
@jamieiles Yes indeed, I'm using udis86 inside my kernel module.
and KERNEL isn't defined? Can you try building your module with VERBOSE=1 given to the kernel build system?
@jamieiles No, KERNEL is defined. The problem is that # include <inttypes.h>
doesn't exist, which get's included if I compile from my module and use __UD_STANDALONE__
. See here: https://github.com/alexandernst/procmon/blob/master/udis86/libudis86/types.h#L48
I've simplified types.h. See 7e397e4. Let me know if that works.
There's a problem when compiling udis86.c because udint.h doesn't get UD_STANDALONE from anywhere (it doesn't include types.h) and so assumes non-standalone mode. I'll submit a fix if nobody else beats me to it :-)
How is this going? :) Should I try it with my kernel module?
I sent a pull request for this: https://github.com/vmt/udis86/pull/69
I'm having some problems using this library because of https://github.com/vmt/udis86/blob/master/libudis86/types.h#L48 which isn't found when compiling the problem for using it from inside a linux kernel module.
I found that just commenting this line will make everything compile and work fine. Any ideas is that's the proper fix to my problem? Or maybe my problem isn't because of this line but because of something else?