diff --git a/src/dbg/TraceRecord.cpp b/src/dbg/TraceRecord.cpp index 59e59ffa..3f48a9b4 100644 --- a/src/dbg/TraceRecord.cpp +++ b/src/dbg/TraceRecord.cpp @@ -299,7 +299,7 @@ void TraceRecordManager::saveToDb(JSON root) json_array_append_new(jsonTraceRecords, jsonObj); } if(json_array_size(jsonTraceRecords)) - json_object_set_new(root, "tracerecord", jsonTraceRecords); + json_object_set(root, "tracerecord", jsonTraceRecords); // Notify garbage collector json_decref(jsonTraceRecords); diff --git a/src/gui/Src/Gui/CPUSideBar.cpp b/src/gui/Src/Gui/CPUSideBar.cpp index 722da5d3..3836ab5f 100644 --- a/src/gui/Src/Gui/CPUSideBar.cpp +++ b/src/gui/Src/Gui/CPUSideBar.cpp @@ -226,8 +226,8 @@ void CPUSideBar::paintEvent(QPaintEvent* event) duint destVA = DbgGetBranchDestination(baseAddr + instr.rva); // Do not try to draw EBFE (Jump to the same line) - if(destVA == instrVA) - continue; + //if(destVA == instrVA) + // continue; // Do not draw jumps that leave the memory range if(destVA >= mDisas->getBase() + mDisas->getSize() || destVA < mDisas->getBase()) @@ -457,8 +457,15 @@ void CPUSideBar::drawJump(QPainter* painter, int startLine, int endLine, int jum const int JumpPadding = 11; int x = viewportWidth - jumpoffset * JumpPadding - 15 - fontHeight; int x_right = viewportWidth - 12; - const int y_start = fontHeight * (1 + startLine) - 0.5 * fontHeight - pixel_y_offs; - const int y_end = fontHeight * (1 + endLine) - 0.5 * fontHeight; + int y_start = fontHeight * (1 + startLine) - 0.5 * fontHeight - pixel_y_offs; + int y_end = fontHeight * (1 + endLine) - 0.5 * fontHeight; + + // special handling of self-jumping + if(startLine == endLine) + { + y_start -= fontHeight / 4; + y_end += fontHeight / 4; + } // Horizontal (<----) if(!isFoldingGraphicsPresent(startLine) != 0)