Skip to content

Commit c664ad1

Browse files
committed
DBG: add dis.iscallsystem expression function
1 parent 2cbafa3 commit c664ad1

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

src/dbg/expressionfunctions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ void ExpressionFunctions::Init()
103103
RegisterEasy("dis.brfalse", disbrfalse);
104104
RegisterEasy("dis.next", disnext);
105105
RegisterEasy("dis.prev", disprev);
106+
RegisterEasy("dis.iscallsystem", disiscallsystem);
106107

107108
//Trace record
108109
RegisterEasy("tr.enabled", trenabled);

src/dbg/exprfunc.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,12 @@ namespace Exprfunc
284284
return readStart + disasmback(disasmData, 0, sizeof(disasmData), addr - readStart, 1);
285285
}
286286

287+
duint disiscallsystem(duint addr)
288+
{
289+
duint dest = disbranchdest(addr);
290+
return dest && (modsystem(dest) || modsystem(disbranchdest(dest)));
291+
}
292+
287293
duint trenabled(duint addr)
288294
{
289295
return TraceRecord.getTraceRecordType(addr) != TraceRecordManager::TraceRecordNone;

src/dbg/exprfunc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ namespace Exprfunc
4747
duint disbrfalse(duint addr);
4848
duint disnext(duint addr);
4949
duint disprev(duint addr);
50+
duint disiscallsystem(duint addr);
5051

5152
duint trenabled(duint addr);
5253
duint trhitcount(duint addr);

0 commit comments

Comments
 (0)