From 1049c9c959da6c36119b14f6d55d2b0886202322 Mon Sep 17 00:00:00 2001 From: mrexodia Date: Mon, 23 May 2016 04:38:17 +0200 Subject: [PATCH] DBG: dynamic comments (works like logging breakpoints format string) --- src/dbg/_exports.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dbg/_exports.cpp b/src/dbg/_exports.cpp index fb6d07c8..60e128b1 100644 --- a/src/dbg/_exports.cpp +++ b/src/dbg/_exports.cpp @@ -28,6 +28,7 @@ #include "error.h" #include "x64_dbg.h" #include "threading.h" +#include "stringformat.h" static bool bOnlyCipAutoComments = false; @@ -205,7 +206,14 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDR { *addrinfo->comment = 0; if(CommentGet(addr, addrinfo->comment)) + { + if(strstr(addrinfo->comment, "{")) //comment with format string + { + auto formatted = stringformatinline(addrinfo->comment); + strcpy_s(addrinfo->comment, _TRUNCATE, formatted.c_str()); + } retval = true; + } else { DWORD dwDisplacement;