-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements LLVM based disassembler for the debugger.
This will work for all of our platforms, x86, ARMv7, and AArch64. Main issue with this is that LLVM's cmake files aren't correctly finding the LLVM install. Not sure if this is Ubuntu's issue or not, it may just work on other operating systems. We could potentially improve this, you can pass in a specific CPU in to the LLVM disassembler. This would probably affect latency times that are reported by LLVM's disassembly? This needs to be further investigated later.
- Loading branch information
1 parent
3ab921d
commit cb10bef
Showing
5 changed files
with
111 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# This file only exists because LLVM's cmake files are broken. | ||
# This affects both LLVM 3.4 and 3.5. | ||
# Hopefully when they fix their cmake system we don't need this garbage. | ||
list(APPEND LLVM_CONFIG_EXECUTABLES "llvm-config") | ||
list(APPEND LLVM_CONFIG_EXECUTABLES "llvm-config-3.5") | ||
list(APPEND LLVM_CONFIG_EXECUTABLES "llvm-config-3.4") | ||
|
||
foreach(LLVM_CONFIG_NAME ${LLVM_CONFIG_EXECUTABLES}) | ||
find_program(LLVM_CONFIG_EXE NAMES ${LLVM_CONFIG_NAME}) | ||
if (LLVM_CONFIG_EXE) | ||
set(LLVM_FOUND 1) | ||
execute_process(COMMAND ${LLVM_CONFIG_EXE} --includedir --prefix OUTPUT_VARIABLE LLVM_INCLUDE_DIRS | ||
OUTPUT_STRIP_TRAILING_WHITESPACE ) | ||
execute_process(COMMAND ${LLVM_CONFIG_EXE} --ldflags --prefix OUTPUT_VARIABLE LLVM_DEFINITIONS | ||
OUTPUT_STRIP_TRAILING_WHITESPACE ) | ||
execute_process(COMMAND ${LLVM_CONFIG_EXE} --libs Core --prefix OUTPUT_VARIABLE LLVM_LIBRARIES | ||
OUTPUT_STRIP_TRAILING_WHITESPACE ) | ||
execute_process(COMMAND ${LLVM_CONFIG_EXE} --version --prefix OUTPUT_VARIABLE LLVM_PACKAGE_VERSION | ||
OUTPUT_STRIP_TRAILING_WHITESPACE ) | ||
break() | ||
endif() | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters