From 53389556868262f0adf68eb4bcbba8c8bfbda195 Mon Sep 17 00:00:00 2001 From: "Mr. eXoDia" Date: Wed, 25 Jun 2014 23:35:47 +0200 Subject: [PATCH] DBG: various commands to dump database info to reference view --- x64_dbg_dbg/instruction.cpp | 195 ++++++++++++++++++++++++++++++++++++ x64_dbg_dbg/instruction.h | 5 + x64_dbg_dbg/x64_dbg.cpp | 5 + 3 files changed, 205 insertions(+) diff --git a/x64_dbg_dbg/instruction.cpp b/x64_dbg_dbg/instruction.cpp index 9d86dc37..14480eed 100644 --- a/x64_dbg_dbg/instruction.cpp +++ b/x64_dbg_dbg/instruction.cpp @@ -1029,3 +1029,198 @@ CMDRESULT cbInstrModCallFind(int argc, char* argv[]) varset("$result", found, false); return STATUS_CONTINUE; } + +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(); + int count=cbsize/sizeof(COMMENTSINFO); + for(int i=0; i