From 14ccc9007a932a23201251ced4be4c898a62d6a5 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Wed, 5 Dec 2012 18:13:19 +0000 Subject: Added a option to the disassembler to print immediates as hex. This is for the lldb team so most of but not all of the values are to be printed as hex with this option. Some small values like the scale in an X86 address were requested to printed in decimal without the leading 0x. There may be some tweaks need to places that may still be in decimal that they want in hex. Specially for arm. I made my best guess. Any tweaks from here should be simple. I also did the best I know now with help from the C++ gurus creating the cleanest formatImm() utility function and containing the changes. But if someone has a better idea to make something cleaner I'm all ears and game for changing the implementation. rdar://8109283 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169393 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm-c/Disassembler.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/llvm-c') diff --git a/include/llvm-c/Disassembler.h b/include/llvm-c/Disassembler.h index b8c4ad9ad7..3146332fa8 100644 --- a/include/llvm-c/Disassembler.h +++ b/include/llvm-c/Disassembler.h @@ -153,6 +153,8 @@ int LLVMSetDisasmOptions(LLVMDisasmContextRef DC, uint64_t Options); /* The option to produce marked up assembly. */ #define LLVMDisassembler_Option_UseMarkup 1 +/* The option to print immediates as hex. */ +#define LLVMDisassembler_Option_PrintImmHex 2 /** * Dispose of a disassembler context. -- cgit v1.2.3-18-g5258