diff --git a/build/jam/packages/Haiku b/build/jam/packages/Haiku index fb9dcb9c00..1096643758 100644 --- a/build/jam/packages/Haiku +++ b/build/jam/packages/Haiku @@ -40,7 +40,7 @@ AddFilesToPackage add-ons kernel busses usb : uhci ohci ehci AddFilesToPackage add-ons kernel busses virtio : virtio_pci ; AddFilesToPackage add-ons kernel console : vga_text ; AddFilesToPackage add-ons kernel debugger - : demangle disasm@x86 hangman + : demangle disasm@x86,x86_64 hangman invalidate_on_exit usb_keyboard qrencode@libqrencode run_on_exit ; AddFilesToPackage add-ons kernel file_systems : $(SYSTEM_ADD_ONS_FILE_SYSTEMS) ; diff --git a/src/add-ons/kernel/debugger/disasm/Jamfile b/src/add-ons/kernel/debugger/disasm/Jamfile index 034cf17cd5..408f61a510 100644 --- a/src/add-ons/kernel/debugger/disasm/Jamfile +++ b/src/add-ons/kernel/debugger/disasm/Jamfile @@ -7,4 +7,4 @@ KernelAddon 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) ; diff --git a/src/add-ons/kernel/debugger/disasm/x86/Jamfile b/src/add-ons/kernel/debugger/disasm/x86/Jamfile index 466bb9a701..d1fa382ef8 100644 --- a/src/add-ons/kernel/debugger/disasm/x86/Jamfile +++ b/src/add-ons/kernel/debugger/disasm/x86/Jamfile @@ -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 ] ; diff --git a/src/add-ons/kernel/debugger/disasm/x86/disasm_arch.cpp b/src/add-ons/kernel/debugger/disasm/x86/disasm_arch.cpp index a5b027343d..0be7831fe7 100644 --- a/src/add-ons/kernel/debugger/disasm/x86/disasm_arch.cpp +++ b/src/add-ons/kernel/debugger/disasm/x86/disasm_arch.cpp @@ -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);