From: Nguyen A. Q. <aq...@gm...> - 2015-02-07 03:05:50
|
On Sat, Feb 7, 2015 at 2:07 AM, Yue Chen <yc...@gm...> wrote: > Dear all, > > I am working on a project that needs to disassemble FreeBSD kernel code in > memory. I tried to use Capstone in my kernel module. However, when I link > "libcapstone.a" with my kernel module object, there would be errors like no > symbol "sprintf", "memset", "memcpy", etc. After implementing them on my > own in another library, the kernel always crashes when executing "cs_open". > > I followed the instructions on http://www.capstone-engine.org/embed.html > to replace the memory allocation functions and vsnprintf with FreeBSD > kernel's, but the problems still exist. Anyone could give an idea or > example about how to implement it in a better way (even a better Makefile > to link them)? > we can only work out the solution if you know exactly why the crash happens. can you debug your code to answer this question? thanks, Q |