Skip to content

Commit a960f62

Browse files
committed
Merge pull request x64dbg#667 from blaquee/mod_ref_modname
Add Module name to Intermodule call list in GUI. Addresses issue x64dbg#649
2 parents 60f2537 + 0f37eaa commit a960f62

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/bridge/bridgemain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ BRIDGE_IMPEXP bool DbgGetLabelAt(duint addr, SEGMENTREG segment, char* text) //(
316316
return false;
317317
ADDRINFO info;
318318
memset(&info, 0, sizeof(info));
319-
info.flags = flaglabel;
319+
info.flags = flaglabel | flagmodule;
320320
if(!_dbg_addrinfoget(addr, segment, &info))
321321
{
322322
duint addr_ = 0;
@@ -326,7 +326,7 @@ BRIDGE_IMPEXP bool DbgGetLabelAt(duint addr, SEGMENTREG segment, char* text) //(
326326
ADDRINFO ptrinfo = info;
327327
if(!_dbg_addrinfoget(addr_, SEG_DEFAULT, &ptrinfo))
328328
return false;
329-
sprintf_s(info.label, "&%s", ptrinfo.label);
329+
sprintf_s(info.label, "%s.%s", ptrinfo.module, ptrinfo.label);
330330
}
331331
strcpy_s(text, MAX_LABEL_SIZE, info.label);
332332
return true;

src/dbg/instruction.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,15 +1386,16 @@ static bool cbModCallFind(Capstone* disasm, BASIC_INSTRUCTION_INFO* basicinfo, R
13861386
{
13871387
GuiReferenceInitialize(refinfo->name);
13881388
GuiReferenceAddColumn(2 * sizeof(duint), "Address");
1389-
GuiReferenceAddColumn(0, "Disassembly");
1389+
GuiReferenceAddColumn(20, "Disassembly");
1390+
GuiReferenceAddColumn(MAX_LABEL_SIZE, "Destination");
13901391
GuiReferenceReloadData();
13911392
return true;
13921393
}
13931394
bool found = false;
1395+
char label[MAX_LABEL_SIZE] = "";
13941396
if(basicinfo->call) //we are looking for calls
13951397
{
13961398
duint ptr = basicinfo->addr > 0 ? basicinfo->addr : basicinfo->memory.value;
1397-
char label[MAX_LABEL_SIZE] = "";
13981399
found = DbgGetLabelAt(ptr, SEG_DEFAULT, label) && !LabelGet(ptr, label); //a non-user label
13991400
}
14001401
if(found)
@@ -1404,10 +1405,16 @@ static bool cbModCallFind(Capstone* disasm, BASIC_INSTRUCTION_INFO* basicinfo, R
14041405
GuiReferenceSetRowCount(refinfo->refcount + 1);
14051406
GuiReferenceSetCellContent(refinfo->refcount, 0, addrText);
14061407
char disassembly[GUI_MAX_DISASSEMBLY_SIZE] = "";
1407-
if(GuiGetDisassembly((duint)disasm->Address(), disassembly))
1408+
if (GuiGetDisassembly((duint)disasm->Address(), disassembly))
1409+
{
14081410
GuiReferenceSetCellContent(refinfo->refcount, 1, disassembly);
1411+
GuiReferenceSetCellContent(refinfo->refcount, 2, label);
1412+
}
14091413
else
1414+
{
14101415
GuiReferenceSetCellContent(refinfo->refcount, 1, disasm->InstructionText().c_str());
1416+
GuiReferenceSetCellContent(refinfo->refcount, 2, label);
1417+
}
14111418
}
14121419
return found;
14131420
}

0 commit comments

Comments
 (0)