mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +02:00
Bug 317217: IDisassemblyBackend.SetDebugContextResult frame-level field is extraneous
This commit is contained in:
parent
9303fa016e
commit
931bdcb29a
3 changed files with 6 additions and 14 deletions
|
@ -115,7 +115,8 @@ public class DisassemblyBackendCdi implements IDisassemblyBackend, IDebugEventSe
|
|||
fTargetContext = null;
|
||||
|
||||
if (context instanceof ICStackFrame) {
|
||||
fTargetFrameContext = null;
|
||||
fTargetFrameContext = null;
|
||||
fFrameLevel = 0;
|
||||
fTargetContext = (ICThread)((ICStackFrame)context).getThread();
|
||||
try {
|
||||
// Get the topmost stack frame. Note that the state of the
|
||||
|
@ -128,12 +129,11 @@ public class DisassemblyBackendCdi implements IDisassemblyBackend, IDebugEventSe
|
|||
// CDI frame levels are ordered opposite of DSF. Frame 0 is the
|
||||
// root frame of the thread where in DSF it's the topmost frame
|
||||
// (where the PC is). Do a little math to flip reverse the value
|
||||
result.frameLevel = ((CStackFrame)topFrame).getLevel() - fTargetFrameContext.getLevel();
|
||||
fFrameLevel = ((CStackFrame)topFrame).getLevel() - fTargetFrameContext.getLevel();
|
||||
}
|
||||
} catch (DebugException e) {
|
||||
}
|
||||
}
|
||||
fFrameLevel = result.frameLevel;
|
||||
|
||||
if (fTargetContext != null) {
|
||||
result.sessionId = fCdiSessionId = cdiSessionId;
|
||||
|
@ -142,6 +142,7 @@ public class DisassemblyBackendCdi implements IDisassemblyBackend, IDebugEventSe
|
|||
}
|
||||
else if (context instanceof ICStackFrame) {
|
||||
fTargetFrameContext = null;
|
||||
fFrameLevel = 0;
|
||||
ICThread newTargetContext = (ICThread)((ICStackFrame)context).getThread();
|
||||
ICThread oldTargetContext = fTargetContext;
|
||||
fTargetContext = newTargetContext;
|
||||
|
@ -159,13 +160,12 @@ public class DisassemblyBackendCdi implements IDisassemblyBackend, IDebugEventSe
|
|||
// CDI frame levels are ordered opposite of DSF. Frame 0 is the
|
||||
// root frame of the thread where in DSF it's the topmost frame
|
||||
// (where the PC is). Do a little math to flip reverse the value
|
||||
result.frameLevel = ((CStackFrame)topFrame).getLevel() - fTargetFrameContext.getLevel();
|
||||
fFrameLevel = ((CStackFrame)topFrame).getLevel() - fTargetFrameContext.getLevel();
|
||||
}
|
||||
} catch (DebugException e) {
|
||||
}
|
||||
fFrameLevel = result.frameLevel;
|
||||
if (!result.contextChanged) {
|
||||
fCallback.gotoFrame(result.frameLevel);
|
||||
fCallback.gotoFrame(fFrameLevel);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,12 +34,6 @@ public interface IDisassemblyBackend {
|
|||
*/
|
||||
public String sessionId;
|
||||
|
||||
/**
|
||||
* The frame represented by the context. 0 is the topmost frame (where
|
||||
* the PC is)
|
||||
*/
|
||||
public int frameLevel;
|
||||
|
||||
/**
|
||||
* Whether the context changed to another execution context (the parent
|
||||
* elements of a thread, typically a process)
|
||||
|
|
|
@ -137,7 +137,6 @@ public class DisassemblyBackendDsf implements IDisassemblyBackend, SessionEndedL
|
|||
if (executionContext != null) {
|
||||
fTargetContext= executionContext;
|
||||
fTargetFrameContext= frame;
|
||||
result.frameLevel = frame.getLevel();
|
||||
}
|
||||
}
|
||||
if (fTargetContext != null) {
|
||||
|
@ -192,7 +191,6 @@ public class DisassemblyBackendDsf implements IDisassemblyBackend, SessionEndedL
|
|||
if (!result.contextChanged) {
|
||||
fCallback.gotoFrameIfActive(frame.getLevel());
|
||||
}
|
||||
result.frameLevel = getFrameLevel();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue