disasm: add to the image on x86_64.

This commit is contained in:
Jérôme Duval 2018-01-13 15:20:21 +01:00
parent 0291f00909
commit 813b6c656f
4 changed files with 7 additions and 3 deletions

View File

@ -40,7 +40,7 @@ AddFilesToPackage add-ons kernel busses usb : <usb>uhci <usb>ohci <usb>ehci
AddFilesToPackage add-ons kernel busses virtio : virtio_pci ;
AddFilesToPackage add-ons kernel console : vga_text ;
AddFilesToPackage add-ons kernel debugger
: <kdebug>demangle <kdebug>disasm@x86 <kdebug>hangman
: <kdebug>demangle <kdebug>disasm@x86,x86_64 <kdebug>hangman
<kdebug>invalidate_on_exit <kdebug>usb_keyboard <kdebug>qrencode@libqrencode
<kdebug>run_on_exit ;
AddFilesToPackage add-ons kernel file_systems : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ;

View File

@ -7,4 +7,4 @@ KernelAddon <kdebug>disasm :
: disasm_arch.a
;
SubInclude HAIKU_TOP src add-ons kernel debugger disasm $(TARGET_ARCH) ;
SubInclude HAIKU_TOP src add-ons kernel debugger disasm $(TARGET_KERNEL_ARCH) ;

View File

@ -1,4 +1,4 @@
SubDir HAIKU_TOP src add-ons kernel debugger disasm $(TARGET_ARCH) ;
SubDir HAIKU_TOP src add-ons kernel debugger disasm $(TARGET_KERNEL_ARCH) ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) ] ;
UseHeaders [ LibraryHeaders udis86 ] ;

View File

@ -63,7 +63,11 @@ setup_disassembler(addr_t where)
{
ud_set_input_hook(&sUDState, &read_next_byte);
sCurrentReadAddress = where;
#ifdef __x86_64__
ud_set_mode(&sUDState, 64);
#else
ud_set_mode(&sUDState, 32);
#endif
ud_set_pc(&sUDState, (uint64_t)where);
ud_set_syntax(&sUDState, sSyntax);
ud_set_vendor(&sUDState, sVendor);