mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
commit
4df861c656
5 changed files with 14 additions and 8 deletions
|
@ -1113,6 +1113,10 @@ public class DebuggerModulesProvider extends ComponentProviderAdapter
|
||||||
}
|
}
|
||||||
bestModule = module;
|
bestModule = module;
|
||||||
}
|
}
|
||||||
|
if (bestModule == null) {
|
||||||
|
setSelectedModules(Set.of());
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (bestModule.getSections(snap).isEmpty()) {
|
if (bestModule.getSections(snap).isEmpty()) {
|
||||||
setSelectedModules(Set.of(bestModule));
|
setSelectedModules(Set.of(bestModule));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -182,7 +182,7 @@ public class SnapshotRow {
|
||||||
if (thread != null) {
|
if (thread != null) {
|
||||||
return thread;
|
return thread;
|
||||||
}
|
}
|
||||||
return getTime().getEventThread(trace);
|
return getTime().getLastThread(trace);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEventThreadName() {
|
public String getEventThreadName() {
|
||||||
|
|
|
@ -742,6 +742,8 @@ public class DebuggerEmulationServicePlugin extends Plugin implements DebuggerEm
|
||||||
destSnap.setDescription("Emulated");
|
destSnap.setDescription("Emulated");
|
||||||
try {
|
try {
|
||||||
ce.emulator().writeDown(key.platform, destSnap.getKey(), key.time.getSnap());
|
ce.emulator().writeDown(key.platform, destSnap.getKey(), key.time.getSnap());
|
||||||
|
TraceThread lastThread = key.time.getLastThread(key.trace);
|
||||||
|
destSnap.setEventThread(lastThread);
|
||||||
}
|
}
|
||||||
catch (Throwable e) {
|
catch (Throwable e) {
|
||||||
Msg.showError(this, null, "Emulate",
|
Msg.showError(this, null, "Emulate",
|
||||||
|
|
|
@ -643,7 +643,8 @@ public class ProgramEmulationUtils {
|
||||||
pc.getAddressSpace().isOverlaySpace() ? List.of(pc.getAddressSpace())
|
pc.getAddressSpace().isOverlaySpace() ? List.of(pc.getAddressSpace())
|
||||||
: List.of();
|
: List.of();
|
||||||
loadExecutable(initial, program, overlays);
|
loadExecutable(initial, program, overlays);
|
||||||
doLaunchEmulationThread(trace, snap, program, pc, pc);
|
TraceThread thread = doLaunchEmulationThread(trace, snap, program, pc, pc);
|
||||||
|
initial.setEventThread(thread);
|
||||||
}
|
}
|
||||||
trace.clearUndo();
|
trace.clearUndo();
|
||||||
success = true;
|
success = true;
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import ghidra.app.plugin.core.debug.service.emulation.*;
|
import ghidra.app.plugin.core.debug.service.emulation.BytesDebuggerPcodeEmulator;
|
||||||
import ghidra.app.plugin.processors.sleigh.SleighLanguage;
|
import ghidra.app.plugin.core.debug.service.emulation.BytesDebuggerPcodeEmulatorFactory;
|
||||||
import ghidra.app.script.GhidraScript;
|
import ghidra.app.script.GhidraScript;
|
||||||
import ghidra.debug.api.emulation.DebuggerPcodeMachine;
|
import ghidra.debug.api.emulation.DebuggerPcodeMachine;
|
||||||
import ghidra.debug.api.emulation.PcodeDebuggerAccess;
|
import ghidra.debug.api.emulation.PcodeDebuggerAccess;
|
||||||
|
@ -30,8 +30,7 @@ public class InstallCustomLibraryScript extends GhidraScript implements FlatDebu
|
||||||
@Override
|
@Override
|
||||||
protected PcodeUseropLibrary<byte[]> createUseropLibrary() {
|
protected PcodeUseropLibrary<byte[]> createUseropLibrary() {
|
||||||
return super.createUseropLibrary()
|
return super.createUseropLibrary()
|
||||||
.compose(new ModelingScript.SleighStdLibPcodeUseropLibrary<>(
|
.compose(new ModelingScript.SleighStdLibPcodeUseropLibrary<>(getLanguage()));
|
||||||
(SleighLanguage) access.getLanguage()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue