Search in sources :

Example 1 with Frame

use of jadx.gui.device.debugger.SmaliDebugger.Frame in project jadx by skylot.

the class DebugController method updateAllStackFrames.

private FrameNode updateAllStackFrames(long threadID) {
    List<SmaliDebugger.Frame> frames = Collections.emptyList();
    try {
        frames = debugger.getFramesSync(threadID);
    } catch (SmaliDebuggerException e) {
        logErr(e);
    }
    if (frames.size() == 0) {
        return null;
    }
    List<FrameNode> frameEleList = new ArrayList<>(frames.size());
    for (SmaliDebugger.Frame frame : frames) {
        FrameNode ele = new FrameNode(threadID, frame);
        frameEleList.add(ele);
    }
    FrameNode curEle = frameEleList.get(0);
    fetchStackFrameNames(curEle);
    debuggerPanel.refreshStackFrameList(frameEleList);
    lazyQueue.execute(() -> {
        // get class & method names for frames
        for (int i = 1; i < frameEleList.size(); i++) {
            fetchStackFrameNames(frameEleList.get(i));
        }
        debuggerPanel.refreshStackFrameList(Collections.emptyList());
    });
    return frameEleList.get(0);
}
Also used : Frame(jadx.gui.device.debugger.SmaliDebugger.Frame) SmaliDebuggerException(jadx.gui.device.debugger.SmaliDebugger.SmaliDebuggerException) Frame(jadx.gui.device.debugger.SmaliDebugger.Frame) ArrayList(java.util.ArrayList) RuntimeBreakpoint(jadx.gui.device.debugger.SmaliDebugger.RuntimeBreakpoint) FileBreakpoint(jadx.gui.device.debugger.BreakpointManager.FileBreakpoint)

Example 2 with Frame

use of jadx.gui.device.debugger.SmaliDebugger.Frame in project jadx by skylot.

the class DebugController method refreshCurFrame.

private void refreshCurFrame(long threadID, long codeOffset) {
    try {
        Frame frame = debugger.getCurrentFrame(threadID);
        cur.frame.setFrame(frame);
        cur.frame.updateCodeOffset(codeOffset);
    } catch (SmaliDebuggerException e) {
        logErr(e);
    }
}
Also used : Frame(jadx.gui.device.debugger.SmaliDebugger.Frame) SmaliDebuggerException(jadx.gui.device.debugger.SmaliDebugger.SmaliDebuggerException)

Aggregations

Frame (jadx.gui.device.debugger.SmaliDebugger.Frame)2 SmaliDebuggerException (jadx.gui.device.debugger.SmaliDebugger.SmaliDebuggerException)2 FileBreakpoint (jadx.gui.device.debugger.BreakpointManager.FileBreakpoint)1 RuntimeBreakpoint (jadx.gui.device.debugger.SmaliDebugger.RuntimeBreakpoint)1 ArrayList (java.util.ArrayList)1