Skip to content

Commit 9f3da84

Browse files
blaqueemrexodia
authored andcommitted
fix for issue 673 (x64dbg#674)
1 parent 57c3279 commit 9f3da84

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/bridge/bridgemain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ BRIDGE_IMPEXP bool DbgGetLabelAt(duint addr, SEGMENTREG segment, char* text) //(
320320
return false;
321321
ADDRINFO info;
322322
memset(&info, 0, sizeof(info));
323-
info.flags = flaglabel | flagmodule;
323+
info.flags = flaglabel;
324324
if(!_dbg_addrinfoget(addr, segment, &info))
325325
{
326326
duint addr_ = 0;
@@ -330,7 +330,7 @@ BRIDGE_IMPEXP bool DbgGetLabelAt(duint addr, SEGMENTREG segment, char* text) //(
330330
ADDRINFO ptrinfo = info;
331331
if(!_dbg_addrinfoget(addr_, SEG_DEFAULT, &ptrinfo))
332332
return false;
333-
sprintf_s(info.label, "%s.%s", ptrinfo.module, ptrinfo.label);
333+
sprintf_s(info.label, "&%s", ptrinfo.label);
334334
}
335335
strcpy_s(text, MAX_LABEL_SIZE, info.label);
336336
return true;

src/dbg/instruction.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,27 +1393,30 @@ static bool cbModCallFind(Capstone* disasm, BASIC_INSTRUCTION_INFO* basicinfo, R
13931393
}
13941394
bool found = false;
13951395
char label[MAX_LABEL_SIZE] = "";
1396+
char module[MAX_MODULE_SIZE] = "";
13961397
if(basicinfo->call) //we are looking for calls
13971398
{
13981399
duint ptr = basicinfo->addr > 0 ? basicinfo->addr : basicinfo->memory.value;
1399-
found = DbgGetLabelAt(ptr, SEG_DEFAULT, label) && !LabelGet(ptr, label); //a non-user label
1400+
found = DbgGetLabelAt(ptr, SEG_DEFAULT, label) && !LabelGet(ptr, label) && DbgGetModuleAt(ptr, module); //a non-user label
14001401
}
14011402
if(found)
14021403
{
14031404
char addrText[20] = "";
1405+
char moduleTargetText[256] = "";
14041406
sprintf(addrText, "%p", disasm->Address());
1407+
sprintf(moduleTargetText, "%s.%s", module, label);
14051408
GuiReferenceSetRowCount(refinfo->refcount + 1);
14061409
GuiReferenceSetCellContent(refinfo->refcount, 0, addrText);
14071410
char disassembly[GUI_MAX_DISASSEMBLY_SIZE] = "";
14081411
if(GuiGetDisassembly((duint)disasm->Address(), disassembly))
14091412
{
14101413
GuiReferenceSetCellContent(refinfo->refcount, 1, disassembly);
1411-
GuiReferenceSetCellContent(refinfo->refcount, 2, label);
1414+
GuiReferenceSetCellContent(refinfo->refcount, 2, moduleTargetText);
14121415
}
14131416
else
14141417
{
14151418
GuiReferenceSetCellContent(refinfo->refcount, 1, disasm->InstructionText().c_str());
1416-
GuiReferenceSetCellContent(refinfo->refcount, 2, label);
1419+
GuiReferenceSetCellContent(refinfo->refcount, 2, moduleTargetText);
14171420
}
14181421
}
14191422
return found;

0 commit comments

Comments
 (0)