mirror of
https://github.com/x64dbg/x64dbg.git
synced 2024-11-23 13:00:14 +00:00
DBG: fixed some interface 'bugs'
This commit is contained in:
parent
ee899f85c1
commit
77afb0222e
@ -274,9 +274,9 @@ void disasmprint(uint addr)
|
||||
DISASM_INSTR instr;
|
||||
memset(&instr, 0, sizeof(instr));
|
||||
disasmget(addr, &instr);
|
||||
printf(">%d:\"%s\":\n", instr.type, instr.instruction);
|
||||
dprintf(">%d:\"%s\":\n", instr.type, instr.instruction);
|
||||
for(int i=0; i<instr.argcount; i++)
|
||||
printf(" %d:%d:%"fext"X:%"fext"X:%"fext"X\n", i, instr.arg[i].type, instr.arg[i].constant, instr.arg[i].value, instr.arg[i].memvalue);
|
||||
dprintf(" %d:%d:%"fext"X:%"fext"X:%"fext"X\n", i, instr.arg[i].type, instr.arg[i].constant, instr.arg[i].value, instr.arg[i].memvalue);
|
||||
}
|
||||
|
||||
static bool isasciistring(const unsigned char* data, int maxlen)
|
||||
|
@ -1188,21 +1188,21 @@ CMDRESULT cbInstrModCallFind(int argc, char* argv[])
|
||||
|
||||
CMDRESULT cbInstrCommentList(int argc, char* argv[])
|
||||
{
|
||||
size_t cbsize;
|
||||
commentenum(0, &cbsize);
|
||||
if(!cbsize)
|
||||
{
|
||||
puts("no comments");
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
COMMENTSINFO* comments=(COMMENTSINFO*)emalloc(cbsize, "cbInstrCommentList:comments");
|
||||
commentenum(comments, 0);
|
||||
//setup reference view
|
||||
GuiReferenceDeleteAllColumns();
|
||||
GuiReferenceAddColumn(2*sizeof(uint), "Address");
|
||||
GuiReferenceAddColumn(64, "Disassembly");
|
||||
GuiReferenceAddColumn(0, "Comment");
|
||||
GuiReferenceReloadData();
|
||||
size_t cbsize;
|
||||
commentenum(0, &cbsize);
|
||||
if(!cbsize)
|
||||
{
|
||||
dputs("no comments");
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
COMMENTSINFO* comments=(COMMENTSINFO*)emalloc(cbsize, "cbInstrCommentList:comments");
|
||||
commentenum(comments, 0);
|
||||
int count=(int)(cbsize/sizeof(COMMENTSINFO));
|
||||
for(int i=0; i<count; i++)
|
||||
{
|
||||
@ -1224,21 +1224,21 @@ CMDRESULT cbInstrCommentList(int argc, char* argv[])
|
||||
|
||||
CMDRESULT cbInstrLabelList(int argc, char* argv[])
|
||||
{
|
||||
size_t cbsize;
|
||||
labelenum(0, &cbsize);
|
||||
if(!cbsize)
|
||||
{
|
||||
puts("no labels");
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
LABELSINFO* labels=(LABELSINFO*)emalloc(cbsize, "cbInstrLabelList:labels");
|
||||
labelenum(labels, 0);
|
||||
//setup reference view
|
||||
GuiReferenceDeleteAllColumns();
|
||||
GuiReferenceAddColumn(2*sizeof(uint), "Address");
|
||||
GuiReferenceAddColumn(64, "Disassembly");
|
||||
GuiReferenceAddColumn(0, "Label");
|
||||
GuiReferenceReloadData();
|
||||
size_t cbsize;
|
||||
labelenum(0, &cbsize);
|
||||
if(!cbsize)
|
||||
{
|
||||
dputs("no labels");
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
LABELSINFO* labels=(LABELSINFO*)emalloc(cbsize, "cbInstrLabelList:labels");
|
||||
labelenum(labels, 0);
|
||||
int count=(int)(cbsize/sizeof(LABELSINFO));
|
||||
for(int i=0; i<count; i++)
|
||||
{
|
||||
@ -1260,20 +1260,20 @@ CMDRESULT cbInstrLabelList(int argc, char* argv[])
|
||||
|
||||
CMDRESULT cbInstrBookmarkList(int argc, char* argv[])
|
||||
{
|
||||
size_t cbsize;
|
||||
bookmarkenum(0, &cbsize);
|
||||
if(!cbsize)
|
||||
{
|
||||
puts("no bookmarks");
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
BOOKMARKSINFO* bookmarks=(BOOKMARKSINFO*)emalloc(cbsize, "cbInstrBookmarkList:bookmarks");
|
||||
bookmarkenum(bookmarks, 0);
|
||||
//setup reference view
|
||||
GuiReferenceDeleteAllColumns();
|
||||
GuiReferenceAddColumn(2*sizeof(uint), "Address");
|
||||
GuiReferenceAddColumn(0, "Disassembly");
|
||||
GuiReferenceReloadData();
|
||||
size_t cbsize;
|
||||
bookmarkenum(0, &cbsize);
|
||||
if(!cbsize)
|
||||
{
|
||||
dputs("no bookmarks");
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
BOOKMARKSINFO* bookmarks=(BOOKMARKSINFO*)emalloc(cbsize, "cbInstrBookmarkList:bookmarks");
|
||||
bookmarkenum(bookmarks, 0);
|
||||
int count=(int)(cbsize/sizeof(BOOKMARKSINFO));
|
||||
for(int i=0; i<count; i++)
|
||||
{
|
||||
@ -1294,15 +1294,6 @@ CMDRESULT cbInstrBookmarkList(int argc, char* argv[])
|
||||
|
||||
CMDRESULT cbInstrFunctionList(int argc, char* argv[])
|
||||
{
|
||||
size_t cbsize;
|
||||
functionenum(0, &cbsize);
|
||||
if(!cbsize)
|
||||
{
|
||||
puts("no functions");
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
FUNCTIONSINFO* functions=(FUNCTIONSINFO*)emalloc(cbsize, "cbInstrFunctionList:functions");
|
||||
functionenum(functions, 0);
|
||||
//setup reference view
|
||||
GuiReferenceDeleteAllColumns();
|
||||
GuiReferenceAddColumn(2*sizeof(uint), "Start");
|
||||
@ -1310,6 +1301,15 @@ CMDRESULT cbInstrFunctionList(int argc, char* argv[])
|
||||
GuiReferenceAddColumn(64, "Disassembly (Start)");
|
||||
GuiReferenceAddColumn(0, "Label/Comment");
|
||||
GuiReferenceReloadData();
|
||||
size_t cbsize;
|
||||
functionenum(0, &cbsize);
|
||||
if(!cbsize)
|
||||
{
|
||||
dputs("no functions");
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
FUNCTIONSINFO* functions=(FUNCTIONSINFO*)emalloc(cbsize, "cbInstrFunctionList:functions");
|
||||
functionenum(functions, 0);
|
||||
int count=(int)(cbsize/sizeof(FUNCTIONSINFO));
|
||||
for(int i=0; i<count; i++)
|
||||
{
|
||||
@ -1341,15 +1341,6 @@ CMDRESULT cbInstrFunctionList(int argc, char* argv[])
|
||||
|
||||
CMDRESULT cbInstrLoopList(int argc, char* argv[])
|
||||
{
|
||||
size_t cbsize;
|
||||
loopenum(0, &cbsize);
|
||||
if(!cbsize)
|
||||
{
|
||||
puts("no loops");
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
LOOPSINFO* loops=(LOOPSINFO*)emalloc(cbsize, "cbInstrLoopList:loops");
|
||||
loopenum(loops, 0);
|
||||
//setup reference view
|
||||
GuiReferenceDeleteAllColumns();
|
||||
GuiReferenceAddColumn(2*sizeof(uint), "Start");
|
||||
@ -1357,6 +1348,15 @@ CMDRESULT cbInstrLoopList(int argc, char* argv[])
|
||||
GuiReferenceAddColumn(64, "Disassembly (Start)");
|
||||
GuiReferenceAddColumn(0, "Label/Comment");
|
||||
GuiReferenceReloadData();
|
||||
size_t cbsize;
|
||||
loopenum(0, &cbsize);
|
||||
if(!cbsize)
|
||||
{
|
||||
dputs("no loops");
|
||||
return STATUS_CONTINUE;
|
||||
}
|
||||
LOOPSINFO* loops=(LOOPSINFO*)emalloc(cbsize, "cbInstrLoopList:loops");
|
||||
loopenum(loops, 0);
|
||||
int count=(int)(cbsize/sizeof(LOOPSINFO));
|
||||
for(int i=0; i<count; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user