mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 01:39:21 +02:00
Compare commits
34 commits
facb409ad1
...
1dc626dcf9
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1dc626dcf9 | ||
![]() |
0b61b34bb9 | ||
![]() |
8689672ebe | ||
![]() |
f391ddb87c | ||
![]() |
daec88be49 | ||
![]() |
48adb5ec25 | ||
![]() |
0a436cbc4b | ||
![]() |
3abf7f765e | ||
![]() |
2e0e64b7c6 | ||
![]() |
cdc5af10e4 | ||
![]() |
154aa4460c | ||
![]() |
d38f512437 | ||
![]() |
3e240563ab | ||
![]() |
21b27795dd | ||
![]() |
105f9ef570 | ||
![]() |
729642cbf6 | ||
![]() |
f4ddff1a2c | ||
![]() |
328042f00f | ||
![]() |
465fba743b | ||
![]() |
2ca382da7d | ||
![]() |
ed7c7019cd | ||
![]() |
8c4bb84489 | ||
![]() |
dcd26f14d2 | ||
![]() |
cf61a2ffaf | ||
![]() |
f7138da6f7 | ||
![]() |
9c9938e066 | ||
![]() |
8055da80b8 | ||
![]() |
29b7cb6552 | ||
![]() |
28313c6574 | ||
![]() |
3e550cf08f | ||
![]() |
a638bb9a66 | ||
![]() |
22de131dd0 | ||
![]() |
2180fd2851 | ||
![]() |
ada4b5c4ae |
112 changed files with 1165 additions and 816 deletions
|
@ -107,6 +107,9 @@ def isNativeBinaryMakeTask(Task task, String platform) {
|
|||
*
|
||||
******************************************************************************************/
|
||||
def shouldSkipNative(task) {
|
||||
if (rootProject.hasProperty("skipAllNatives")) {
|
||||
return true;
|
||||
}
|
||||
return task.ext.has("skipNative") && task.ext.get("skipNative")
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,21 @@
|
|||
# Ghidra 11.4.2 Change History (August 2025)
|
||||
|
||||
### Improvements
|
||||
* _Build_. Ghidra now supports Gradle 9. (GP-5901)
|
||||
* _Decompiler_. Improved Decompiler's analysis of switches where the guard condition has been duplicated across multiple basic blocks that all feed into the same switch calculation. (GP-5889)
|
||||
* _Processors_. Added the SuperH GBR register to the unaffected list in the `.cspec` so that the Decompiler sees the value as preserved across subroutine calls. (GP-5912, Issue #4387)
|
||||
|
||||
### Bugs
|
||||
* _Analysis_. Fixed switch recovery analysis speed degredation on functions with multiple potential switches. (GP-5917)
|
||||
* _Decompiler_. Fixed a bug in the Decompiler's analysis of duplicated boolean expressions that could reverse the meaning of an expression. (GP-5915, Issue #8310)
|
||||
* _Decompiler_. Fixed an uncaught exception in the Decompiler that resulted when `highSymbol` was null. (GP-5919, Issue #8413)
|
||||
* _Exporter_. The `IntelHexExpoter` no longer fails due to falsely identifying a 32-bit program as 64-bit. Additionally, the address space option is no longer hidden. (GP-5910, Issue #8409)
|
||||
* _Importer:ELF_. Corrected ELF MIPS-64 packed REL relocation processing issue seen when the relocation type R_MIPS_REL32 is included (e.g., packed type 0x1203). When 64-bit pointers are used, this relocation must read 8 bytes from memory instead of 4 bytes to produce the correct addend value. (GP-5918)
|
||||
* _Importer:PE_. Fixed a regression that caused bad functions to be created in the middle of good functions in PE files with chained `IMAGE_FUNCTION_RUNTIME_ENTRY`s, and prevented some PE binaries from importing. (GP-5916, Issue #8414)
|
||||
* _Importer:PE_. The `IMAGE_RESOURCE_DIRECTORY_ENTRY` data type is now correctly defined as a structure instead of a union. (GP-5935, Issue #8446)
|
||||
* _PDB_. Fixed structure member issue, broken with 11.4 release, that could cause improper structure layout and Decompiler low-level errors. (GP-5928)
|
||||
* _Processors_. Added additional SPE and APU instructions to e500 PowerPC variant. (GP-5945)
|
||||
|
||||
# Ghidra 11.4.1 Change History (July 2025)
|
||||
|
||||
### Improvements
|
||||
|
|
|
@ -3,13 +3,6 @@
|
|||
##MODULE IP: MIT
|
||||
Module.manifest||GHIDRA||||END|
|
||||
README.md||GHIDRA||||END|
|
||||
data/debugger-launchers/kernel-dbgeng.bat||GHIDRA||||END|
|
||||
data/debugger-launchers/local-dbgeng-attach.bat||GHIDRA||||END|
|
||||
data/debugger-launchers/local-dbgeng-ext.bat||GHIDRA||||END|
|
||||
data/debugger-launchers/local-dbgeng-trace.bat||GHIDRA||||END|
|
||||
data/debugger-launchers/local-dbgeng.bat||GHIDRA||||END|
|
||||
data/debugger-launchers/remote-dbgeng.bat||GHIDRA||||END|
|
||||
data/debugger-launchers/svrcx-dbgeng.bat||GHIDRA||||END|
|
||||
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
|
||||
src/main/help/help/topics/dbgeng/dbgeng.html||GHIDRA||||END|
|
||||
src/main/py/LICENSE||GHIDRA||||END|
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
::@title dbgeng kernel
|
||||
::@desc <html><body width="300px">
|
||||
::@desc <h3>Kernel debugging using <tt>dbgeng</tt> (in a Python interpreter)</h3>
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
::@title dbgeng attach
|
||||
::@desc <html><body width="300px">
|
||||
::@desc <h3>Attach with <tt>dbgeng</tt> (in a Python interpreter)</h3>
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
::@title dbgeng extra options
|
||||
::@image-opt env:OPT_TARGET_IMG
|
||||
::@desc <html><body width="300px">
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
::@title dbgeng TTD
|
||||
::@desc <html><body width="300px">
|
||||
::@desc <h3>Open trace with <tt>dbgeng</tt> (in a Python interpreter)</h3>
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
::@title dbgeng
|
||||
::@image-opt env:OPT_TARGET_IMG
|
||||
::@desc <html><body width="300px">
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
::@title dbgeng remote
|
||||
::@desc <html><body width="300px">
|
||||
::@desc <h3>Connect to a remote debugger (via the .server interface)</h3>
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
::@title dbgeng svrcx
|
||||
::@image-opt env:OPT_TARGET_IMG
|
||||
::@desc <html><body width="300px">
|
||||
|
|
|
@ -2,16 +2,10 @@
|
|||
##MODULE IP: JSch License
|
||||
Module.manifest||GHIDRA||||END|
|
||||
README.md||GHIDRA||||END|
|
||||
data/debugger-launchers/local-gdb.ps1||GHIDRA||||END|
|
||||
data/debugger-launchers/qemu-sys-gdb.ps1||GHIDRA||||END|
|
||||
data/debugger-launchers/remote-gdb.ps1||GHIDRA||||END|
|
||||
data/debugger-launchers/ssh-gdb.ps1||GHIDRA||||END|
|
||||
data/debugger-launchers/ssh-gdbserver.ps1||GHIDRA||||END|
|
||||
data/scripts/fallback_info_proc_mappings.gdb||GHIDRA||||END|
|
||||
data/scripts/fallback_maintenance_info_sections.gdb||GHIDRA||||END|
|
||||
data/scripts/getpid-linux-i386.gdb||GHIDRA||||END|
|
||||
data/scripts/wine32_info_proc_mappings.gdb||GHIDRA||||END|
|
||||
data/support/gdbsetuputils.ps1||GHIDRA||||END|
|
||||
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
|
||||
src/main/help/help/topics/gdb/gdb.html||GHIDRA||||END|
|
||||
src/main/help/help/topics/gdb/images/GdbLauncher.png||GHIDRA||||END|
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
#@title gdb
|
||||
#@image-opt arg:1
|
||||
#@desc <html><body width="300px">
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
#@title gdb + qemu-system
|
||||
#@image-opt env:OPT_TARGET_IMG
|
||||
#@desc <html><body width="300px">
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
#@title gdb remote
|
||||
#@image-opt arg:1
|
||||
#@desc <html><body width="300px">
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
#@timeout 60000
|
||||
#@title gdb via ssh
|
||||
#@image-opt arg:1
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
#@timeout 60000
|
||||
#@title gdb + gdbserver via ssh
|
||||
#@image-opt arg:1
|
||||
|
|
|
@ -1,4 +1,18 @@
|
|||
|
||||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
. ..\..\..\Debugger-rmi-trace\data\support\setuputils.ps1
|
||||
|
||||
function Add-Gdb-Init-Args {
|
||||
|
|
|
@ -4,12 +4,6 @@
|
|||
Module.manifest||GHIDRA||||END|
|
||||
README.md||GHIDRA||||END|
|
||||
build.gradle||GHIDRA||||END|
|
||||
data/debugger-launchers/android-lldb.ps1||GHIDRA||||END|
|
||||
data/debugger-launchers/kernel-lldb.ps1||GHIDRA||||END|
|
||||
data/debugger-launchers/local-lldb.ps1||GHIDRA||||END|
|
||||
data/debugger-launchers/remote-lldb.ps1||GHIDRA||||END|
|
||||
data/debugger-launchers/ssh-lldb.ps1||GHIDRA||||END|
|
||||
data/support/lldbsetuputils.ps1||GHIDRA||||END|
|
||||
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
|
||||
src/main/help/help/topics/lldb/lldb.html||GHIDRA||||END|
|
||||
src/main/py/LICENSE||GHIDRA||||END|
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
#@title lldb Android
|
||||
#@image-opt arg:1
|
||||
#@desc <html><body width="300px">
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
#@title lldb kernel (kdp)
|
||||
#@desc <html><body width="300px">
|
||||
#@desc <h3>Launch with local <tt>lldb</tt> and connect to a remote kernel</h3>
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
#@title lldb
|
||||
#@image-opt arg:1
|
||||
#@desc <html><body width="300px">
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
#@title lldb remote (gdb)
|
||||
#@image-opt arg:1
|
||||
#@desc <html><body width="300px">
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
#@timeout 60000
|
||||
#@title lldb via ssh
|
||||
#@image-opt arg:1
|
||||
|
|
|
@ -1,4 +1,18 @@
|
|||
|
||||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
. ..\..\..\Debugger-rmi-trace\data\support\setuputils.ps1
|
||||
|
||||
function Add-Lldb-Init-Args {
|
||||
|
|
|
@ -5,7 +5,6 @@ DEVNOTES.txt||GHIDRA||||END|
|
|||
Module.manifest||GHIDRA||||END|
|
||||
README.md||GHIDRA||||END|
|
||||
data/ExtensionPoint.manifest||GHIDRA||||END|
|
||||
data/support/setuputils.ps1||GHIDRA||||END|
|
||||
src/main/help/help/TOC_Source.xml||GHIDRA||||END|
|
||||
src/main/help/help/topics/TraceRmiConnectionManagerPlugin/TraceRmiConnectionManagerPlugin.html||GHIDRA||||END|
|
||||
src/main/help/help/topics/TraceRmiConnectionManagerPlugin/images/ConnectDialog.png||GHIDRA||||END|
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
## ###
|
||||
# IP: GHIDRA
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
##
|
||||
function Find-App-Properties {
|
||||
[IO.FileInfo] $simple = "$Env:GHIDRA_HOME\Ghidra\applications.properties"
|
||||
if ($simple.Exists) {
|
||||
|
|
|
@ -24,7 +24,6 @@ apply plugin: 'eclipse'
|
|||
eclipse.project.name = 'Features BSim'
|
||||
|
||||
import java.nio.file.Files
|
||||
import org.gradle.util.GUtil
|
||||
|
||||
// NOTE: fetchDependencies.gradle must be updated if postgresql version changes
|
||||
def postgresql_distro = "postgresql-15.13.tar.gz"
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -184,7 +184,7 @@ public class ExporterDialog extends DialogComponentProvider implements AddressFa
|
|||
return "Unexpected exception validating options: " + e.getMessage();
|
||||
}
|
||||
};
|
||||
AddressFactoryService svc = (domainObject instanceof Program) ? null : this;
|
||||
AddressFactoryService svc = (domainObject instanceof Program) ? this : null;
|
||||
OptionsDialog optionsDialog = new OptionsDialog(options, validator, svc);
|
||||
optionsDialog
|
||||
.setHelpLocation(new HelpLocation("ExporterPlugin", getAnchorForSelectedFormat()));
|
||||
|
|
|
@ -144,8 +144,10 @@ public class ImageRuntimeFunctionEntries_X86 implements ImageRuntimeFunctionEntr
|
|||
*/
|
||||
public void markup(Program program) throws DuplicateNameException, IOException {
|
||||
|
||||
AbstractProgramLoader.markAsFunction(program, null,
|
||||
program.getImageBase().add(beginAddress));
|
||||
if (beginAddress != 0 && !unwindInfo.hasChainedUnwindInfo()) {
|
||||
AbstractProgramLoader.markAsFunction(program, null,
|
||||
program.getImageBase().add(beginAddress));
|
||||
}
|
||||
|
||||
if (unwindInfoAddressOrData > 0) {
|
||||
DataType dt = unwindInfo.toDataType();
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -161,8 +161,7 @@ public class ResourceDirectoryEntry implements StructConverter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns true if the parent resource directory is named,
|
||||
* false indicates an ID.
|
||||
* {@return true if the parent resource directory is named; false indicates an ID}
|
||||
*/
|
||||
public boolean isNameEntry() {
|
||||
return isNameEntry;
|
||||
|
@ -254,8 +253,14 @@ public class ResourceDirectoryEntry implements StructConverter {
|
|||
@Override
|
||||
public DataType toDataType() throws DuplicateNameException, IOException {
|
||||
StructureDataType nameStruct = new StructureDataType(NAME + "_" + "NameStruct", 0);
|
||||
nameStruct.add(DWORD, "NameOffset", null);
|
||||
nameStruct.add(DWORD, "NameIsString", null);
|
||||
nameStruct.setPackingEnabled(true);
|
||||
try {
|
||||
nameStruct.addBitField(DWORD, 31, "NameOffset", null);
|
||||
nameStruct.addBitField(DWORD, 1, "NameIsString", null);
|
||||
}
|
||||
catch (InvalidDataTypeException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
nameStruct.setCategoryPath(new CategoryPath("/PE"));
|
||||
|
||||
UnionDataType union1 = new UnionDataType(NAME + "_" + "NameUnion");
|
||||
|
@ -265,19 +270,25 @@ public class ResourceDirectoryEntry implements StructConverter {
|
|||
union1.setCategoryPath(new CategoryPath("/PE"));
|
||||
|
||||
StructureDataType offsetStruct = new StructureDataType(NAME + "_" + "DirectoryStruct", 0);
|
||||
offsetStruct.add(DWORD, "OffsetToDirectory", null);
|
||||
offsetStruct.add(DWORD, "DataIsDirectory", null);
|
||||
offsetStruct.setPackingEnabled(true);
|
||||
try {
|
||||
offsetStruct.addBitField(DWORD, 31, "OffsetToDirectory", null);
|
||||
offsetStruct.addBitField(DWORD, 1, "DataIsDirectory", null);
|
||||
}
|
||||
catch (InvalidDataTypeException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
|
||||
UnionDataType union2 = new UnionDataType(NAME + "_" + "DirectoryUnion");
|
||||
union2.add(DWORD, "OffsetToData", null);
|
||||
union2.add(offsetStruct, offsetStruct.getName(), null);
|
||||
|
||||
UnionDataType union3 = new UnionDataType(NAME);
|
||||
union3.add(union1, "NameUnion", null);
|
||||
union3.add(union2, "DirectoryUnion", null);
|
||||
StructureDataType struct = new StructureDataType(NAME, 0);
|
||||
struct.add(union1, "NameUnion", null);
|
||||
struct.add(union2, "DirectoryUnion", null);
|
||||
|
||||
union3.setCategoryPath(new CategoryPath("/PE"));
|
||||
return union3;
|
||||
struct.setCategoryPath(new CategoryPath("/PE"));
|
||||
return struct;
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -28,7 +28,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift AssociatedTypeDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
*/
|
||||
public final class AssociatedTypeDescriptor extends SwiftTypeMetadataStructure {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -26,7 +26,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift AssociatedTypeRecord structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
*/
|
||||
public final class AssociatedTypeRecord extends SwiftTypeMetadataStructure {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -26,7 +26,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift BuiltinTypeDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
*/
|
||||
public final class BuiltinTypeDescriptor extends SwiftTypeMetadataStructure {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -27,7 +27,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift CaptureDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
*/
|
||||
public final class CaptureDescriptor extends SwiftTypeMetadataStructure {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -26,7 +26,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift CaptureTypeRecord structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
*/
|
||||
public final class CaptureTypeRecord extends SwiftTypeMetadataStructure {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -18,7 +18,7 @@ package ghidra.app.util.bin.format.swift.types;
|
|||
/**
|
||||
* Swift ContextDescriptorKind values
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/ABI/MetadataValues.h">swift/ABI/MetadataValues.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/ABI/MetadataValues.h">swift/ABI/MetadataValues.h</a>
|
||||
*/
|
||||
public class ContextDescriptorKind {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -28,7 +28,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift FieldDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
*/
|
||||
public final class FieldDescriptor extends SwiftTypeMetadataStructure {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -26,7 +26,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift FieldRecord structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
*/
|
||||
public final class FieldRecord extends SwiftTypeMetadataStructure {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -26,7 +26,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift MetadataSourceRecord structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
*/
|
||||
public final class MetadataSourceRecord extends SwiftTypeMetadataStructure {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -26,7 +26,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift MultiPayloadEnumDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/RemoteInspection/Records.h">swift/RemoteInspection/Records.h</a>
|
||||
*/
|
||||
public final class MultiPayloadEnumDescriptor extends SwiftTypeMetadataStructure {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -25,7 +25,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift TargetClassDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
*/
|
||||
public final class TargetClassDescriptor extends TargetTypeContextDescriptor {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -26,7 +26,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift TargetContextDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
*/
|
||||
public class TargetContextDescriptor extends SwiftTypeMetadataStructure {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -26,7 +26,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift TargetEnumDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
*/
|
||||
public final class TargetEnumDescriptor extends TargetTypeContextDescriptor {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -26,7 +26,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift TargetProtocolConformanceDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
*/
|
||||
public final class TargetProtocolConformanceDescriptor extends SwiftTypeMetadataStructure {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -27,7 +27,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift TargetProtocolDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
*/
|
||||
public final class TargetProtocolDescriptor extends TargetContextDescriptor {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -26,7 +26,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift TargetStructDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
*/
|
||||
public final class TargetStructDescriptor extends TargetTypeContextDescriptor {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -26,7 +26,7 @@ import ghidra.util.exception.DuplicateNameException;
|
|||
/**
|
||||
* Represents a Swift TargetTypeContextDescriptor structure
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/ABI/Metadata.h">swift/ABI/Metadata.h</a>
|
||||
*/
|
||||
public class TargetTypeContextDescriptor extends TargetContextDescriptor {
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -150,15 +150,10 @@ public class IntelHexExporter extends Exporter {
|
|||
|
||||
log.clear();
|
||||
|
||||
if (!(domainObj instanceof Program)) {
|
||||
if (!(domainObj instanceof Program program)) {
|
||||
log.appendMsg("Unsupported type: " + domainObj.getClass().getName());
|
||||
return false;
|
||||
}
|
||||
Program program = (Program) domainObj;
|
||||
if (program.getMaxAddress().getSize() > 32) {
|
||||
log.appendMsg("Cannot be used for programs larger than 32 bits");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (addressSpaceOption == null || recordSizeOption == null) {
|
||||
getOptions(() -> program);
|
||||
|
@ -168,12 +163,23 @@ public class IntelHexExporter extends Exporter {
|
|||
|
||||
Memory memory = program.getMemory();
|
||||
|
||||
if (addrSet == null) {
|
||||
addrSet = memory;
|
||||
AddressSet set = new AddressSet(addrSet != null ? addrSet : memory);
|
||||
|
||||
for (MemoryBlock block : memory.getBlocks()) {
|
||||
if (!block.isInitialized() ||
|
||||
block.getStart().getAddressSpace() != addressSpaceOption.getValue()) {
|
||||
set.delete(new AddressRangeImpl(block.getStart(), block.getEnd()));
|
||||
}
|
||||
}
|
||||
|
||||
Address maxAddr = set.getMaxAddress();
|
||||
if (maxAddr != null && maxAddr.getSize() > 32) {
|
||||
log.appendMsg("Cannot be used for address spaces larger than 32 bits");
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
List<IntelHexRecord> records = dumpMemory(program, memory, addrSet, monitor);
|
||||
List<IntelHexRecord> records = dumpMemory(program, memory, set, monitor);
|
||||
for (IntelHexRecord record : records) {
|
||||
writer.println(record.format());
|
||||
}
|
||||
|
@ -198,17 +204,7 @@ public class IntelHexExporter extends Exporter {
|
|||
|
||||
IntelHexRecordWriter writer = new IntelHexRecordWriter(size, dropBytes);
|
||||
|
||||
AddressSet set = new AddressSet(addrSetView);
|
||||
|
||||
MemoryBlock[] blocks = memory.getBlocks();
|
||||
for (MemoryBlock block : blocks) {
|
||||
if (!block.isInitialized() ||
|
||||
block.getStart().getAddressSpace() != addressSpaceOption.getValue()) {
|
||||
set.delete(new AddressRangeImpl(block.getStart(), block.getEnd()));
|
||||
}
|
||||
}
|
||||
|
||||
AddressIterator addresses = set.getAddresses(true);
|
||||
AddressIterator addresses = addrSetView.getAddresses(true);
|
||||
while (addresses.hasNext()) {
|
||||
Address address = addresses.next();
|
||||
byte b = memory.getByte(address);
|
||||
|
@ -220,7 +216,7 @@ public class IntelHexExporter extends Exporter {
|
|||
program.getSymbolTable().getExternalEntryPointIterator();
|
||||
while (entryPoint == null && entryPointIterator.hasNext()) {
|
||||
Address address = entryPointIterator.next();
|
||||
if (set.contains(address)) {
|
||||
if (addrSetView.contains(address)) {
|
||||
entryPoint = address;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -638,6 +638,17 @@ JumpTable *FlowBlock::getJumptable(void) const
|
|||
return jt;
|
||||
}
|
||||
|
||||
/// Print a single unique identifier for \b this block
|
||||
/// \param s is the output stream
|
||||
void FlowBlock::printShortHeader(ostream &s) const
|
||||
|
||||
{
|
||||
s << "Block_" << dec << index;
|
||||
if (!getStart().isInvalid()) {
|
||||
s << ':' << getStart();
|
||||
}
|
||||
}
|
||||
|
||||
/// Given a string describing a FlowBlock type, return the block_type.
|
||||
/// This is currently only used by the decode() process.
|
||||
/// TODO: Fill in the remaining names and types
|
||||
|
@ -1293,8 +1304,24 @@ void BlockGraph::printRaw(ostream &s) const
|
|||
|
||||
printHeader(s);
|
||||
s << endl;
|
||||
for(iter=list.begin();iter!=list.end();++iter)
|
||||
(*iter)->printRaw(s);
|
||||
if (list.empty()) return;
|
||||
iter = list.begin();
|
||||
FlowBlock *lastBl = *iter;
|
||||
++iter;
|
||||
lastBl->printRaw(s);
|
||||
for(;iter!=list.end();++iter) {
|
||||
FlowBlock *curBl = *iter;
|
||||
lastBl->printRawImpliedGoto(s, curBl);
|
||||
curBl->printRaw(s);
|
||||
lastBl = curBl;
|
||||
}
|
||||
}
|
||||
|
||||
void BlockGraph::printRawImpliedGoto(ostream &s,const FlowBlock *nextBlock) const
|
||||
|
||||
{
|
||||
if (list.empty()) return;
|
||||
list.back()->printRawImpliedGoto(s, nextBlock);
|
||||
}
|
||||
|
||||
PcodeOp *BlockGraph::firstOp(void) const
|
||||
|
@ -2658,6 +2685,24 @@ void BlockBasic::printRaw(ostream &s) const
|
|||
}
|
||||
}
|
||||
|
||||
void BlockBasic::printRawImpliedGoto(ostream &s,const FlowBlock *nextBlock) const
|
||||
|
||||
{
|
||||
if (sizeOut() != 1) return;
|
||||
const FlowBlock *outBlock = getOut(0);
|
||||
if (nextBlock->getType() != t_basic) {
|
||||
nextBlock = nextBlock->getFrontLeaf();
|
||||
if (nextBlock == (const FlowBlock *)0) return;
|
||||
nextBlock = nextBlock->subBlock(0);
|
||||
}
|
||||
if (getOut(0) == nextBlock) return;
|
||||
if (!op.empty() && op.back()->isBranch()) return;
|
||||
getStop().printRaw(s);
|
||||
s << ": \t[ goto ";
|
||||
outBlock->printShortHeader(s);
|
||||
s << " ]" << endl;
|
||||
}
|
||||
|
||||
/// \brief Check for values created in \b this block that flow outside the block.
|
||||
///
|
||||
/// The block can calculate a value for a BRANCHIND or CBRANCH and can copy values and this method will still
|
||||
|
|
|
@ -210,6 +210,14 @@ public:
|
|||
/// \param s is the given stream to write to
|
||||
virtual void printRaw(ostream &s) const {}
|
||||
|
||||
/// \brief If the \e out block of \b this is not the given next block, print an implied \b goto to the out block
|
||||
///
|
||||
/// In order to see where \b this block is flowing to, if there is no explicit branch op, and if the next block
|
||||
/// being printed is \e not the fallthru branch, print the destination block as an implied \b goto op.
|
||||
/// \param s is the output stream
|
||||
/// \param nextBlock is the given nextBlock being printed
|
||||
virtual void printRawImpliedGoto(ostream &s,const FlowBlock *nextBlock) const {}
|
||||
|
||||
virtual void emit(PrintLanguage *lng) const; ///<Emit the instructions in \b this FlowBlock as structured code
|
||||
|
||||
/// \brief Get the leaf block from which \b this block exits
|
||||
|
@ -338,6 +346,7 @@ public:
|
|||
bool isGotoIn(int4 i) const { return ((intothis[i].label & (f_irreducible|f_goto_edge))!=0); } ///< Is the i-th incoming edge unstructured
|
||||
bool isGotoOut(int4 i) const { return ((outofthis[i].label & (f_irreducible|f_goto_edge))!=0); } ///< Is the i-th outgoing edge unstructured
|
||||
JumpTable *getJumptable(void) const; ///< Get the JumpTable associated \b this block
|
||||
void printShortHeader(ostream &s) const; ///< Print a short identifier for the block
|
||||
static block_type nameToType(const string &name); ///< Get the block_type associated with a name string
|
||||
static string typeToName(block_type bt); ///< Get the name string associated with a block_type
|
||||
static bool compareBlockIndex(const FlowBlock *bl1,const FlowBlock *bl2); ///< Compare FlowBlock by index
|
||||
|
@ -380,6 +389,7 @@ public:
|
|||
virtual void scopeBreak(int4 curexit,int4 curloopexit);
|
||||
virtual void printTree(ostream &s,int4 level) const;
|
||||
virtual void printRaw(ostream &s) const;
|
||||
void printRawImpliedGoto(ostream &s,const FlowBlock *nextBlock) const;
|
||||
virtual void emit(PrintLanguage *lng) const { lng->emitBlockGraph(this); }
|
||||
virtual PcodeOp *firstOp(void) const;
|
||||
virtual FlowBlock *nextFlowAfter(const FlowBlock *bl) const;
|
||||
|
@ -473,6 +483,7 @@ public:
|
|||
virtual void decodeBody(Decoder &decoder);
|
||||
virtual void printHeader(ostream &s) const;
|
||||
virtual void printRaw(ostream &s) const;
|
||||
virtual void printRawImpliedGoto(ostream &s,const FlowBlock *nextBlock) const;
|
||||
virtual void emit(PrintLanguage *lng) const { lng->emitBlockBasic(this); }
|
||||
virtual const FlowBlock *getExitLeaf(void) const { return this; }
|
||||
virtual PcodeOp *firstOp(void) const;
|
||||
|
@ -515,6 +526,7 @@ public:
|
|||
virtual void printHeader(ostream &s) const;
|
||||
virtual void printTree(ostream &s,int4 level) const;
|
||||
virtual void printRaw(ostream &s) const { copy->printRaw(s); }
|
||||
virtual void printRawImpliedGoto(ostream &s,const FlowBlock *nextBlock) const { copy->printRawImpliedGoto(s, nextBlock); }
|
||||
virtual void emit(PrintLanguage *lng) const { lng->emitBlockCopy(this); }
|
||||
virtual const FlowBlock *getExitLeaf(void) const { return this; }
|
||||
virtual PcodeOp *firstOp(void) const { return copy->firstOp(); }
|
||||
|
|
|
@ -2074,18 +2074,10 @@ bool ConditionalJoin::match(BlockBasic *b1,BlockBasic *b2)
|
|||
exita = (BlockBasic *)block1->getOut(0);
|
||||
exitb = (BlockBasic *)block1->getOut(1);
|
||||
if (exita == exitb) return false;
|
||||
if (block2->getOut(0) == exita) {
|
||||
if (block2->getOut(1) != exitb) return false;
|
||||
a_in2 = block2->getOutRevIndex(0);
|
||||
b_in2 = block2->getOutRevIndex(1);
|
||||
}
|
||||
else if (block2->getOut(0) == exitb) {
|
||||
if (block2->getOut(1) != exita) return false;
|
||||
a_in2 = block2->getOutRevIndex(1);
|
||||
b_in2 = block2->getOutRevIndex(0);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
if (block2->getOut(0) != exita) return false; // False exits must match
|
||||
if (block2->getOut(1) != exitb) return false; // True exits must match
|
||||
a_in2 = block2->getOutRevIndex(0);
|
||||
b_in2 = block2->getOutRevIndex(1);
|
||||
a_in1 = block1->getOutRevIndex(0);
|
||||
b_in1 = block1->getOutRevIndex(1);
|
||||
|
||||
|
|
|
@ -2169,8 +2169,19 @@ int4 ActionLikelyTrash::apply(Funcdata &data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/// \param vn is the given Varnode
|
||||
/// \return \b true if it is a constant or a COPY of a constant
|
||||
bool ActionRestructureVarnode::isCopyConstant(Varnode *vn)
|
||||
|
||||
{
|
||||
if (vn->isConstant()) return true;
|
||||
if (!vn->isWritten()) return false;
|
||||
if (vn->getDef()->code() != CPUI_COPY) return false;
|
||||
return vn->getDef()->getIn(0)->isConstant();
|
||||
}
|
||||
|
||||
/// Return \b true if either the Varnode is a constant or if it is the not yet simplified
|
||||
/// INT_ADD of constants.
|
||||
/// COPY or INT_ADD of constants.
|
||||
/// \param vn is the given Varnode to test
|
||||
/// \return \b true if the Varnode will be a constant
|
||||
bool ActionRestructureVarnode::isDelayedConstant(Varnode *vn)
|
||||
|
@ -2179,14 +2190,13 @@ bool ActionRestructureVarnode::isDelayedConstant(Varnode *vn)
|
|||
if (vn->isConstant()) return true;
|
||||
if (!vn->isWritten()) return false;
|
||||
PcodeOp *op = vn->getDef();
|
||||
if (op->code() != CPUI_INT_ADD) return false;
|
||||
if (!op->getIn(1)->isConstant()) return false;
|
||||
Varnode *cvn = op->getIn(0);
|
||||
if (cvn->isConstant()) return true;
|
||||
if (!cvn->isWritten()) return false;
|
||||
PcodeOp *copy = cvn->getDef();
|
||||
if (copy->code() != CPUI_COPY) return false;
|
||||
return copy->getIn(0)->isConstant();
|
||||
OpCode opc = op->code();
|
||||
if (opc == CPUI_COPY)
|
||||
return op->getIn(0)->isConstant();
|
||||
if (opc != CPUI_INT_ADD) return false;
|
||||
if (!isCopyConstant(op->getIn(1))) return false;
|
||||
if (!isCopyConstant(op->getIn(0))) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// Test if the path to the given BRANCHIND originates from a constant but passes through INDIRECT operations.
|
||||
|
@ -5349,7 +5359,7 @@ void ActionDatabase::buildDefaultGroups(void)
|
|||
setGroup("decompile",members);
|
||||
|
||||
const char *jumptab[] = { "base", "noproto", "localrecovery", "deadcode", "stackptrflow",
|
||||
"stackvars", "analysis", "segment", "subvar", "conditionalexe", "" };
|
||||
"stackvars", "analysis", "segment", "subvar", "normalizebranches", "conditionalexe", "" };
|
||||
setGroup("jumptable",jumptab);
|
||||
|
||||
const char *normali[] = { "base", "protorecovery", "protorecovery_b", "deindirect", "localrecovery",
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -831,6 +831,7 @@ public:
|
|||
/// This produces on intermediate view of symbols on the stack.
|
||||
class ActionRestructureVarnode : public Action {
|
||||
int4 numpass; ///< Number of passes performed for this function
|
||||
static bool isCopyConstant(Varnode *vn); ///< Is the given Varnode a constant or a COPY of a constant
|
||||
static bool isDelayedConstant(Varnode *vn); ///< Determine if given Varnode is or will be a constant
|
||||
static void protectSwitchPathIndirects(PcodeOp *op); ///< Protect path to the given switch from INDIRECT collapse
|
||||
static void protectSwitchPaths(Funcdata &data); ///< Look for switches and protect path of switch variable
|
||||
|
|
|
@ -1284,6 +1284,18 @@ bool JumpBasic::flowsOnlyToModel(Varnode *vn,PcodeOp *trailOp)
|
|||
return true;
|
||||
}
|
||||
|
||||
/// \param arr is the array of Varnodes
|
||||
/// \return \b true if all elements are the same
|
||||
bool JumpBasic::duplicateVarnodes(const vector<Varnode *> &arr)
|
||||
|
||||
{
|
||||
Varnode *vn = arr[0];
|
||||
for(int4 i=1;i<arr.size();++i) {
|
||||
if (arr[i] != vn) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/// All CBRANCHs in addition to flowing to the given block, must also flow to another common block,
|
||||
/// and each boolean value must select between the given block and the common block in the same way.
|
||||
/// If this flow exists, \b true is returned and the boolean Varnode inputs to each CBRANCH are passed back.
|
||||
|
@ -1338,9 +1350,14 @@ void JumpBasic::checkUnrolledGuard(BlockBasic *bl,int4 maxpullback,bool usenzmas
|
|||
int4 indpathstore = bl->getIn(0)->getFlipPath() ? 1-indpath : indpath;
|
||||
PcodeOp *readOp = cbranch;
|
||||
for(int4 j=0;j<maxpullback;++j) {
|
||||
PcodeOp *multiOp = bl->findMultiequal(varArray);
|
||||
if (multiOp != (PcodeOp *)0) {
|
||||
selectguards.push_back(GuardRecord(cbranch,readOp,indpathstore,rng,multiOp->getOut(),true));
|
||||
if (duplicateVarnodes(varArray)) {
|
||||
selectguards.push_back(GuardRecord(cbranch,readOp,indpathstore,rng,varArray[0],true));
|
||||
}
|
||||
else {
|
||||
PcodeOp *multiOp = bl->findMultiequal(varArray);
|
||||
if (multiOp != (PcodeOp *)0) {
|
||||
selectguards.push_back(GuardRecord(cbranch,readOp,indpathstore,rng,multiOp->getOut(),true));
|
||||
}
|
||||
}
|
||||
Varnode *markup; // Throw away markup information
|
||||
Varnode *vn = varArray[0];
|
||||
|
|
|
@ -382,6 +382,7 @@ protected:
|
|||
static int4 getStride(Varnode *vn); ///< Get the step/stride associated with the Varnode
|
||||
static uintb backup2Switch(Funcdata *fd,uintb output,Varnode *outvn,Varnode *invn);
|
||||
static uintb getMaxValue(Varnode *vn); ///< Get maximum value associated with the given Varnode
|
||||
static bool duplicateVarnodes(const vector<Varnode *> &arr); ///< Return \b true if all array elements are the same Varnode
|
||||
void findDeterminingVarnodes(PcodeOp *op,int4 slot);
|
||||
void analyzeGuards(BlockBasic *bl,int4 pathout);
|
||||
void calcRange(Varnode *vn,CircleRange &rng) const;
|
||||
|
|
|
@ -591,7 +591,12 @@ void TypeOpBranch::printRaw(ostream &s,const PcodeOp *op)
|
|||
|
||||
{
|
||||
s << name << ' ';
|
||||
Varnode::printRaw(s,op->getIn(0));
|
||||
const BlockBasic *parent = op->getParent();
|
||||
if (parent != (const BlockBasic *)0 && parent->sizeOut() == 1) {
|
||||
parent->getOut(0)->printShortHeader(s);
|
||||
}
|
||||
else
|
||||
Varnode::printRaw(s,op->getIn(0));
|
||||
}
|
||||
|
||||
TypeOpCbranch::TypeOpCbranch(TypeFactory *t) : TypeOp(t,CPUI_CBRANCH,"goto")
|
||||
|
@ -617,13 +622,25 @@ void TypeOpCbranch::printRaw(ostream &s,const PcodeOp *op)
|
|||
|
||||
{
|
||||
s << name << ' ';
|
||||
Varnode::printRaw(s,op->getIn(0)); // Print the distant (non-fallthru) destination
|
||||
const BlockBasic *parent = op->getParent();
|
||||
FlowBlock *falseOut = (FlowBlock *)0;
|
||||
if (parent != (const BlockBasic *)0 && parent->sizeOut() == 2) {
|
||||
FlowBlock *trueOut = parent->getTrueOut();
|
||||
falseOut = parent->getFalseOut();
|
||||
trueOut->printShortHeader(s);
|
||||
}
|
||||
else
|
||||
Varnode::printRaw(s,op->getIn(0)); // Print the distant (non-fallthru) destination
|
||||
s << " if (";
|
||||
Varnode::printRaw(s,op->getIn(1));
|
||||
if (op->isBooleanFlip()^op->isFallthruTrue())
|
||||
if (op->isBooleanFlip())
|
||||
s << " == 0)";
|
||||
else
|
||||
s << " != 0)";
|
||||
if (falseOut != (FlowBlock *)0) {
|
||||
s << " else ";
|
||||
falseOut->printShortHeader(s);
|
||||
}
|
||||
}
|
||||
|
||||
TypeOpBranchind::TypeOpBranchind(TypeFactory *t) : TypeOp(t,CPUI_BRANCHIND,"switch")
|
||||
|
|
|
@ -1047,7 +1047,7 @@ public class DecompilerPanel extends JPanel implements FieldMouseListener, Field
|
|||
}
|
||||
|
||||
HighSymbol highSymbol = highVar.getSymbol();
|
||||
if (highSymbol.isParameter()) {
|
||||
if (highSymbol != null && highSymbol.isParameter()) {
|
||||
// decomp param that is not in the listing; put on signature
|
||||
return new FunctionNameDecompilerLocation(program, entryPoint, cvt.getText(), info);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class DecompilerSwitchAnalyzer extends AbstractAnalyzer {
|
|||
// cache for pcode callother injection payloads
|
||||
private HashMap<Long, InjectPayload> injectPayloadCache = new HashMap<>();
|
||||
|
||||
private boolean hitNonReturningFunction = false;
|
||||
private boolean hitNonReturningThunkFunction = false;
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
|
@ -103,12 +103,12 @@ public class DecompilerSwitchAnalyzer extends AbstractAnalyzer {
|
|||
return true;
|
||||
}
|
||||
|
||||
List<Function> definedFunctions = new ArrayList<>();
|
||||
List<Function> undefinedFunctions = new ArrayList<>();
|
||||
Collection<Function> definedFunctions = new HashSet<>();
|
||||
Collection<Function> undefinedFunctions = new HashSet<>();
|
||||
findFunctions(program, locations, definedFunctions, undefinedFunctions, monitor);
|
||||
|
||||
if (hitNonReturningFunction) {
|
||||
hitNonReturningFunction = false;
|
||||
if (hitNonReturningThunkFunction) {
|
||||
hitNonReturningThunkFunction = false;
|
||||
// if hit a non-returning function, code needs to be fixed up
|
||||
// before wasting time on analyzing potentially bad code
|
||||
// This will also clean out locations that were thunks for the next go round.
|
||||
|
@ -209,8 +209,9 @@ public class DecompilerSwitchAnalyzer extends AbstractAnalyzer {
|
|||
}
|
||||
// kids, don't do thunks
|
||||
if (function.isThunk()) {
|
||||
// unless they are non-returning
|
||||
if (function.hasNoReturn()) {
|
||||
hitNonReturningFunction = true;
|
||||
hitNonReturningThunkFunction = true;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -428,7 +429,7 @@ public class DecompilerSwitchAnalyzer extends AbstractAnalyzer {
|
|||
program.getFunctionManager().getFunctionContaining(location);
|
||||
if (fixupFunc != null) {
|
||||
CreateFunctionCmd.fixupFunctionBody(program, fixupFunc, monitor);
|
||||
// send function back, so non-returning nature will be picked up by decompiler
|
||||
// send function back, so non-returning nature will be picked up
|
||||
if (fixupFunc.hasNoReturn()) {
|
||||
return fixupFunc;
|
||||
}
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -130,7 +130,7 @@ public class DecompilerDataTypeReferenceFinder implements DataTypeReferenceFinde
|
|||
}
|
||||
|
||||
results.addAll(callers);
|
||||
|
||||
|
||||
// Add any callers to external function that use any form of the data type
|
||||
it = listing.getExternalFunctions();
|
||||
callers = new HashSet<>();
|
||||
|
@ -142,7 +142,7 @@ public class DecompilerDataTypeReferenceFinder implements DataTypeReferenceFinde
|
|||
callers.addAll(callingFunctions);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
results.addAll(callers);
|
||||
|
||||
return results;
|
||||
|
@ -298,16 +298,12 @@ public class DecompilerDataTypeReferenceFinder implements DataTypeReferenceFinde
|
|||
private DataType dataType;
|
||||
private FieldMatcher fieldMatcher;
|
||||
|
||||
private String dbgPrefix;
|
||||
|
||||
DecompilerDataTypeFinder(DecompileResults results, Function function, DataType dataType,
|
||||
FieldMatcher fieldMatcher) {
|
||||
this.decompilation = results;
|
||||
this.function = function;
|
||||
this.dataType = dataType;
|
||||
this.fieldMatcher = fieldMatcher;
|
||||
|
||||
this.dbgPrefix = "f: " + function + "\n\t";
|
||||
}
|
||||
|
||||
List<DataTypeReference> findUsage() {
|
||||
|
@ -331,16 +327,16 @@ public class DecompilerDataTypeReferenceFinder implements DataTypeReferenceFinde
|
|||
return;
|
||||
}
|
||||
|
||||
DtrfDbg.println(dbgPrefix + "checking vars...");
|
||||
DtrfDbg.println(function, "checking vars...");
|
||||
List<DecompilerReference> variables = findVariableReferences(tokens);
|
||||
DtrfDbg.println(dbgPrefix + "DONE searching decompilation\nMatching results");
|
||||
DtrfDbg.println(function, "DONE searching decompilation\nMatching results");
|
||||
|
||||
variables.forEach(v -> matchUsage(v, results));
|
||||
}
|
||||
|
||||
/** Finds any search input match in the given reference */
|
||||
private void matchUsage(DecompilerReference reference, List<DataTypeReference> results) {
|
||||
DtrfDbg.println("Checking " + reference);
|
||||
DtrfDbg.println(function, "Checking " + reference);
|
||||
reference.accumulateMatches(dataType, fieldMatcher, results);
|
||||
}
|
||||
|
||||
|
@ -388,12 +384,12 @@ public class DecompilerDataTypeReferenceFinder implements DataTypeReferenceFinde
|
|||
VariableAccessDR access = null;
|
||||
for (ClangToken token : filteredTokens) {
|
||||
|
||||
DtrfDbg.println(dbgPrefix + "checking token: " + token);
|
||||
DtrfDbg.println(function, "checking token: " + token);
|
||||
|
||||
if (token instanceof ClangTypeToken) {
|
||||
|
||||
if (token.Parent() instanceof ClangReturnType) {
|
||||
DtrfDbg.println(dbgPrefix + "\treturn type: " + line);
|
||||
DtrfDbg.println(function, "\treturn type: " + line);
|
||||
|
||||
results.add(new ReturnTypeDR(line, (ClangTypeToken) token));
|
||||
}
|
||||
|
@ -401,13 +397,13 @@ public class DecompilerDataTypeReferenceFinder implements DataTypeReferenceFinde
|
|||
// Note: variable refs will get their variable in an upcoming token
|
||||
if (isFunctionPrototype(token.Parent())) {
|
||||
|
||||
DtrfDbg.println(dbgPrefix + "\tparameter: " + line);
|
||||
DtrfDbg.println(function, "\tparameter: " + line);
|
||||
|
||||
declaration = new ParameterDR(line, (ClangTypeToken) token);
|
||||
}
|
||||
else {
|
||||
|
||||
DtrfDbg.println(dbgPrefix + "\tlocal var: " + line);
|
||||
DtrfDbg.println(function, "\tlocal var: " + line);
|
||||
|
||||
declaration = new LocalVariableDR(line, (ClangTypeToken) token);
|
||||
}
|
||||
|
@ -416,7 +412,7 @@ public class DecompilerDataTypeReferenceFinder implements DataTypeReferenceFinde
|
|||
}
|
||||
else {
|
||||
|
||||
DtrfDbg.println(dbgPrefix + "\tadding a cast");
|
||||
DtrfDbg.println(function, "\tadding a cast");
|
||||
|
||||
// Assumption: this is a cast inside of a ClangStatement
|
||||
// Assumption: there can be multiple casts concatenated
|
||||
|
@ -438,7 +434,7 @@ public class DecompilerDataTypeReferenceFinder implements DataTypeReferenceFinde
|
|||
//
|
||||
if (declaration != null) {
|
||||
|
||||
DtrfDbg.println(dbgPrefix + "\thave declaration - " + declaration);
|
||||
DtrfDbg.println(function, "\thave declaration - " + declaration);
|
||||
|
||||
declaration.setVariable((ClangVariableToken) token);
|
||||
declaration = null;
|
||||
|
@ -446,7 +442,7 @@ public class DecompilerDataTypeReferenceFinder implements DataTypeReferenceFinde
|
|||
else {
|
||||
if (access == null || access.getVariable() != null) {
|
||||
|
||||
DtrfDbg.println(dbgPrefix + "\tcreating variable access: " + line);
|
||||
DtrfDbg.println(function, "\tcreating variable access: " + line);
|
||||
|
||||
access = new VariableAccessDR(line);
|
||||
results.add(access);
|
||||
|
@ -479,8 +475,8 @@ public class DecompilerDataTypeReferenceFinder implements DataTypeReferenceFinde
|
|||
ClangFieldToken field = (ClangFieldToken) token;
|
||||
if (typesDoNotMatch(access, field)) {
|
||||
|
||||
DtrfDbg.println(
|
||||
dbgPrefix + "\tcreating an anonymous variable access: " + line);
|
||||
DtrfDbg.println(function,
|
||||
"\tcreating an anonymous variable access: " + line);
|
||||
|
||||
// this can happen when a field is used anonymously, such as directly
|
||||
// after a nested array index operation
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -18,10 +18,12 @@ package ghidra.app.extension.datatype.finder;
|
|||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import generic.io.NullPrintWriter;
|
||||
import ghidra.program.model.listing.Function;
|
||||
import ghidra.util.Msg;
|
||||
|
||||
/**
|
||||
|
@ -36,6 +38,8 @@ class DtrfDbg {
|
|||
|
||||
private static List<String> clientFilters = new ArrayList<>();
|
||||
|
||||
private static Map<Function, List<String>> linesByFunction = new HashMap<>();
|
||||
|
||||
DtrfDbg() {
|
||||
// static class
|
||||
}
|
||||
|
@ -57,6 +61,16 @@ class DtrfDbg {
|
|||
return;
|
||||
}
|
||||
|
||||
Set<Entry<Function, List<String>>> entries = linesByFunction.entrySet();
|
||||
for (Entry<Function, List<String>> entry : entries) {
|
||||
Function function = entry.getKey();
|
||||
List<String> lines = entry.getValue();
|
||||
debugWriter.println("\n\nFunction Debug: " + function.getName());
|
||||
for (String line : lines) {
|
||||
debugWriter.println(line);
|
||||
}
|
||||
}
|
||||
|
||||
debugWriter.flush();
|
||||
String output = debugBytes.toString();
|
||||
if (!StringUtils.isBlank(output)) {
|
||||
|
@ -76,16 +90,16 @@ class DtrfDbg {
|
|||
clientFilters.addAll(Arrays.asList(filters));
|
||||
}
|
||||
|
||||
static void println(String s) {
|
||||
debugWriter.println(s);
|
||||
static void println(Function f, String s) {
|
||||
linesByFunction.computeIfAbsent(f, ff -> new ArrayList<>()).add(s);
|
||||
}
|
||||
|
||||
static void println(Object client, String s) {
|
||||
static void println(Function f, Object client, String s) {
|
||||
if (!passesFilter(client)) {
|
||||
return;
|
||||
}
|
||||
|
||||
debugWriter.println(s);
|
||||
linesByFunction.computeIfAbsent(f, ff -> new ArrayList<>()).add(s);
|
||||
}
|
||||
|
||||
private static boolean passesFilter(Object client) {
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -25,7 +25,6 @@ import ghidra.app.services.FieldMatcher;
|
|||
import ghidra.program.model.address.Address;
|
||||
import ghidra.program.model.data.DataType;
|
||||
import ghidra.program.model.listing.Function;
|
||||
import ghidra.program.model.pcode.HighGlobal;
|
||||
import ghidra.program.model.pcode.HighVariable;
|
||||
import ghidra.util.StringUtilities;
|
||||
import ghidra.util.exception.AssertException;
|
||||
|
@ -106,7 +105,7 @@ public class VariableAccessDR extends DecompilerReference {
|
|||
private DecompilerVariable getMatch(DataType dt, FieldMatcher fieldMatcher,
|
||||
DecompilerVariable var, DecompilerVariable potentialField) {
|
||||
|
||||
String indent = "\t\t";
|
||||
String indent = "\t\t\t";
|
||||
|
||||
// Note: for now, I ignore the precedence of casting; if any cast type is a match, then
|
||||
// signal hooray
|
||||
|
@ -114,19 +113,21 @@ public class VariableAccessDR extends DecompilerReference {
|
|||
DecompilerVariable fieldVar = searchForField ? potentialField : null;
|
||||
DecompilerVariable match = getMatchingVarialbe(dt, var, fieldVar);
|
||||
if (match == null) {
|
||||
DtrfDbg.println(this, indent + "NO MATCHING VARIABLE");
|
||||
DtrfDbg.println(getFunction(), this, indent + "NO MATCHING VARIABLE");
|
||||
return null; // wrong type, nothing to do
|
||||
}
|
||||
|
||||
// Matches on the type, does the field match?
|
||||
if (fieldMatcher.isIgnored()) {
|
||||
DtrfDbg.println(this, indent + "field macher is ignored; returning match");
|
||||
DtrfDbg.println(getFunction(), this,
|
||||
indent + "field macher is ignored; returning match");
|
||||
return match; // no field to match
|
||||
}
|
||||
|
||||
if (potentialField == null) {
|
||||
|
||||
DtrfDbg.println(this, indent + "No potential field to match; name / offset match?");
|
||||
DtrfDbg.println(getFunction(), this,
|
||||
indent + "No potential field to match; name / offset match?");
|
||||
|
||||
// check for the case where we have not been passed a 'potential field', but the given
|
||||
// 'var' is itself may be the field we seek, such as in an if statement like this:
|
||||
|
@ -135,23 +136,25 @@ public class VariableAccessDR extends DecompilerReference {
|
|||
String name = var.getName();
|
||||
int offset = var.getOffset();
|
||||
if (fieldMatcher.matches(name, offset)) {
|
||||
DtrfDbg.println(this, indent + "\tfield matcher matched on variable: " + var);
|
||||
StringUtilities.indentLines(var.toString(), indent + '\t');
|
||||
DtrfDbg.println(getFunction(), this,
|
||||
indent + "\tfield matcher matched on variable: " + var);
|
||||
return var;
|
||||
}
|
||||
|
||||
DtrfDbg.println(this, indent + "\tNO FIELD MATCHER MATCH");
|
||||
DtrfDbg.println(getFunction(), this, indent + "\tNO FIELD MATCHER MATCH");
|
||||
return null; // we seek a field, but there is none
|
||||
}
|
||||
|
||||
DtrfDbg.println(this, indent + "Checking 'potential field' match...");
|
||||
DtrfDbg.println(getFunction(), this, indent + "Checking 'potential field' match...");
|
||||
|
||||
String name = potentialField.getName();
|
||||
int offset = potentialField.getOffset();
|
||||
if (fieldMatcher.matches(name, offset)) {
|
||||
DtrfDbg.println(this, indent + "\tMATCHED");
|
||||
DtrfDbg.println(getFunction(), this, indent + "\tMATCHED");
|
||||
return match;
|
||||
}
|
||||
DtrfDbg.println(this, indent + "\tNO MATCH");
|
||||
DtrfDbg.println(getFunction(), this, indent + "\tNO MATCH");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -160,26 +163,27 @@ public class VariableAccessDR extends DecompilerReference {
|
|||
|
||||
String indent = "\t\t\t";
|
||||
|
||||
DtrfDbg.println(this, indent + "Checking for matching variable; any casts?");
|
||||
DtrfDbg.println(getFunction(), this, indent + "Checking for matching variable; any casts?");
|
||||
List<DecompilerVariable> castVariables = var.getCasts();
|
||||
for (DecompilerVariable cast : castVariables) {
|
||||
if (matchesType(cast, dt)) {
|
||||
DtrfDbg.println(this, indent + "MATCHED cast: " + cast);
|
||||
DtrfDbg.println(getFunction(), this, indent + "MATCHED cast: " + cast);
|
||||
return cast;
|
||||
}
|
||||
}
|
||||
|
||||
String dtString = dt == null ? "null" : dt.toString();
|
||||
DtrfDbg.println(this,
|
||||
DtrfDbg.println(getFunction(), this,
|
||||
indent + "No matched casts; checking type against var:\n" +
|
||||
StringUtilities.indentLines("type: " + dtString, indent + "\t") + "\n" +
|
||||
StringUtilities.indentLines("var: " + var.toString(), indent + "\t"));
|
||||
if (matchesType(var, dt)) {
|
||||
DtrfDbg.println(this, indent + "MATCHED type: ");
|
||||
DtrfDbg.println(getFunction(), this, indent + "MATCHED type: ");
|
||||
return var;
|
||||
}
|
||||
|
||||
DtrfDbg.println(this, indent + "Type did not match; checking High Variable: ");
|
||||
DtrfDbg.println(getFunction(), this,
|
||||
indent + "Type did not match; checking High Variable: ");
|
||||
|
||||
//
|
||||
// Unusual Code Alert!
|
||||
|
@ -194,12 +198,12 @@ public class VariableAccessDR extends DecompilerReference {
|
|||
HighVariable highVariable = var.variable.getHighVariable();
|
||||
if (highVariable != null) {
|
||||
if (matchesParentType(potentialField, dt)) {
|
||||
DtrfDbg.println(this, indent + "MATCHED on parent type: " + dt);
|
||||
DtrfDbg.println(getFunction(), this, indent + "MATCHED on parent type: " + dt);
|
||||
return potentialField;
|
||||
}
|
||||
}
|
||||
|
||||
DtrfDbg.println(this, indent + "NOT MATCHED");
|
||||
DtrfDbg.println(getFunction(), this, indent + "NOT MATCHED");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -218,7 +222,7 @@ public class VariableAccessDR extends DecompilerReference {
|
|||
String indent = "\t\t\t\t";
|
||||
|
||||
if (var == null) {
|
||||
DtrfDbg.println(this, indent + "Types Match? no variable to check");
|
||||
DtrfDbg.println(getFunction(), this, indent + "Types Match? no variable to check");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -226,7 +230,7 @@ public class VariableAccessDR extends DecompilerReference {
|
|||
if (varType == null) {
|
||||
// it seems odd to me that there is no type, but I have seen this in the case
|
||||
// statement of a switch
|
||||
DtrfDbg.println(this, indent + "ypes Match? no variable TYPE to check");
|
||||
DtrfDbg.println(getFunction(), this, indent + "ypes Match? no variable TYPE to check");
|
||||
return false;
|
||||
}
|
||||
boolean matches = isEqual(varType, dt);
|
||||
|
|
|
@ -1025,16 +1025,15 @@ public class CppCompositeType {
|
|||
* @throws CancelledException upon user cancellation
|
||||
*/
|
||||
private void createMembersOnlyClassLayout(TaskMonitor monitor) throws CancelledException {
|
||||
TreeMap<Long, ClassPdbMember> map = new TreeMap<>();
|
||||
List<ClassPdbMember> pdbMembers = new ArrayList<>();
|
||||
for (Member member : layoutMembers) {
|
||||
ClassPdbMember classPdbMember =
|
||||
new ClassPdbMember(member.getName(), member.getDataType(),
|
||||
member.isFlexibleArray(), member.getOffset(), member.getComment());
|
||||
map.put((long) member.getOffset(), classPdbMember);
|
||||
pdbMembers.add(classPdbMember);
|
||||
}
|
||||
List<ClassPdbMember> sm = new ArrayList<>(map.values());
|
||||
if (!DefaultCompositeMember.applyDataTypeMembers(composite, false, false, size,
|
||||
sm, msg -> Msg.warn(this, msg), monitor)) {
|
||||
pdbMembers, msg -> Msg.warn(this, msg), monitor)) {
|
||||
clearComponents(composite);
|
||||
}
|
||||
selfBaseType = composite;
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -20,7 +20,7 @@ import ghidra.app.util.demangler.swift.nodes.SwiftNode;
|
|||
/**
|
||||
* Kinds of Swift demangling {@link SwiftNode}s
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/Demangling/DemangleNodes.def">DemangleNodes.def</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/Demangling/DemangleNodes.def">DemangleNodes.def</a>
|
||||
*/
|
||||
public enum SwiftDemangledBuiltinType {
|
||||
//@formatter:off
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
@ -20,7 +20,7 @@ import ghidra.app.util.demangler.swift.nodes.SwiftNode;
|
|||
/**
|
||||
* Kinds of Swift demangling {@link SwiftNode}s
|
||||
*
|
||||
* @see <a href="https://github.com/apple/swift/blob/main/include/swift/Demangling/DemangleNodes.def">DemangleNodes.def</a>
|
||||
* @see <a href="https://github.com/swiftlang/swift/blob/main/include/swift/Demangling/DemangleNodes.def">DemangleNodes.def</a>
|
||||
*/
|
||||
public enum SwiftDemangledNodeKind {
|
||||
//@formatter:off
|
||||
|
|
|
@ -16,12 +16,10 @@
|
|||
package generic.test;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.junit.runners.model.Statement;
|
||||
|
||||
import ghidra.util.Msg;
|
||||
import ghidra.util.SystemUtilities;
|
||||
import ghidra.util.timer.GTimer;
|
||||
import ghidra.util.timer.GTimerMonitor;
|
||||
import junit.framework.AssertionFailedError;
|
||||
|
@ -204,10 +202,11 @@ public class ConcurrentTestExceptionStatement extends Statement {
|
|||
return;
|
||||
}
|
||||
|
||||
if (SystemUtilities.isInDevelopmentMode()) {
|
||||
throw new AssertionFailedError("Test timeout after " +
|
||||
TimeUnit.MINUTES.convert(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS) + " mins");
|
||||
}
|
||||
// Not sure why we were doing this before
|
||||
// if (SystemUtilities.isInDevelopmentMode()) {
|
||||
// throw new AssertionFailedError("Test timeout after " +
|
||||
// TimeUnit.MINUTES.convert(TIMEOUT_MILLIS, TimeUnit.MILLISECONDS) + " mins");
|
||||
// }
|
||||
|
||||
String vmTrace = AbstractGenericTest.createStackTraceForAllThreads();
|
||||
Msg.error(ConcurrentTestExceptionStatement.class,
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
<default_proto>
|
||||
<prototype name="__swiftcall" extrapop="0" stackshift="0">
|
||||
<!-- https://github.com/apple/swift/blob/main/docs/ABI/CallConvSummary.rst#arm64 -->
|
||||
<!-- https://github.com/swiftlang/swift/blob/main/docs/ABI/CallingConventionSummary.rst#arm64 -->
|
||||
<input>
|
||||
<pentry minsize="8" maxsize="8" storage="hiddenret">
|
||||
<register name="x8"/>
|
||||
|
@ -228,7 +228,7 @@
|
|||
</prototype>
|
||||
</default_proto>
|
||||
<prototype name="__thiscall" extrapop="0" stackshift="0">
|
||||
<!-- https://github.com/apple/swift/blob/main/docs/ABI/CallConvSummary.rst#arm64 -->
|
||||
<!-- https://github.com/swiftlang/swift/blob/main/docs/ABI/CallingConventionSummary.rst#arm64 -->
|
||||
<input>
|
||||
<pentry minsize="8" maxsize="8" storage="hiddenret">
|
||||
<register name="x8"/>
|
||||
|
|
|
@ -357,8 +357,14 @@ public class MIPS_ElfRelocationHandler
|
|||
}
|
||||
value = symbolValue;
|
||||
if (elfRelocationContext.extractAddend()) {
|
||||
// extract addend based upon pointer size
|
||||
addend = memory.getInt(relocationAddress);
|
||||
// Extract addend based upon pointer size when saving 64-bit addend
|
||||
// for packed relocation type
|
||||
if (saveValue && program.getDefaultPointerSize() == 8) {
|
||||
addend = memory.getLong(relocationAddress);
|
||||
}
|
||||
else {
|
||||
addend = memory.getInt(relocationAddress);
|
||||
}
|
||||
}
|
||||
|
||||
newValue = value + addend;
|
||||
|
|
|
@ -593,45 +593,27 @@ define pcodeop VectorDivideWordUnsigned2;
|
|||
# evldd RT,D(RA)
|
||||
# ISA-cmt: Vector Load Double Word into Double Word
|
||||
# evldd rD,d(rA)
|
||||
define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
||||
# TODO: defined in evx.sinc
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
# b = RA;
|
||||
# }
|
||||
# EA = b + EXTZ(UI*8);
|
||||
# RT = MEM(EA,8);
|
||||
|
||||
#:evldd D,A is OP=4 & D & A & XOP_0_10=769 & BITS_11_15=0 {
|
||||
# TODO: defined in evx.sinc
|
||||
# VectorLoadDoubleWordIntoDoubleWord(D,A);
|
||||
#}
|
||||
:evldd RT,dUI16PlusRAOrZeroAddress is OP=4 & RT & dUI16PlusRAOrZeroAddress & XOP_0_10=769
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = dUI16PlusRAOrZeroAddress;
|
||||
RT = *:8 ($(EATRUNC));
|
||||
}
|
||||
|
||||
# evlddx RT,RA,RB
|
||||
# ISA-cmt: Vector Load Double Word into Double Word Indexed
|
||||
# evlddx
|
||||
# define pcodeop vectorLoadDoubleWordIntoDoubleWordIndexed1;
|
||||
# TODO: defined in evx.sinc
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
# b = RA;
|
||||
# }
|
||||
# EA = b + RB;
|
||||
# RT = MEM(EA, 8);
|
||||
|
||||
# :evlddx S,A,B is OP=4 & S & A & B & XOP_0_10=768 {
|
||||
# TODO: defined in evx.sinc
|
||||
# vectorLoadDoubleWordIntoDoubleWordIndexed1(S,A,B);
|
||||
#}
|
||||
:evlddx RT,RA_OR_ZERO,RB is OP=4 & RT & RA_OR_ZERO & RB & XOP_0_10=768
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = RA_OR_ZERO + RB;
|
||||
RT = *:8 ($(EATRUNC));
|
||||
}
|
||||
|
||||
# evldh RT,D(RA)
|
||||
# ISA-cmt: Vector Load Double into Four Halfwords
|
||||
# evldh rD,rA 011 0000 0101
|
||||
|
||||
|
||||
:evldh RT,EVUIMM_8_RAt is OP=4 & A & D & RT & EVUIMM_8 & EVUIMM_8_RAt & XOP_0_10=0x305 {
|
||||
:evldh RT,EVUIMM_8_RAt is OP=4 & RT & EVUIMM_8_RAt & XOP_0_10=0x305 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -643,7 +625,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# RT.S2 = MEM(EA+4, 2);
|
||||
# RT.S3 = MEM(EA+6, 2);
|
||||
|
||||
EA:8 = A + zext(EVUIMM_8_RAt);
|
||||
EA:8 = EVUIMM_8_RAt;
|
||||
*:2 (RT) = *:2 ((EA) & $(MEMMASK));
|
||||
*:2 (RT+2) = *:2 ((EA+2) & $(MEMMASK));
|
||||
*:2 (RT+4) = *:2 ((EA+4) & $(MEMMASK));
|
||||
|
@ -676,7 +658,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# evldw RT,D(RA)
|
||||
# ISA-cmt: Vector Load Double into Two Words
|
||||
# evldw rD,rA 011 0000 0011
|
||||
:evldw RT,EVUIMM_8_RAt is OP=4 & A & D & RT & EVUIMM_8 & EVUIMM_8_RAt & XOP_0_10=0x303 {
|
||||
:evldw RT,EVUIMM_8_RAt is OP=4 & RT & EVUIMM_8_RAt & XOP_0_10=0x303 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -686,7 +668,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# RT.l = MEM(EA, 4);
|
||||
# RT.h = MEM(EA+4, 4);
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_8_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_8_RAt;
|
||||
*:4 (RT) = *:4 ((EA) & $(MEMMASK));
|
||||
*:4 (RT+4) = *:4 ((EA+4) & $(MEMMASK));
|
||||
}
|
||||
|
@ -712,7 +694,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# evlhhesplat RT,D(RA)
|
||||
# ISA-cmt: Vector Load Halfword into Halfwords Even and Splat
|
||||
# evlhhesplat rD,rA 011 0000 1001
|
||||
:evlhhesplat RT,EVUIMM_2_RAt is OP=4 & A & RT & EVUIMM_2_RAt & D & XOP_0_10=0x309 {
|
||||
:evlhhesplat RT,EVUIMM_2_RAt is OP=4 & RT & EVUIMM_2_RAt & XOP_0_10=0x309 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -724,7 +706,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# RT.S2 = MEM(EA,2);
|
||||
# RT.S3 = 0x0000;
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_2_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_2_RAt;
|
||||
*:2 (RT) = *:2 ((EA) & $(MEMMASK));
|
||||
*:2 (RT+2) = 0x0000;
|
||||
*:2 (RT+4) = *:2 ((EA) & $(MEMMASK));
|
||||
|
@ -756,7 +738,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# evlhhossplat RT,D(RA)
|
||||
# ISA-cmt: Vector Load Halfword into Halfword Odd Signed and Splat
|
||||
# evlhhossplat rD,rA 011 0000 1111
|
||||
:evlhhossplat RT,EVUIMM_2_RAt is OP=4 & A & RT & EVUIMM_2_RAt & D & XOP_0_10=0x30F {
|
||||
:evlhhossplat RT,EVUIMM_2_RAt is OP=4 & RT & EVUIMM_2_RAt & XOP_0_10=0x30F {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -766,7 +748,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# RT.l = EXTS(MEM(EA, 2));
|
||||
# RT.h = EXTS(MEM(EA, 2));
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_2_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_2_RAt;
|
||||
*:4 (RT) = sext( *:2 (((EA) & $(MEMMASK))));
|
||||
*:4 (RT+4) = sext( *:2 (((EA) & $(MEMMASK))));
|
||||
}
|
||||
|
@ -792,7 +774,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# evlhhousplat RT,D(RA)
|
||||
# ISA-cmt: Vector Load Halfword into Halfword Odd Unsigned and Splat
|
||||
# evlhhousplat rD,rA 011 0000 1101
|
||||
:evlhhousplat RT,EVUIMM_2_RAt is OP=4 & A & RT & EVUIMM_2_RAt & D & XOP_0_10=0x30D {
|
||||
:evlhhousplat RT,EVUIMM_2_RAt is OP=4 & RT & EVUIMM_2_RAt & XOP_0_10=0x30D {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -802,7 +784,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# RT.l = EXTZ(MEM(EA, 2));
|
||||
# RT.h = EXTZ(MEM(EA, 2));
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_2_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_2_RAt;
|
||||
*:4 (RT) = zext( *:2 (((EA) & $(MEMMASK))));
|
||||
*:4 (RT+4) = zext( *:2 (((EA) & $(MEMMASK))));
|
||||
}
|
||||
|
@ -871,7 +853,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# evlwhos RT,D(RA)
|
||||
# ISA-cmt: Vector Load Word into Two Halfwords Odd Signed (with sign extension)
|
||||
# evlwhos rD,rA 011 0001 0111
|
||||
:evlwhos RT,EVUIMM_4_RAt is OP=4 & A & EVUIMM_4_RAt & RT & D & XOP_0_10=0x317 {
|
||||
:evlwhos RT,EVUIMM_4_RAt is OP=4 & EVUIMM_4_RAt & RT & XOP_0_10=0x317 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -881,7 +863,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# RT.l = EXTS(MEM(EA, 2));
|
||||
# RT.h = EXTS(MEM(EA+2, 2));
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_4_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_4_RAt;
|
||||
*:4 (RT) = sext( *:2 (((EA) & $(MEMMASK))));
|
||||
*:4 (RT+4) = sext( *:2 (((EA+2) & $(MEMMASK))));
|
||||
}
|
||||
|
@ -907,7 +889,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# evlwhou RT,D(RA)
|
||||
# ISA-cmt: Vector Load Word into Two Halfwords Odd Unsigned (zero-extended)
|
||||
# evlwhou rD,rA 011 0001 0101
|
||||
:evlwhou RT,EVUIMM_4_RAt is OP=4 & A & EVUIMM_4_RAt & RT & D & XOP_0_10=0x315 {
|
||||
:evlwhou RT,EVUIMM_4_RAt is OP=4 & EVUIMM_4_RAt & RT & XOP_0_10=0x315 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -917,7 +899,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# RT.l = EXTZ(MEM(EA, 2));
|
||||
# RT.h = EXTZ(MEM(EA+2, 2));
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_4_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_4_RAt;
|
||||
*:4 (RT) = zext( *:2 (((EA) & $(MEMMASK))));
|
||||
*:4 (RT+4) = zext( *:2 (((EA+2) & $(MEMMASK))));
|
||||
}
|
||||
|
@ -943,7 +925,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# evlwhsplat RT,D(RA)
|
||||
# ISA-cmt: Vector Load Word into Two Halfwords and Splat
|
||||
# evlwhsplat rD,rA 011 0001 1101
|
||||
:evlwhsplat RS,EVUIMM_4_RAt is OP=4 & A & B & D & XOP_0_10=0x31D & EVUIMM_4_RAt & RS {
|
||||
:evlwhsplat RS,EVUIMM_4_RAt is OP=4 & XOP_0_10=0x31D & EVUIMM_4_RAt & RS {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -955,7 +937,7 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# RT.S2 = MEM(EA+2,2);
|
||||
# RT.S3 = MEM(EA+2,2);
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_4_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_4_RAt;
|
||||
*:2 (RS) = *:2 ((EA) & $(MEMMASK));
|
||||
*:2 (RS+2) = *:2 ((EA) & $(MEMMASK));
|
||||
*:2 (RS+4) = *:2 ((EA+2) & $(MEMMASK));
|
||||
|
@ -1023,64 +1005,38 @@ define pcodeop VectorLoadDoubleWordIntoDoubleWord;
|
|||
# evmergehi RT,RA,RB
|
||||
# ISA-cmt: Vector Merge High
|
||||
# evmergehi rD,rA,rB 010 0010 1100
|
||||
# defined evx.sinc XXX
|
||||
# define pcodeop VectorMergeHigh;
|
||||
# :evmergehi D,A,B is OP=4 & A & B & D & XOP_0_10=0x22C {
|
||||
# RT.l = RA.l;
|
||||
# RT.h = RB.h;
|
||||
|
||||
# VectorMergeHigh(D,A,B);
|
||||
# }
|
||||
@if REGISTER_SIZE=="8"
|
||||
:evmergehi S,A,B is OP=4 & S & A & B & XOP_0_10=556
|
||||
{
|
||||
S[32,32] = A[32,32];
|
||||
S[ 0,32] = B[32,32];
|
||||
}
|
||||
|
||||
# evmergehilo RT,RA,RB
|
||||
# ISA-cmt: Vector Merge High/Low
|
||||
# evmergehilo rD,rA,rB 010 0010 1110
|
||||
#define pcodeop VectorMergeHighLow;
|
||||
#:evmergehilo D,A,B is OP=4 & A & B & D & XOP_0_10=0x22E {
|
||||
# RT.l = RA.l;
|
||||
# RT.h = RA.h;
|
||||
|
||||
# lo = (A & 0x00000000FFFFFFFF);
|
||||
# hi = ((A & 0xFFFFFFFF00000000) >> 32);
|
||||
# b_lo = (B & 0x00000000FFFFFFFF);
|
||||
# b_hi = ((B & 0xFFFFFFFF00000000) >> 32);
|
||||
#
|
||||
# lo = lo;
|
||||
# hi = b_hi;
|
||||
#
|
||||
# D = ((hi << 32) | lo);
|
||||
#}
|
||||
:evmergehilo S,A,B is OP=4 & S & A & B & XOP_0_10=558 {
|
||||
S[32,32] = A[32,32];
|
||||
S[ 0,32] = B[ 0,32];
|
||||
}
|
||||
|
||||
# evmergelo RT,RA,RB
|
||||
# ISA-cmt: Vector Merge Low
|
||||
# evmergelo rD,rA,rB 010 0010 1101
|
||||
# defined evx.sinc XXX
|
||||
# define pcodeop VectorMergeLow;
|
||||
# :evmergelo D,A,B is OP=4 & A & B & D & XOP_0_10=0x22D {
|
||||
# RT.l = RA.h;
|
||||
# RT.h = RA.l;
|
||||
|
||||
# VectorMergeLow(D,A,B);
|
||||
# }
|
||||
:evmergelo S,A,B is OP=4 & S & A & B & XOP_0_10=557
|
||||
{
|
||||
S[32,32] = A[0,32];
|
||||
S[ 0,32] = B[0,32];
|
||||
}
|
||||
|
||||
# evmergelohi RT,RA,RB
|
||||
# ISA-cmt: Vector Merge Low/High
|
||||
# evmergelohi rD,rA,rB 010 0010 1111
|
||||
#:evmergelohi D,A,B is OP=4 & D & A & B & XOP_0_10=0x22F {
|
||||
# RT.l = RA.h;
|
||||
# RT.h = RA.l;
|
||||
|
||||
# lo = (A & 0x00000000FFFFFFFF);
|
||||
# hi = ((A & 0xFFFFFFFF00000000) >> 32);
|
||||
# b_lo = (B & 0x00000000FFFFFFFF);
|
||||
# b_hi = ((B & 0xFFFFFFFF00000000) >> 32);
|
||||
#
|
||||
# lo = lo;
|
||||
# hi = b_lo;
|
||||
#
|
||||
# D = ((hi << 32) | lo);
|
||||
#}
|
||||
|
||||
:evmergelohi S,A,B is OP=4 & S & A & B & XOP_0_10=559 {
|
||||
S[32,32] = A[ 0,32];
|
||||
S[ 0,32] = B[32,32];
|
||||
}
|
||||
@endif
|
||||
|
||||
# evmhegsmfaa RT,RA,RB
|
||||
# ISA-cmt: Vector Multiply Halfwords, Even, Guarded, Signed, Modulo, Fractional and Accumulate
|
||||
|
@ -1962,17 +1918,11 @@ define pcodeop VectorMultiplyHalfWordsOddUnsignedSaturateIntegerAndAccumulateNeg
|
|||
# evmra RT,RA
|
||||
# ISA-cmt: Initialize Accumulator
|
||||
# evmra rD,rA 100 1100 0100
|
||||
# defined evx.sinc
|
||||
# define pcodeop InitializeAccumulator;
|
||||
# :evmra D,A is OP=4 & A & D & XOP_0_10=0x4C4 {
|
||||
# ACC = RA;
|
||||
# RT = RA;
|
||||
|
||||
# ACC = A;
|
||||
# D = A;
|
||||
|
||||
# InitializeAccumulator(D,A);
|
||||
# }
|
||||
:evmra RT,RA is OP=4 & RT & RA & BITS_11_15=0 & XOP_0_10=1220
|
||||
{
|
||||
ACC = zext(RA);
|
||||
RT = RA;
|
||||
}
|
||||
|
||||
# evmwhsmf RT,RA,RB
|
||||
# ISA-cmt: Vector Multiply Word High Signed, Modulo, Fractional
|
||||
|
@ -2452,53 +2402,6 @@ define pcodeop VectorMultiplyWordSignedSaturateFractionalAndAccumulateNegative2;
|
|||
spr200 = spr200 | (flags & (0x1000000000000));
|
||||
}
|
||||
|
||||
# evmwumi RT,RA,RB
|
||||
# ISA-cmt: Vector Multiply Word Unsigned, Modulo, Integer
|
||||
# evmwumi rD,rA,rB 100 01A1 1000 A=0
|
||||
# evmwumi confict with machhwo
|
||||
# define pcodeop VectorMultiplyWordUnsignedModuloInteger;
|
||||
# :evmwumi D,A,B is OP=4 & A & B & D & XOP_0_10=0x458 {
|
||||
# RT = RA.h *ui RB.h;
|
||||
# VectorMultiplyWordUnsignedModuloInteger(D,A,B,ACC);
|
||||
# }
|
||||
|
||||
# evmwumia RT,RA,RB
|
||||
# ISA-cmt: Vector Multiply Word Unsigned, Modulo, Integer to Accumulator
|
||||
# evmwumia rD,rA,rB 100 01A1 1000 A=1
|
||||
:evmwumia D,A,B is OP=4 & A & B & D & XOP_0_10=0x478 {
|
||||
# RT = RA.h *ui RB.h;
|
||||
# ACC = RT;
|
||||
|
||||
D = (( A & (0xFFFFFFFF00000000) ) >> 32) * (( B & (0xFFFFFFFF00000000) ) >> 32);
|
||||
ACC = D;
|
||||
}
|
||||
|
||||
# evmwumiaa RT,RA,RB
|
||||
# ISA-cmt: Vector Multiply Word Unsigned, Modulo, Integer and Accumulate
|
||||
# evmwumiaa rD,rA,rB 101 0101 1000
|
||||
# evmwumiaa confict with macchwo
|
||||
# :evmwumiaa D,A,B is OP=4 & A & B & D & XOP_0_10=0x558 {
|
||||
# u64 temp;
|
||||
# temp = RA.h *ui RB.h;
|
||||
# RT = ACC + temp;
|
||||
# ACC = RT;
|
||||
|
||||
# VectorMultiplyWordUnsignedModuloIntegerAndAccumulate2(D,A,B,ACC);
|
||||
# }
|
||||
|
||||
# evmwumian RT,RA,RB
|
||||
# ISA-cmt: Vector Multiply Word Unsigned, Modulo, Integer and Accumulate Negative
|
||||
# evmwumian rD,rA,rB 101 1101 1000
|
||||
# evmwumian confict with macchwso
|
||||
# :evmwumian D,A,B is OP=4 & A & B & D & XOP_0_10=0x5D8 {
|
||||
# u64 temp;
|
||||
# temp = RA.h *ui RB.h;
|
||||
# RT = ACC - temp;
|
||||
# ACC = RT;
|
||||
|
||||
# VectorMultiplyWordUnsignedModuloIntegerAndAccumulateNegative(D,A,B,ACC);
|
||||
# }
|
||||
|
||||
# =================================================================
|
||||
# Page D-15
|
||||
|
||||
|
@ -2712,85 +2615,52 @@ define pcodeop VectorShiftRightWordImmediateUnsigned;
|
|||
D = VectorShiftRightWordImmediateUnsigned(A);
|
||||
}
|
||||
|
||||
# evsrws RT,RA,RB
|
||||
# ISA-cmt: Vector Shift Right Word Signed
|
||||
# evsrws rD,rA,rB 010 0010 0001
|
||||
:evsrws D,A,B is OP=4 & A & B & D & XOP_0_10=0x221 {
|
||||
# nh = RB.bsub(26:31);
|
||||
# hl = RB.bsub(58:63);
|
||||
# RT.l = EXTS(RA.bsub(0:32-nh));
|
||||
# RT.h = EXTS(RA.bsub(32:63-nl));
|
||||
|
||||
nh:$(REGISTER_SIZE) = 32-((B & 0x00000000fc000000) >> 26);
|
||||
nl:$(REGISTER_SIZE) = 63-((B & 0xfc00000000000000) >> 58);
|
||||
tmp:$(REGISTER_SIZE) = (A & ((0xFFFFFFFFFFFFFFFF >> (64 - ((nh) - (0) + 1))) << (0)) >> 0);
|
||||
lo:8 = sext(tmp:4);
|
||||
tmp = (A & ((0xFFFFFFFFFFFFFFFF >> (64 - ((nl) - (32) + 1))) << (32)) >> 32);
|
||||
hi:8 = sext(tmp:4);
|
||||
D = (( zext(hi) << 32) | zext(lo) );
|
||||
@if REGISTER_SIZE=="8"
|
||||
:evsrws S,A,B is OP=4 & S & A & B & XOP_0_10=545
|
||||
{
|
||||
local low:4 = A[0,32];
|
||||
local high:4 = A[32,32];
|
||||
local low_shift:1 = B[0,5];
|
||||
local high_shift:1 = B[32,5];
|
||||
S[0,32] = low s>> zext(low_shift);
|
||||
S[32,32] = high s>> zext(high_shift);
|
||||
}
|
||||
|
||||
# evsrwu RT,RA,RB
|
||||
# ISA-cmt: Vector Shift Right Word Unsigned
|
||||
# evsrwu rD,rA,rB 010 0010 0000
|
||||
:evsrwu D,A,B is OP=4 & A & B & D & XOP_0_10=0x220 {
|
||||
# nh = RB.bsub(26:31);
|
||||
# nl = RB.bsub(58:63);
|
||||
# RT.l = EXTZ(RA.bsub(0:32-nh));
|
||||
# RT.h = EXTZ(RA.bsub(32:63-nl));
|
||||
|
||||
nh:$(REGISTER_SIZE) = 32-((B & 0x00000000fc000000) >> 26);
|
||||
nl:$(REGISTER_SIZE) = 63-((B & 0xfc00000000000000) >> 58);
|
||||
tmp:$(REGISTER_SIZE) = (A & ((0xFFFFFFFFFFFFFFFF >> (64 - ((nh) - (0) + 1))) << (0)) >> 0);
|
||||
lo:8 = zext(tmp:4);
|
||||
tmp = (A & ((0xFFFFFFFFFFFFFFFF >> (64 - ((nl) - (32) + 1))) << (32)) >> 32);
|
||||
hi:8 = zext(tmp:4);
|
||||
D = (( zext(hi) << 32) | zext(lo) );
|
||||
:evsrwu S,A,B is OP=4 & S & A & B & XOP_0_10=544
|
||||
{
|
||||
local low:4 = A[0,32];
|
||||
local high:4 = A[32,32];
|
||||
local low_shift:1 = B[0,5];
|
||||
local high_shift:1 = B[32,5];
|
||||
S[0,32] = low >> zext(low_shift);
|
||||
S[32,32] = high >> zext(high_shift);
|
||||
}
|
||||
@endif
|
||||
|
||||
|
||||
# evstdd RS,D(RA)
|
||||
# ISA-cmt: Vector Store Double of Double
|
||||
# evstdd rD,rA,EVUIMM_8 011 0010 0001
|
||||
# defined evx.sinc EJ XXX
|
||||
#define pcodeop VectorStoreDoubleOfDouble;
|
||||
#:evstdd D,A,EVUIMM_8 is OP=4 & A & D & EVUIMM_8 & XOP_0_10=0x321 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
# b = RA;
|
||||
# }
|
||||
# EA = b + EXTZ(UI*8);
|
||||
# MEM(EA,8) = RS;
|
||||
|
||||
# VectorStoreDoubleOfDouble(D,A);
|
||||
# }
|
||||
:evstdd RS,dUI16PlusRAOrZeroAddress is OP=4 & RS & dUI16PlusRAOrZeroAddress & XOP_0_10=801
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = dUI16PlusRAOrZeroAddress;
|
||||
*:8 ($(EATRUNC)) = RS;
|
||||
}
|
||||
|
||||
# evstddx RS,RA,RB
|
||||
# ISA-cmt: Vector Store Double of Double Indexed
|
||||
# evstddx rS,rA,rB 011 0010 0000
|
||||
# defined evx.sinc EJ XXX
|
||||
# define pcodeop VectorStoreDoubleOfDoubleIndexed;
|
||||
# :evstddx S,A,B is OP=4 & A & S & B & XOP_0_10=0x320 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
# b = RA;
|
||||
# }
|
||||
# EA = b + RB;
|
||||
# MEM(EA,8) = RS;
|
||||
:evstddx RS,RA_OR_ZERO,RB is OP=4 & RS & RA_OR_ZERO & RB & XOP_0_10=800
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = RA_OR_ZERO + RB;
|
||||
*:8 ($(EATRUNC)) = RS;
|
||||
}
|
||||
|
||||
# VectorStoreDoubleOfDoubleIndexed(S,A,B);
|
||||
# }
|
||||
# :evstddx RS,RA_OR_ZERO,RB is OP=4 & RS & RA_OR_ZERO & RB & XOP_0_10=800
|
||||
# {
|
||||
# ea = RA_OR_ZERO + RB;
|
||||
# *:8 ($(EATRUNC)) = RS;
|
||||
# }
|
||||
|
||||
# evstdh RS,D(RA)
|
||||
# ISA-cmt: Vector Store Double of Four Halfwords
|
||||
# evstdh rS,rA,EVUIMM_8 011 0010 0101
|
||||
:evstdh S,EVUIMM_8_RAt is OP=4 & A & S & EVUIMM_8 & EVUIMM_8_RAt & XOP_0_10=0x325 {
|
||||
:evstdh S,EVUIMM_8_RAt is OP=4 & S & EVUIMM_8_RAt & XOP_0_10=0x325 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -2802,7 +2672,7 @@ define pcodeop VectorShiftRightWordImmediateUnsigned;
|
|||
# MEM(EA+4,2) = RS.S2;
|
||||
# MEM(EA+6,2) = RS.S3;
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_8_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_8_RAt;
|
||||
*:2 (EA) = *:2 ((S) & $(MEMMASK));
|
||||
*:2 (EA+2) = *:2 ((S+2) & $(MEMMASK));
|
||||
*:2 (EA+4) = *:2 ((S+4) & $(MEMMASK));
|
||||
|
@ -2834,7 +2704,7 @@ define pcodeop VectorShiftRightWordImmediateUnsigned;
|
|||
# evstdw RS,D(RA)
|
||||
# ISA-cmt: Vector Store Double of Two Words
|
||||
# evstdw rS,rA,EVUIMM_8 011 0010 0011
|
||||
:evstdw S,EVUIMM_8_RAt is OP=4 & A & S & EVUIMM_8 & EVUIMM_8_RAt & XOP_0_10=0x323 {
|
||||
:evstdw S,EVUIMM_8_RAt is OP=4 & S & EVUIMM_8_RAt & XOP_0_10=0x323 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -2844,7 +2714,7 @@ define pcodeop VectorShiftRightWordImmediateUnsigned;
|
|||
# MEM(EA,4) = RS.l;
|
||||
# MEM(EA+4,4) = RS.h;
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_8_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_8_RAt;
|
||||
*:4 (EA) = *:4 ((S) & $(MEMMASK));
|
||||
*:4 (EA+4) = *:4 ((S+4) & $(MEMMASK));
|
||||
}
|
||||
|
@ -2870,7 +2740,7 @@ define pcodeop VectorShiftRightWordImmediateUnsigned;
|
|||
# evstwhe RS,D(RA)
|
||||
# ISA-cmt: Vector Store Word of Two Halfwords from Even
|
||||
# evstwhe rS,rA,EVUIMM_4 011 0011 0001
|
||||
:evstwhe S,EVUIMM_4_RAt is OP=4 & A & S & EVUIMM_4_RAt & XOP_0_10=0x331 {
|
||||
:evstwhe S,EVUIMM_4_RAt is OP=4 & S & EVUIMM_4_RAt & XOP_0_10=0x331 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -2880,7 +2750,7 @@ define pcodeop VectorShiftRightWordImmediateUnsigned;
|
|||
# MEM(EA,2) = RS.S0;
|
||||
# MEM(EA+2,2) = RS.S2;
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_4_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_4_RAt;
|
||||
*:2 (EA) = *:2 ((S) & $(MEMMASK));
|
||||
*:2 (EA+2) = *:2 ((S+2) & $(MEMMASK));
|
||||
}
|
||||
|
@ -2906,7 +2776,7 @@ define pcodeop VectorShiftRightWordImmediateUnsigned;
|
|||
# evstwho RS,D(RA)
|
||||
# ISA-cmt: Vector Store Word of Two Halfwords from Odd
|
||||
# evstwho rS,rA,EVUIMM_4 011 0011 0101
|
||||
:evstwho S,EVUIMM_4_RAt is OP=4 & A & S & EVUIMM_4_RAt & XOP_0_10=0x335 {
|
||||
:evstwho S,EVUIMM_4_RAt is OP=4 & S & EVUIMM_4_RAt & XOP_0_10=0x335 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -2916,7 +2786,7 @@ define pcodeop VectorShiftRightWordImmediateUnsigned;
|
|||
# MEM(EA,2) = RS.S1;
|
||||
# MEM(EA+2,2) = RS.S3;
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_4_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_4_RAt;
|
||||
*:2 (EA) = *:2 ((S+2) & $(MEMMASK));
|
||||
*:2 (EA+2) = *:2 ((S+6) & $(MEMMASK));
|
||||
}
|
||||
|
@ -2924,7 +2794,7 @@ define pcodeop VectorShiftRightWordImmediateUnsigned;
|
|||
# evstwhox RS,RA,RB
|
||||
# ISA-cmt: Vector Store Word of Two Halfwords from Odd Indexed
|
||||
# evstwhox rS,rA,rB 011 0011 0100
|
||||
:evstwhox S,A,B is OP=4 & A & B & S & XOP_0_10=0x334 {
|
||||
:evstwhox S,RA_OR_ZERO,B is OP=4 & RA_OR_ZERO & B & S & XOP_0_10=0x334 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -2934,47 +2804,33 @@ define pcodeop VectorShiftRightWordImmediateUnsigned;
|
|||
# MEM(EA,2) = RS.S1;
|
||||
# MEM(EA+2,2) = RS.S3;
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + B;
|
||||
EA:$(REGISTER_SIZE) = RA_OR_ZERO + B;
|
||||
*:2 (EA) = *:2 ((S+2) & $(MEMMASK));
|
||||
*:2 (EA+2) = *:2 ((S+6) & $(MEMMASK));
|
||||
}
|
||||
|
||||
# evstwwe RS,D(RA)
|
||||
# ISA-cmt: Vector Store Word of Word from Even
|
||||
# evstwwe rS,rA,EVUIMM_4 011 0011 1001
|
||||
#define pcodeop VectorStoreWordOfWordFromEven;
|
||||
#:evstwwe S,EVUIMM_4_RAt is OP=4 & A & S & EVUIMM_4_RAt & XOP_0_10=0x339 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
# b = RA;
|
||||
# }
|
||||
# EA = b + EXTZ(UI*4);
|
||||
# MEM(EA,4) = RS;
|
||||
|
||||
# VectorStoreWordOfWordFromEven(S,A);
|
||||
# }
|
||||
# evstwwe rS,rA,UIMM 011 0011 1001
|
||||
:evstwwe S,EVUIMM_4_RAt is OP=4 & S & EVUIMM_4_RAt & UI & XOP_0_10=0x339
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = EVUIMM_4_RAt;
|
||||
*:4 ($(EATRUNC)) = S:4;
|
||||
}
|
||||
|
||||
# evstwwex RS,RA,RB
|
||||
# ISA-cmt: Vector Store Word of Word from Even Indexed
|
||||
# evstwwex rS,rA,rB 011 0011 1000
|
||||
#define pcodeop VectorStoreWordOfWordFromEvenIndexed;
|
||||
#:evstwwex S,A,B is OP=4 & A & B & S & XOP_0_10=0x338 {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
# b = RA;
|
||||
# }
|
||||
# EA = b + RB;
|
||||
# MEM(EA,4) = RS;
|
||||
|
||||
# VectorStoreWordOfWordFromEvenIndexed(S,A,B);
|
||||
# }
|
||||
:evstwwex S,RA_OR_ZERO,RB is OP=4 & S & RA_OR_ZERO & RB & XOP_0_10=0x338
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = RA_OR_ZERO + RB;
|
||||
*:4 ($(EATRUNC)) = S:4;
|
||||
}
|
||||
|
||||
# evstwwo RS,D(RA)
|
||||
# ISA-cmt: Vector Store Word of Word from Odd
|
||||
# evstwwo rS,rA,EVUIMM_4 011 0011 1101
|
||||
:evstwwo S,EVUIMM_4_RAt is OP=4 & A & S & EVUIMM_4_RAt & XOP_0_10=0x33D {
|
||||
:evstwwo S,EVUIMM_4_RAt is OP=4 & S & EVUIMM_4_RAt & UI & XOP_0_10=0x33D {
|
||||
# if (RA == 0) {
|
||||
# b = 0;
|
||||
# } else {
|
||||
|
@ -2983,7 +2839,7 @@ define pcodeop VectorShiftRightWordImmediateUnsigned;
|
|||
# EA = b + EXTZ(UI*4);
|
||||
# MEM(EA,4) = RS.h;
|
||||
|
||||
EA:$(REGISTER_SIZE) = A + zext(EVUIMM_4_RAt);
|
||||
EA:$(REGISTER_SIZE) = EVUIMM_4_RAt;
|
||||
*:4 (EA) = *:4 ((S+4) & $(MEMMASK));
|
||||
}
|
||||
|
||||
|
@ -3105,19 +2961,10 @@ define pcodeop VectorSubtractUnsignedSaturateIntegerToAccumulatorWord2;
|
|||
# evxor RT,RA,RB
|
||||
# ISA-cmt: Vector XOR
|
||||
# evxor rD,rA,rB 010 0001 0110
|
||||
# defined evx.sinc EJ XXX
|
||||
# define pcodeop VectorXOR;
|
||||
# : D = 64From2_32(hi,lo);
|
||||
# :evxor S,A,B is OP=4 & S & A & B & XOP_0_10=0x216 {
|
||||
# RT.l = RA.l ^ RB.l;
|
||||
# RT.h = RA.h ^ RB.h;
|
||||
|
||||
# VectorXOR(S,A,B);
|
||||
# lo = A:2 ^ B:2;
|
||||
# hi = A(2) ^ B(2);
|
||||
# D:2 = lo;
|
||||
# D(2) = hi;
|
||||
# }
|
||||
:evxor vrD_64_0,vrA_64_0,vrB_64_0 is OP=4 & vrD_64_0 & vrA_64_0 & vrB_64_0 & XOP_0_10=534
|
||||
{
|
||||
vrD_64_0 = vrA_64_0 ^ vrB_64_0;
|
||||
}
|
||||
|
||||
# TODO evmwlssianw RT,RA,RB
|
||||
# TODO complicated
|
||||
|
|
|
@ -1137,9 +1137,9 @@
|
|||
|
||||
# evlwhe RT,D(RA)
|
||||
# evlwhe rT,rA,UI
|
||||
:evlwhe D,EVUIMM_4_RAt is OP=4 & D & EVUIMM_4_RAt & RA_OR_ZERO & UI & XOP_0_10=785
|
||||
:evlwhe D,EVUIMM_4_RAt is OP=4 & D & EVUIMM_4_RAt & XOP_0_10=785
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = RA_OR_ZERO + (UI * 4);
|
||||
ea:$(REGISTER_SIZE) = EVUIMM_4_RAt;
|
||||
|
||||
# move results into upper and lower words
|
||||
tmpZ:8 = zext( *:2(ea + 2) );
|
||||
|
@ -1179,9 +1179,9 @@
|
|||
# ISA-info: evlwwsplat - Form "EVX" Page 521 Category "SP"
|
||||
# binutils: NO-EXAMPLE - evlwwsplat
|
||||
# collides with maclhwu
|
||||
:evlwwsplat D,EVUIMM_4_RAt is OP=4 & D & RA_OR_ZERO & EVUIMM_4_RAt & UI & XOP_0_10=793
|
||||
:evlwwsplat D,EVUIMM_4_RAt is OP=4 & D & EVUIMM_4_RAt & XOP_0_10=793
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = RA_OR_ZERO + (UI * 4);
|
||||
ea:$(REGISTER_SIZE) = EVUIMM_4_RAt;
|
||||
|
||||
# move results into upper and lower words
|
||||
tmpZ:8 = zext( *:4(ea) );
|
||||
|
@ -1413,10 +1413,34 @@
|
|||
tmpAL:8 = zext( A:4 );
|
||||
tmpBL:8 = zext( B:4 );
|
||||
|
||||
D = tmpAL * tmpBL;
|
||||
temp:8 = tmpAL * tmpBL;
|
||||
D = temp;
|
||||
}
|
||||
|
||||
# evmwumia RT,RA,RB
|
||||
# ISA-cmt: Vector Multiply Word Unsigned, Modulo, Integer to Accumulator
|
||||
# evmwumia rD,rA,rB 100 01A1 1000 A=1
|
||||
:evmwumia D,A,B is OP=4 & A & B & D & XOP_0_10=0x478 {
|
||||
tmpAL:8 = zext( A:4 );
|
||||
tmpBL:8 = zext( B:4 );
|
||||
|
||||
temp:8 = tmpAL * tmpBL;
|
||||
D = temp;
|
||||
ACC = D;
|
||||
}
|
||||
|
||||
# evmwumiaa RT,RA,RB
|
||||
# ISA-cmt: Vector Multiply Word Unsigned, Modulo, Integer and Accumulate
|
||||
# evmwumiaa rD,rA,rB 101 0101 1000
|
||||
# evmwumiaa confict with macchwo
|
||||
:evmwumiaa D,A,B is OP=4 & A & B & D & XOP_0_10=0x558 {
|
||||
tmpAL:8 = zext( A:4 );
|
||||
tmpBL:8 = zext( B:4 );
|
||||
|
||||
temp:8 = tmpAL * tmpBL;
|
||||
D = ACC + temp;
|
||||
ACC = D;
|
||||
}
|
||||
|
||||
# =================================================================
|
||||
# Page 547
|
||||
|
|
|
@ -4,120 +4,6 @@
|
|||
@include "SPE_APU.sinc"
|
||||
@endif
|
||||
|
||||
define pcodeop vectorExclusiveOr;
|
||||
define pcodeop vectorMergeHigh;
|
||||
define pcodeop vectorMergeLow;
|
||||
define pcodeop vectorLoadDoubleWordIntoDoubleWordIndexed;
|
||||
define pcodeop vectorStoreDoubleOfDoubleIndexed;
|
||||
define pcodeop initializeAccumulator;
|
||||
define pcodeop vectorShiftRightWordSigned;
|
||||
define pcodeop vectorShiftRightWordUnsigned;
|
||||
|
||||
:evxor vrD_64_0,vrA_64_0,vrB_64_0 is OP=4 & vrD_64_0 & vrA_64_0 & vrB_64_0 & XOP_0_10=534
|
||||
{
|
||||
vrD_64_0 = vrA_64_0 ^ vrB_64_0;
|
||||
}
|
||||
|
||||
@if REGISTER_SIZE=="8"
|
||||
:evmergehi S,A,B is OP=4 & S & A & B & XOP_0_10=556
|
||||
{
|
||||
S[32,32] = A[32,32];
|
||||
S[ 0,32] = B[ 0,32];
|
||||
}
|
||||
|
||||
:evmergelo S,A,B is OP=4 & S & A & B & XOP_0_10=557
|
||||
{
|
||||
S[32,32] = A[0,32];
|
||||
S[ 0,32] = B[0,32];
|
||||
}
|
||||
@endif
|
||||
|
||||
|
||||
:evldd RT,dUI16PlusRAOrZeroAddress is OP=4 & RT & dUI16PlusRAOrZeroAddress & XOP_0_10=769
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = dUI16PlusRAOrZeroAddress;
|
||||
RT = *:8 ($(EATRUNC));
|
||||
}
|
||||
|
||||
:evlddx RT,RA_OR_ZERO,RB is OP=4 & RT & RA_OR_ZERO & RB & XOP_0_10=768
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = RA_OR_ZERO + RB;
|
||||
RT = *:8 ($(EATRUNC));
|
||||
}
|
||||
|
||||
@if REGISTER_SIZE=="8"
|
||||
@ifndef IS_ISA
|
||||
:evsrws S,A,B is OP=4 & S & A & B & XOP_0_10=545
|
||||
{
|
||||
local low:4 = A[0,32];
|
||||
local high:4 = A[32,32];
|
||||
local low_shift:1 = B[0,5];
|
||||
local high_shift:1 = B[32,5];
|
||||
S[0,32] = low s>> zext(low_shift);
|
||||
S[32,32] = high s>> zext(high_shift);
|
||||
}
|
||||
@endif
|
||||
|
||||
@ifndef IS_ISA
|
||||
:evsrwu S,A,B is OP=4 & S & A & B & XOP_0_10=544
|
||||
{
|
||||
local low:4 = A[0,32];
|
||||
local high:4 = A[32,32];
|
||||
local low_shift:1 = B[0,5];
|
||||
local high_shift:1 = B[32,5];
|
||||
S[0,32] = low >> zext(low_shift);
|
||||
S[32,32] = high >> zext(high_shift);
|
||||
}
|
||||
@endif
|
||||
@endif
|
||||
|
||||
:evstdd RS,dUI16PlusRAOrZeroAddress is OP=4 & RS & dUI16PlusRAOrZeroAddress & XOP_0_10=801
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = dUI16PlusRAOrZeroAddress;
|
||||
*:8 ($(EATRUNC)) = RS;
|
||||
}
|
||||
|
||||
:evstddx RS,RA_OR_ZERO,RB is OP=4 & RS & RA_OR_ZERO & RB & XOP_0_10=800
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = RA_OR_ZERO + RB;
|
||||
*:8 ($(EATRUNC)) = RS;
|
||||
}
|
||||
|
||||
:evmra RT,RA is OP=4 & RT & RA & BITS_11_15=0 & XOP_0_10=1220
|
||||
{
|
||||
ACC = zext(RA);
|
||||
RT = RA;
|
||||
}
|
||||
|
||||
@if REGISTER_SIZE=="8"
|
||||
# evmergehilo rD,rA,rB 010 0010 1110
|
||||
:evmergehilo S,A,B is OP=4 & S & A & B & XOP_0_10=558 {
|
||||
S[32,32] = A[32,32];
|
||||
S[ 0,32] = B[ 0,32];
|
||||
|
||||
}
|
||||
|
||||
# evmergelohi rD,rA,rB 010 0010 1111
|
||||
:evmergelohi S,A,B is OP=4 & S & A & B & XOP_0_10=559 {
|
||||
S[32,32] = A[ 0,32];
|
||||
S[ 0,32] = B[32,32];
|
||||
}
|
||||
@endif
|
||||
|
||||
# evstwwe rS,rA,UIMM 011 0011 1001
|
||||
:evstwwe RS,dUI16PlusRAOrZeroAddress is OP=4 & RS & dUI16PlusRAOrZeroAddress & XOP_0_10=0x339
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = dUI16PlusRAOrZeroAddress;
|
||||
*:4 ($(EATRUNC)) = RS:4;
|
||||
}
|
||||
|
||||
# evstwwex rS,rA,rB 011 0011 1000
|
||||
:evstwwex RS,RA_OR_ZERO,RB is OP=4 & RS & RA_OR_ZERO & RB & XOP_0_10=0x338
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = RA_OR_ZERO + RB;
|
||||
*:4 ($(EATRUNC)) = RS:4;
|
||||
}
|
||||
|
||||
:lvx vrD, RA_OR_ZERO, RB is OP=31 & vrD & RA_OR_ZERO & RB & XOP_1_10=103 & BIT_0=0
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = RA_OR_ZERO + RB;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# by the actual processor (e.g., floating pointer registers and associated instructions).
|
||||
# The actual processor only supports a subset of the registers and instructions implemented.
|
||||
|
||||
@define E500
|
||||
@define E500 "1"
|
||||
|
||||
@define ENDIAN "big"
|
||||
|
||||
|
@ -19,10 +19,11 @@
|
|||
|
||||
@define CTR_OFFSET "32"
|
||||
|
||||
@define NoLegacyIntegerMultiplyAccumulate
|
||||
@define NoLegacyIntegerMultiplyAccumulate "1"
|
||||
|
||||
@include "ppc_common.sinc"
|
||||
@include "quicciii.sinc"
|
||||
@include "SPE_APU.sinc"
|
||||
@include "evx.sinc"
|
||||
@include "SPEF_SCR.sinc"
|
||||
@include "SPE_EFSD.sinc"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# by the actual processor (e.g., floating pointer registers and associated instructions).
|
||||
# The actual processor only supports a subset of the registers and instructions implemented.
|
||||
|
||||
@define E500
|
||||
@define E500 "1"
|
||||
|
||||
@define ENDIAN "little"
|
||||
|
||||
|
@ -19,10 +19,11 @@
|
|||
|
||||
@define CTR_OFFSET "32"
|
||||
|
||||
@define NoLegacyIntegerMultiplyAccumulate
|
||||
@define NoLegacyIntegerMultiplyAccumulate "1"
|
||||
|
||||
@include "ppc_common.sinc"
|
||||
@include "quicciii.sinc"
|
||||
@include "SPE_APU.sinc"
|
||||
@include "evx.sinc"
|
||||
@include "SPEF_SCR.sinc"
|
||||
@include "SPE_EFSD.sinc"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#
|
||||
@define CTR_OFFSET "32"
|
||||
|
||||
@define NoLegacyIntegerMultiplyAccumulate
|
||||
@define NoLegacyIntegerMultiplyAccumulate "1"
|
||||
|
||||
@include "ppc_common.sinc"
|
||||
@include "quicciii.sinc"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#
|
||||
@define CTR_OFFSET "32"
|
||||
|
||||
@define NoLegacyIntegerMultiplyAccumulate
|
||||
@define NoLegacyIntegerMultiplyAccumulate "1"
|
||||
|
||||
@include "ppc_common.sinc"
|
||||
@include "quicciii.sinc"
|
||||
|
|
|
@ -1064,9 +1064,14 @@ define token instrvle(16)
|
|||
LK0_VLE=(0,0)
|
||||
;
|
||||
|
||||
EVUIMM_2_RAt: val^"("^A^")" is A & EVUIMM_2 [ val = EVUIMM_2*2; ] { tmp:4 = A+(EVUIMM_2*2); export tmp; }
|
||||
EVUIMM_4_RAt: val^"("^A^")" is A & EVUIMM_4 [ val = EVUIMM_4*4; ] { tmp:4 = A+(EVUIMM_4*4); export tmp; }
|
||||
EVUIMM_8_RAt: val^"("^A^")" is A & EVUIMM_8 [ val = EVUIMM_8*8; ] { tmp:4 = A+(EVUIMM_8*8); export tmp; }
|
||||
EVUIMM_2_RAt: val^"("^RA^")" is RA & A & EVUIMM_2 [ val = EVUIMM_2*2; ] { tmp:$(REGISTER_SIZE) = RA+zext(val:4); export tmp; }
|
||||
EVUIMM_2_RAt: val^"("^RA^")" is RA & A=0 & EVUIMM_2 [ val = EVUIMM_2*2; ] { tmp:$(REGISTER_SIZE) = zext(val:4); export tmp; }
|
||||
|
||||
EVUIMM_4_RAt: val^"("^RA^")" is RA & A & EVUIMM_4 [ val = EVUIMM_4*4; ] { tmp:$(REGISTER_SIZE) = RA+zext(val:4); export tmp; }
|
||||
EVUIMM_4_RAt: val^"("^RA^")" is RA & A=0 & EVUIMM_4 [ val = EVUIMM_4*4; ] { tmp:$(REGISTER_SIZE) = zext(val:4); export tmp; }
|
||||
|
||||
EVUIMM_8_RAt: val^"("^RA^")" is RA & A & EVUIMM_8 [ val = EVUIMM_8*8; ] { tmp:$(REGISTER_SIZE) = RA+zext(val:4); export tmp; }
|
||||
EVUIMM_8_RAt: val^"("^RA^")" is RA & A=0 & EVUIMM_8 [ val = EVUIMM_8*8; ] { tmp:$(REGISTER_SIZE) = zext(val:4); export tmp; }
|
||||
|
||||
attach variables [ T ]
|
||||
[ vs0 vs1 vs2 vs3 vs4 vs5 vs6 vs7 vs8 vs9 vs10 vs11 vs12 vs13 vs14 vs15
|
||||
|
|
|
@ -49,6 +49,13 @@
|
|||
dataCacheBlockClearToZero(ea);
|
||||
}
|
||||
|
||||
#dcbzl 0,r0 0x7c 20 07 ec
|
||||
:dcbzl RA_OR_ZERO,B is OP=31 & BITS_21_25=1 & B & XOP_1_10=1014 & BIT_0=0 & RA_OR_ZERO
|
||||
{
|
||||
ea:$(REGISTER_SIZE) = RA_OR_ZERO + B;
|
||||
dataCacheBlockClearToZero(ea);
|
||||
}
|
||||
|
||||
define pcodeop memoryBarrier;
|
||||
#mbar 0 7c 00 06 ac
|
||||
:mbar MO is OP=31 & MO & XOP_1_10=854
|
||||
|
|
|
@ -829,17 +829,17 @@ IMM16B: val is IMM_0_10_VLE & IMM_16_20_VLE [ val = (IMM_16_20_VLE << 11) |
|
|||
tmpS:4 = S:4;
|
||||
tmpA:4 = (tmpS << SHL) | (tmpS >> (32 - SHL));
|
||||
|
||||
tmpM1 = (~0:4) << MBL;
|
||||
tmpM1 = tmpM1 >> ((31-ME) + MBL);
|
||||
tmpM1 = tmpM1 << (31-ME);
|
||||
tmpM1:4 = (~0:4) << MBL;
|
||||
tmpM1 = tmpM1 >> ((31-ME) + MBL);
|
||||
tmpM1 = tmpM1 << (31-ME);
|
||||
|
||||
tmpM2 = (~0:4) << ME;
|
||||
tmpM2 = tmpM2 >> ((31-MBL) + ME);
|
||||
tmpM2 = tmpM2 << (31-MBL);
|
||||
tmpM2 = ~tmpM2;
|
||||
tmpM2:4 = (~0:4) << ME;
|
||||
tmpM2 = tmpM2 >> ((31-MBL) + ME);
|
||||
tmpM2 = tmpM2 << (31-MBL);
|
||||
tmpM2 = ~tmpM2;
|
||||
|
||||
local invert = (ME:1 < MBL:1);
|
||||
tmpM = (zext(invert == 0)*tmpM1) + (zext(invert == 1)*tmpM2);
|
||||
tmpM:4 = (zext(invert == 0)*tmpM1) + (zext(invert == 1)*tmpM2);
|
||||
A = zext(tmpA & tmpM) | (A & zext(~tmpM));
|
||||
}
|
||||
|
||||
|
@ -847,17 +847,17 @@ IMM16B: val is IMM_0_10_VLE & IMM_16_20_VLE [ val = (IMM_16_20_VLE << 11) |
|
|||
tmpS:4 = S:4;
|
||||
tmpA:4 = (tmpS << SHL) | (tmpS >> (32 - SHL));
|
||||
|
||||
tmpM1 = (~0:4) << MBL;
|
||||
tmpM1 = tmpM1 >> ((31-ME) + MBL);
|
||||
tmpM1 = tmpM1 << (31-ME);
|
||||
tmpM1:4 = (~0:4) << MBL;
|
||||
tmpM1 = tmpM1 >> ((31-ME) + MBL);
|
||||
tmpM1 = tmpM1 << (31-ME);
|
||||
|
||||
tmpM2 = (~0:4) << ME;
|
||||
tmpM2:4 = (~0:4) << ME;
|
||||
tmpM2 = tmpM2 >> ((31-MBL) + ME);
|
||||
tmpM2 = tmpM2 << (31-MBL);
|
||||
tmpM2 = ~tmpM2;
|
||||
|
||||
local invert = (ME:1 < MBL:1);
|
||||
tmpM = (zext(invert == 0)*tmpM1) + (zext(invert == 1)*tmpM2);
|
||||
tmpM:4 = (zext(invert == 0)*tmpM1) + (zext(invert == 1)*tmpM2);
|
||||
A = zext(tmpA & tmpM);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
</prepatterns>
|
||||
<postpatterns>
|
||||
<data>10010100 00100001 11...... .....000 </data> <!-- STWU r1,xx(r1) -->
|
||||
<data>011111.. ...01000 00000010 10100110 </data> <!-- MFSPR rx,lr -->
|
||||
<data>0x7c2c0b78 0x38 0x21 ........ ........ 0x91810000 </data> <!-- or r12,r1,r1; stw r12,0x0(r1) -->
|
||||
<codeboundary /> <!-- it is at least code -->
|
||||
<possiblefuncstart/>
|
||||
|
@ -17,8 +18,11 @@
|
|||
</prepatterns>
|
||||
<postpatterns>
|
||||
<data>10010100 00100001 11...... .....000 011111.. ...01000 00000010 10100110 </data> <!-- STWU r1,xx(r1); MFSPR rx,lr -->
|
||||
<data>011111.. ...01000 00000010 10100110 10010100 00100001 11...... .....000 </data> <!-- MFSPR rx,lr; STWU r1,xx(r1); -->
|
||||
<data>10010100 00100001 11...... .....000 0x........ 011111.. ...01000 00000010 10100110 </data> <!-- STWU r1,xx(r1); xxx_instr; MFSPR rx,lr -->
|
||||
<data>011111.. ...01000 00000010 10100110 0x........ 10010100 00100001 11...... .....000 </data> <!-- MFSPR rx,lr; xxx_instr; STWU r1,xx(r1) -->
|
||||
<data>10010100 00100001 11...... .....000 0x........ 0x........ 011111.. ...01000 00000010 10100110 </data> <!-- STWU r1,xx(r1); xxx_instr; xxx_instr; MFSPR rx,lr -->
|
||||
<data>011111.. ...01000 00000010 10100110 0x........ 0x........ 10010100 00100001 11...... .....000 </data> <!-- MFSPR rx,lr; xxx_instr; xxx_instr; STWU r1,xx(r1) -->
|
||||
<data>0x7c2c0b78 0x38 0x21 ........ ........ 0x91810000 </data> <!-- or r12,r1,r1; stw r12,0x0(r1) -->
|
||||
<codeboundary /> <!-- it is at least code -->
|
||||
<possiblefuncstart/>
|
||||
|
@ -31,6 +35,12 @@
|
|||
<possiblefuncstart after="defined" /> <!-- must be something defined right before this -->
|
||||
</pattern>
|
||||
|
||||
<pattern>
|
||||
<data>011111.. ...01000 00000010 10100110 10010100 00100001 11...... .....000 </data> <!-- MFSPR rx,lr; STWU r1,xx(r1) -->
|
||||
<codeboundary />
|
||||
<possiblefuncstart after="defined" /> <!-- must be something defined right before this -->
|
||||
</pattern>
|
||||
|
||||
<pattern>
|
||||
<data> 0x4e 0x80 0x00 0x21</data> <!-- blrl -->
|
||||
<possiblefuncstart validcode="function" label="__get_pc_thunk_lr" /> <!-- must be a function here -->
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
</prepatterns>
|
||||
<postpatterns>
|
||||
<data>.....000 11...... 00100001 10010100 </data> <!-- STWU r1,xx(r1) -->
|
||||
<data>10100110 00000010 ...01000 011111.. </data> <!-- MFSPR rx,lr -->
|
||||
<data>0x780b2c7c ........ ........ 0x21 0x38 0x00008191 </data> <!-- or r12,r1,r1; stw r12,0x0(r1) -->
|
||||
<codeboundary /> <!-- it is at least code -->
|
||||
<possiblefuncstart/>
|
||||
|
@ -17,8 +18,11 @@
|
|||
</prepatterns>
|
||||
<postpatterns>
|
||||
<data>.....000 11...... 00100001 10010100 10100110 00000010 ...01000 011111.. </data> <!-- STWU r1,xx(r1); MFSPR rx,lr -->
|
||||
<data>10100110 00000010 ...01000 011111.. .....000 11...... 00100001 10010100 </data> <!-- MFSPR rx,lr; STWU r1,xx(r1); -->
|
||||
<data>.....000 11...... 00100001 10010100 0x........ 10100110 00000010 ...01000 011111.. </data> <!-- STWU r1,xx(r1); xxx_instr; MFSPR rx,lr -->
|
||||
<data>10100110 00000010 ...01000 011111.. 0x........ .....000 11...... 00100001 10010100 </data> <!-- MFSPR rx,lr; xxx_instr; STWU r1,xx(r1) -->
|
||||
<data>.....000 11...... 00100001 10010100 0x........ 0x........ 10100110 00000010 ...01000 011111.. </data> <!-- STWU r1,xx(r1); xxx_instr; xxx_instr; MFSPR rx,lr -->
|
||||
<data>10100110 00000010 ...01000 011111.. 0x........ 0x........ .....000 11...... 00100001 10010100 </data> <!-- MFSPR rx,lr; xxx_instr; xxx_instr; STWU r1,xx(r1) -->
|
||||
<data>0x780b2c7c ........ ........ 0x21 0x38 0x00008191 </data> <!-- or r12,r1,r1; stw r12,0x0(r1) -->
|
||||
<codeboundary /> <!-- it is at least code -->
|
||||
<possiblefuncstart/>
|
||||
|
@ -31,6 +35,12 @@
|
|||
<possiblefuncstart after="defined" /> <!-- must be something defined right before this -->
|
||||
</pattern>
|
||||
|
||||
<pattern>
|
||||
<data>10100110 00000010 ...01000 011111.. .....000 11...... 00100001 10010100 </data> <!-- MFSPR rx,lr; STWU r1,xx(r1) -->
|
||||
<codeboundary />
|
||||
<possiblefuncstart after="defined" /> <!-- must be something defined right before this -->
|
||||
</pattern>
|
||||
|
||||
<pattern>
|
||||
<data>0x21 0x00 0x80 0x4e</data> <!-- blrl -->
|
||||
<possiblefuncstart validcode="function" label="__get_pc_thunk_lr" /> <!-- must be a function here -->
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
<register name="r13"/>
|
||||
<register name="r14"/>
|
||||
<register name="r15"/>
|
||||
<register name="gbr"/>
|
||||
</unaffected>
|
||||
<killedbycall>
|
||||
<register name="r2"/>
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
<register name="r13"/>
|
||||
<register name="r14"/>
|
||||
<register name="r15"/>
|
||||
<register name="gbr"/>
|
||||
</unaffected>
|
||||
<killedbycall>
|
||||
<register name="r2"/>
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</returnaddress>
|
||||
<default_proto>
|
||||
<prototype name="__swiftcall" extrapop="8" stackshift="8">
|
||||
<!-- https://github.com/apple/swift/blob/main/docs/ABI/CallConvSummary.rst#x86-64 -->
|
||||
<!-- https://github.com/swiftlang/swift/blob/main/docs/ABI/CallingConventionSummary.rst#x86-64 -->
|
||||
<input>
|
||||
<pentry minsize="8" maxsize="8" storage="hiddenret">
|
||||
<register name="RAX"/>
|
||||
|
@ -146,7 +146,7 @@
|
|||
</prototype>
|
||||
</default_proto>
|
||||
<prototype name="__thiscall" extrapop="8" stackshift="8">
|
||||
<!-- https://github.com/apple/swift/blob/main/docs/ABI/CallConvSummary.rst#x86-64 -->
|
||||
<!-- https://github.com/swiftlang/swift/blob/main/docs/ABI/CallingConventionSummary.rst#x86-64 -->
|
||||
<input>
|
||||
<pentry minsize="8" maxsize="8" storage="hiddenret">
|
||||
<register name="RAX"/>
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: Ghidra launch
|
||||
|
||||
@echo off
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
@echo off
|
||||
|
||||
:: ---------------------------------------------------------------------------------------
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
@echo off
|
||||
|
||||
:: ***********************************************************
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: GhidraGo launch
|
||||
|
||||
@echo off
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: Ghidra Headless Analyzer launch (see analyzeHeadlessREADME.html)
|
||||
|
||||
@echo off
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: Command-line script for interacting with a BSim database
|
||||
|
||||
@echo off
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: Ghidra Jar Builder launch
|
||||
|
||||
@echo off
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: Ghidra Filesystem Conversion launch
|
||||
|
||||
@echo off
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: Script that takes either a single .pdb file or a directory
|
||||
:: that contains .pdb files (search for files is recursive).
|
||||
::
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: GADP Server launch
|
||||
|
||||
@echo off
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: GADP Server launch
|
||||
|
||||
@echo off
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: Ghidra-Clean
|
||||
:: An interactive utility to discover and delete artifacts that Ghidra lays down on the filesystem.
|
||||
|
||||
|
@ -6,4 +21,4 @@ setlocal
|
|||
|
||||
set VMARG_LIST=-Djava.awt.headless=true
|
||||
|
||||
call "%~dp0launch.bat" fg jdk Ghidra-Clean "" "" utility.application.AppCleaner Ghidra
|
||||
call "%~dp0launch.bat" fg jdk Ghidra-Clean "" "" utility.application.AppCleaner Ghidra
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: Ghidra debug launch
|
||||
|
||||
@echo off
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: Ghidra JShell launch
|
||||
|
||||
@echo off
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
:: Ghidra jython launch
|
||||
|
||||
@echo off
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
:: ###
|
||||
:: IP: GHIDRA
|
||||
::
|
||||
:: Licensed under the Apache License, Version 2.0 (the "License");
|
||||
:: you may not use this file except in compliance with the License.
|
||||
:: You may obtain a copy of the License at
|
||||
::
|
||||
:: http://www.apache.org/licenses/LICENSE-2.0
|
||||
::
|
||||
:: Unless required by applicable law or agreed to in writing, software
|
||||
:: distributed under the License is distributed on an "AS IS" BASIS,
|
||||
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
:: See the License for the specific language governing permissions and
|
||||
:: limitations under the License.
|
||||
:: ##
|
||||
@echo off
|
||||
goto continue
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue