12.07.2015 Views

Bug Hunter Diary

Bug Hunter Diary

Bug Hunter Diary

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

linux# pwd/home/tk/gdb-292/srclinux# cd readlinelinux# ./configure; makelinux# cd ../bfdlinux# ./configure --target=i386-apple-darwin --program-suffix=_osx; make;make install→linux# cd ../mmalloclinux# ./configure; make; make installlinux# cd ../intllinux# ./configure; make; make installlinux# cd ../libibertylinux# ./configure; make; make installlinux# cd ../opcodeslinux# ./configure --target=i386-apple-darwin --program-suffix=_osx; make;make install→To build the debugger itself, I needed to copy some header filesfrom the XNU kernel source code to the include directory of theLinux host:linux# cd /home/tklinux# tar -zxvf xnu-792.13.8.tar.gzlinux# cp -R xnu-792.13.8/osfmk/i386/ /usr/include/linux# cp -R xnu-792.13.8/bsd/i386/ /usr/include/cp: overwrite `/usr/include/i386/Makefile'? ycp: overwrite `/usr/include/i386/endian.h'? ycp: overwrite `/usr/include/i386/exec.h'? ycp: overwrite `/usr/include/i386/setjmp.h'? ylinux# cp -R xnu-792.13.8/osfmk/mach /usr/include/I then commented some typedefs in the new _types.h file to avoidcompile-time conflicts (see line 39, lines 43 to 49, and lines 78 to 81):linux# vi +38 /usr/include/i386/_types.h[..]38 #ifdef __GNUC__39 // typedef __signed char __int8_t;40 #else /* !__GNUC__ */41 typedef char __int8_t;42 #endif /* !__GNUC__ */43 // typedef unsigned char __uint8_t;44 // typedef short __int16_t;45 // typedef unsigned short __uint16_t;46 // typedef int __int32_t;47 // typedef unsigned int __uint32_t;48 // typedef long long __int64_t;49 // typedef unsigned long long __uint64_t;..Debugging 175

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!