mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-11 15:38:44 +00:00
8381765: AArch32: Capstone hsdis does not build
Reviewed-by: shade, erikj, jwaters
This commit is contained in:
parent
d68065e747
commit
e6bce14874
@ -44,6 +44,9 @@ ifeq ($(HSDIS_BACKEND), capstone)
|
||||
else ifeq ($(call isTargetCpuArch, aarch64), true)
|
||||
CAPSTONE_ARCH := CS_ARCH_$(CAPSTONE_ARCH_AARCH64_NAME)
|
||||
CAPSTONE_MODE := CS_MODE_ARM
|
||||
else ifeq ($(call isTargetCpuArch, arm), true)
|
||||
CAPSTONE_ARCH := CS_ARCH_ARM
|
||||
CAPSTONE_MODE := CS_MODE_ARM
|
||||
else
|
||||
$(error No support for Capstone on this platform)
|
||||
endif
|
||||
|
||||
@ -58,6 +58,7 @@
|
||||
and that causes invalid macro expansion.
|
||||
*/
|
||||
#undef aarch64
|
||||
#undef arm
|
||||
#include <capstone.h>
|
||||
|
||||
#include "hsdis.h"
|
||||
@ -163,9 +164,9 @@ void* decode_instructions_virtual(uintptr_t start_va, uintptr_t end_va,
|
||||
size_t count = cs_disasm(cs_handle, buffer, length, (uintptr_t) buffer, 0 , &insn);
|
||||
if (count) {
|
||||
for (unsigned int j = 0; j < count; j++) {
|
||||
(*event_callback)(event_stream, "insn", (void*) insn[j].address);
|
||||
(*event_callback)(event_stream, "insn", (void*)(uintptr_t) insn[j].address);
|
||||
print("%s\t\t%s", insn[j].mnemonic, insn[j].op_str);
|
||||
(*event_callback)(event_stream, "/insn", (void*) (insn[j].address + insn[j].size));
|
||||
(*event_callback)(event_stream, "/insn", (void*)(uintptr_t) (insn[j].address + insn[j].size));
|
||||
if (newline) {
|
||||
/* follow each complete insn by a nice newline */
|
||||
print("\n");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user