A version-agnostic ghidra plugin for de-compiling Qualcomm Hexagon QDSP6
Python
43
348 commits
updated Sep 3, 2026
This is a WIP implementation of the Qualcomm Hexagon "QDSP6" architecture in Ghidra SLEIGH
Features:
Modern (12.1+) versions of Ghidra support Hexagon nativly, this plugin predates that. However, it has some advantages and some disadvantages compared to that plugin: see this comment for details.
Currently broken / unimplemented:
typeid and dynamic_cast metadata/dev/diag) handler tablesAdds a new window to the GUI that allows loading QDB files, decoding hashed log messages and finding thair usages.
There are flags to configure the behaviour of the generated pcode to either improve accuracy or quality of decompilation, (Select an address range and Ctrl+R to configure):
Enable accurate emulation of predicate registers. Useful if the code uses vectorized comparisons or if you want to emulate the code. By default we use the values 0 and 1 for False and True for scalar comparisons. Hexagon typically uses 0 and FF but this produces bad decompilation in Ghidra due to an outstanding decompiler bug
Some compiler flags cause the compiler to store immediate values directly in the program text. Jumping to a function that reads the value at the address LR and returning past it. This breaks Ghidra's ability to fully disassemble functions or decompile them. This flag allows marking a value as an inline data instruction that will allow the disassembler to keep going.
inline dataGhidra 12.0+ is recommended due to the fix for the "Overlapping Input Varnodes" error when functions take wide register inputs also affecting Hexagon 64-bit register pairs (GP-5863)
See notes at top of Hexagon/data/languages/hexagon.slaspec for additional details
Grab the latest release from releases for your Ghidra version (11.4.1 -> latest)
In Ghidra: File -> Install Extensions -> Green plus -> Downloaded Zip. Then restart Ghidra
Python
57.2%
Java
37.1%
C
3.1%
Makefile
1.6%
A version-agnostic ghidra plugin for de-compiling Qualcomm Hexagon QDSP6
Python
43
348 commits
updated Sep 3, 2026
This is a WIP implementation of the Qualcomm Hexagon "QDSP6" architecture in Ghidra SLEIGH
Features:
Modern (12.1+) versions of Ghidra support Hexagon nativly, this plugin predates that. However, it has some advantages and some disadvantages compared to that plugin: see this comment for details.
Currently broken / unimplemented:
typeid and dynamic_cast metadata/dev/diag) handler tablesAdds a new window to the GUI that allows loading QDB files, decoding hashed log messages and finding thair usages.
There are flags to configure the behaviour of the generated pcode to either improve accuracy or quality of decompilation, (Select an address range and Ctrl+R to configure):
Enable accurate emulation of predicate registers. Useful if the code uses vectorized comparisons or if you want to emulate the code. By default we use the values 0 and 1 for False and True for scalar comparisons. Hexagon typically uses 0 and FF but this produces bad decompilation in Ghidra due to an outstanding decompiler bug
Some compiler flags cause the compiler to store immediate values directly in the program text. Jumping to a function that reads the value at the address LR and returning past it. This breaks Ghidra's ability to fully disassemble functions or decompile them. This flag allows marking a value as an inline data instruction that will allow the disassembler to keep going.
inline dataGhidra 12.0+ is recommended due to the fix for the "Overlapping Input Varnodes" error when functions take wide register inputs also affecting Hexagon 64-bit register pairs (GP-5863)
See notes at top of Hexagon/data/languages/hexagon.slaspec for additional details
Grab the latest release from releases for your Ghidra version (11.4.1 -> latest)
In Ghidra: File -> Install Extensions -> Green plus -> Downloaded Zip. Then restart Ghidra
Python
57.2%
Java
37.1%
C
3.1%
Makefile
1.6%