diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/ChangeHistory.html b/Ghidra/Configurations/Public_Release/src/global/docs/ChangeHistory.html index b85aa8e798..7c597b3150 100644 --- a/Ghidra/Configurations/Public_Release/src/global/docs/ChangeHistory.html +++ b/Ghidra/Configurations/Public_Release/src/global/docs/ChangeHistory.html @@ -7,6 +7,55 @@
++New Features
++
+- Debugger:Watches. Added ability to modify target memory and registers via the Watches window. (GP-1264, Issue #2866)
+
+Improvements
++
+- Analysis. Improved SH4 constant reference analysis for PIC code, reference placement for jumps/calls, and non-return function analysis. General constant reference analysis has also been improved. (GP-1258)
+- Basic Infrastructure. Removed usage of the
+--illegal-access=permit
JVM argument for improved JDK 17 runtime support. The Ghidra Server continues to require JDK 11 to successfully run at this time. (GP-1193, Issue #3355)- Debugger. Debugger Agent windows now display log messages. (GP-507)
+- Debugger. Changed Debugger's Launch action to propose the current program as the command line. (GP-1176)
+- Debugger. Providing broader defaults for recording GDB-supported architectures. (GP-1237)
+- Debugger:GDB. GDB connector's Use existing session prompts with more instructions. (GP-1076)
+- Debugger:GDB. Added use starti option to GDB launcher. (GP-1158)
+- Debugger:Mappings. Added Map Identically action to Modules window. (GP-1232)
+- GUI. Changed analysis options to always show current program options when accessed via Edit -> Options for <program>.... Also added warning if the user makes changes to the analysis options and then changes the combo box without saving the changes first. (GP-1188)
+- Importer. The ContinuesInterceptor, which allows the import process to proceed past uncaught exceptions that can be encountered while parsing corrupted headers, has been disabled by default. Its usage is now deprecated and will be removed in a future Ghidra release. It can be temporarily re-enabled in support/launch.properties. (GP-1248)
+- Importer:ELF. Added support for additional ELF AARCH64 relocations such as
+R_AARCH64_LDST64_ABS_LO12_NC
. (GP-1278, Issue #3352)- Processors. Corrected semantics for x86/x64
+FXSAVE
and related instructions. (GP-1228)- Processors. Added semantics for several x86/x64 vector operations. (GP-1262)
+
+Bugs
++
+- Byte Viewer. Fixed stack overflow issue in ByteViewer. (GP-1276)
+- C Parsing. Eliminated static variables that caused follow-on CParser tasks to error because they started in a bad state. (GP-1251, Issue #1421, #3350)
+- Debugger. Fixed NullPointerException in Objects window's Import/Export actions. (GP-1047)
+- Debugger. Fixed NullPointerException in DBTraceStack. (GP-1059)
+- Debugger. Fixed a rare deadlock involving DBTrace.addListener. (GP-1154)
+- Debugger. Track PC action now scrolls to cursor even if the cursor is already at PC. (GP-1175)
+- Debugger. Created better mapping of GDB ARM architecture names to Ghidra languages for the Debugger. (GP-1221, Issue #3333)
+- Debugger. Capture Memory button is more aggressive in finding the correct region to capture, reducing bad region errors. (GP-1227)
+- Debugger. Fixed delay slot disassembly in Debugger dynamic listing. (GP-1246, Issue #3358)
+- Debugger:Emulator. Fixed cache-reading issue in trace emulation. (GP-1187)
+- Debugger:Emulator. Fixed a critical typo in PairedPcodeArithmetic. (GP-1191)
+- Debugger:Trace. Dynamic listing now updates immediately when changing data type settings. (GP-1215)
+- Debugger:Trace. Removed
+Missing Instruction Prototype
exception in favor of using InvalidPrototype. (GP-1226)- Debugger:Trace. Adding context fields to Register viewer no longer throws an exception. (GP-1256)
+- Decompiler. Fixed a bug that could cause an infinite loop in the Decompiler when using bonded register pairs. (GP-1270, Issue #3105)
+- Decompiler. Fixed a bug causing
+Exceeded maximum restarts with more pending
warnings in the Decompiler. (GP-1277, Issue #3104)- Disassembly. Fixed an IllegalArgumentException in the Non-Returning Functions analyzer caused by processor specifications without a defined context, such as Sparc and SH4. (GP-1216)
+- DWARF. Corrected potential random errors in DWARF parsing caused by modifications to a shared global static DWARF decoder. (GP-1272)
+- Exporter. Exporters with empty default extension names will no longer append a dot to the output filename. (GP-1201, Issue #3325)
+- GUI. Fixed the missing mnemonic of the Graph menu. (GP-1244, Issue #3330)
+- Processors. Corrected carry flag semantics for the 6502 processor's
+SBC
instruction. (GP-1109, Issue #3189, #3190)
New Features
diff --git a/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/watch/DebuggerWatchesProviderTest.java b/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/watch/DebuggerWatchesProviderTest.java index 05976b2654..bb5aed362c 100644 --- a/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/watch/DebuggerWatchesProviderTest.java +++ b/Ghidra/Debug/Debugger/src/test/java/ghidra/app/plugin/core/debug/gui/watch/DebuggerWatchesProviderTest.java @@ -280,7 +280,7 @@ public class DebuggerWatchesProviderTest extends AbstractGhidraHeadedDebuggerGUI performAction(watchesProvider.actionAdd); WatchRow row = Unique.assertOne(watchesProvider.watchTableModel.getModelData()); - row.setExpression("r0"); + row.setExpression(expression); traceManager.openTrace(tb.trace); traceManager.activateThread(thread); diff --git a/Ghidra/Features/Decompiler/certification.manifest b/Ghidra/Features/Decompiler/certification.manifest index f7819633aa..8aea441f58 100644 --- a/Ghidra/Features/Decompiler/certification.manifest +++ b/Ghidra/Features/Decompiler/certification.manifest @@ -12,12 +12,14 @@ src/decompile/cpp/Makefile||GHIDRA||||END| src/decompile/datatests/convert.xml||GHIDRA||||END| src/decompile/datatests/deadvolatile.xml||GHIDRA||||END| src/decompile/datatests/elseif.xml||GHIDRA||||END| +src/decompile/datatests/deindirect.xml||GHIDRA||||END| src/decompile/datatests/floatprint.xml||GHIDRA||||END| src/decompile/datatests/forloop1.xml||GHIDRA||||END| src/decompile/datatests/forloop_loaditer.xml||GHIDRA||||END| src/decompile/datatests/forloop_thruspecial.xml||GHIDRA||||END| src/decompile/datatests/forloop_varused.xml||GHIDRA||||END| src/decompile/datatests/forloop_withskip.xml||GHIDRA||||END| +src/decompile/datatests/indproto.xml||GHIDRA||||END| src/decompile/datatests/loopcomment.xml||GHIDRA||||END| src/decompile/datatests/multiret.xml||GHIDRA||||END| src/decompile/datatests/namespace.xml||GHIDRA||||END| diff --git a/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc b/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc index e87033c34d..aa8e41208b 100644 --- a/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc +++ b/Ghidra/Features/Decompiler/src/decompile/cpp/fspec.cc @@ -4581,6 +4581,8 @@ void FuncCallSpecs::deindirect(Funcdata &data,Funcdata *newfd) if (isOverride()) // If we are overridden at the call-site return; // Don't use the discovered function prototype + data.getOverride().insertIndirectOverride(op->getAddr(),entryaddress); + // Try our best to merge existing prototype // with the one we have just been handed vector
newinput; @@ -4592,7 +4594,6 @@ void FuncCallSpecs::deindirect(Funcdata &data,Funcdata *newfd) commitNewOutputs(data,newoutput); } else { - data.getOverride().insertIndirectOverride(op->getAddr(),entryaddress); data.setRestartPending(true); } } @@ -4613,16 +4614,19 @@ void FuncCallSpecs::forceSet(Funcdata &data,const FuncProto &fp) { vector newinput; Varnode *newoutput; + + // Copy the recovered prototype into the override manager so that + // future restarts don't have to rediscover it + FuncProto *newproto = new FuncProto(); + newproto->copy(fp); + data.getOverride().insertProtoOverride(op->getAddr(),newproto); if (lateRestriction(fp,newinput,newoutput)) { commitNewInputs(data,newinput); commitNewOutputs(data,newoutput); } else { // Too late to make restrictions to correct prototype - // Add a restart override with the forcing prototype - FuncProto *newproto = new FuncProto(); - newproto->copy(fp); - data.getOverride().insertProtoOverride(op->getAddr(),newproto); + // Force a restart data.setRestartPending(true); } // Regardless of what happened, lock the prototype so it doesn't happen again diff --git a/Ghidra/Features/Decompiler/src/decompile/datatests/deindirect.xml b/Ghidra/Features/Decompiler/src/decompile/datatests/deindirect.xml new file mode 100644 index 0000000000..10fd58adfc --- /dev/null +++ b/Ghidra/Features/Decompiler/src/decompile/datatests/deindirect.xml @@ -0,0 +1,36 @@ + + diff --git a/Ghidra/Features/Decompiler/src/decompile/datatests/indproto.xml b/Ghidra/Features/Decompiler/src/decompile/datatests/indproto.xml new file mode 100644 index 0000000000..980558cd3f --- /dev/null +++ b/Ghidra/Features/Decompiler/src/decompile/datatests/indproto.xml @@ -0,0 +1,35 @@ ++ + + ++ 554889e54883 +ec20897dec8975e88955e4488d0598ff +ffff488945f88b45e48d50058b45e883 +c00389d689c79090909090837dec097f +14488b45f8ffd0488d3d2c010000e81d +feffffeb12488b45f8ffd0488d3d1d01 +0000e809feffff90c9c3 + ++ 4c657373004d6f726500 + ++ + + Exceeded maximum restarts +realfunc\(b \+ 3,c \+ 5\) ++ diff --git a/Ghidra/Processors/6502/data/languages/6502.slaspec b/Ghidra/Processors/6502/data/languages/6502.slaspec index 6cf3f005eb..a4f37d6721 100644 --- a/Ghidra/Processors/6502/data/languages/6502.slaspec +++ b/Ghidra/Processors/6502/data/languages/6502.slaspec @@ -421,7 +421,7 @@ ADDRI: imm16 is imm16 { tmp:2 = imm16; export *:2 tmp; } :SBC OP1 is (cc=1 & aaa=7) ... & OP1 { local op1 = OP1; - local result = A - op1 - C; + local result = A - op1 - !C; subtraction_flags1(A, op1, result); A = result;+ + + ++ 554889e54883ec10897dfc8975f848 +8955f08b45fc89c79090909090837df8 +647517488b45f0488b00ffd0488d3d53 +010000e838feffffeb16488b45f0488b +4008ffd0488d3d40010000e820feffff +90c9c3 + ++ 5065656b0047657400 + ++ + Exceeded maximum restarts +ptr->peek\)\(a\) +ptr->get\)\(a\) +