mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-923: Capturing relevant snap and stack before passing off to
tx.exe
This commit is contained in:
parent
61c47a7663
commit
a2b7fbfef2
3 changed files with 21 additions and 7 deletions
|
@ -99,7 +99,10 @@ public class DBTraceStack extends DBAnnotatedObject implements TraceStack {
|
|||
}
|
||||
}
|
||||
|
||||
@DBAnnotatedField(column = THREAD_SNAP_COLUMN_NAME, indexed = true, codec = ThreadSnapDBFieldCodec.class)
|
||||
@DBAnnotatedField(
|
||||
column = THREAD_SNAP_COLUMN_NAME,
|
||||
indexed = true,
|
||||
codec = ThreadSnapDBFieldCodec.class)
|
||||
private ThreadSnap threadSnap;
|
||||
@DBAnnotatedField(column = FRAMES_COLUMN_NAME)
|
||||
private long[] frameKeys;
|
||||
|
@ -109,7 +112,8 @@ public class DBTraceStack extends DBAnnotatedObject implements TraceStack {
|
|||
private DBTraceThread thread;
|
||||
private final List<DBTraceStackFrame> frames = new ArrayList<>();
|
||||
|
||||
public DBTraceStack(DBTraceStackManager manager, DBCachedObjectStore<?> store, DBRecord record) {
|
||||
public DBTraceStack(DBTraceStackManager manager, DBCachedObjectStore<?> store,
|
||||
DBRecord record) {
|
||||
super(store, record);
|
||||
this.manager = manager;
|
||||
}
|
||||
|
@ -170,6 +174,8 @@ public class DBTraceStack extends DBAnnotatedObject implements TraceStack {
|
|||
|
||||
@Override
|
||||
public void setDepth(int depth, boolean atInner) {
|
||||
//System.err.println("setDepth(threadKey=" + thread.getKey() + "snap=" + getSnap() +
|
||||
// ",depth=" + depth + ",inner=" + atInner + ");");
|
||||
int curDepth = frameKeys == null ? 0 : frameKeys.length;
|
||||
if (depth == curDepth) {
|
||||
return;
|
||||
|
|
|
@ -103,6 +103,8 @@ public class DBTraceStackFrame extends DBAnnotatedObject
|
|||
|
||||
@Override
|
||||
public void setProgramCounter(Address pc) {
|
||||
//System.err.println("setPC(threadKey=" + stack.getThread().getKey() + ",snap=" +
|
||||
// stack.getSnap() + ",level=" + level + ",pc=" + pc + ");");
|
||||
manager.trace.assertValidAddress(pc);
|
||||
try (LockHold hold = LockHold.lock(manager.lock.writeLock())) {
|
||||
if (Objects.equals(this.pc, pc)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue