DBG: fixed a few plugin callback bugs

PROJECT: updated help
This commit is contained in:
Mr. eXoDia 2014-04-23 01:21:47 +02:00
parent b7b4fb2969
commit a8488322da
16 changed files with 460 additions and 120 deletions

View File

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Callbacks</title>
<title>Callback Structures</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
@ -15,68 +15,105 @@ html,body {
</head>
<body>
<P><STRONG>Callbacks<BR></STRONG> These&nbsp;structures are used inside event
<P><STRONG>Callback structures<BR></STRONG>These&nbsp;structures are used inside event
callbacks (registered using _plugin_registercallback). Notice that the pointer
'void* callbackInfo' is never NULL, but the
members of the various structures can be NULL.</P>
<P>struct
<STRONG>PLUG_CB_INITDEBUG</STRONG><BR>{<BR>&nbsp;&nbsp;&nbsp; <STRONG>const char*</STRONG>
'void* callbackInfo' is never NULL, but the members of the various structures
can be NULL. Also remember that <U>you cannot use any of the provided pointers
out of the callback function scope</U>. In general
<U>
<STRONG>AVOID</STRONG> time-consuming operations inside
callbacks</U> , do these in
separate
threads.</P>
<P>//Called on debug initialization, useful to initialize
some variables.<BR>struct <STRONG>PLUG_CB_INITDEBUG</STRONG>
<BR>{<BR>&nbsp;&nbsp;&nbsp; <STRONG>const char*</STRONG>
szFileName;<BR>};</P>
<P>struct
<STRONG>PLUG_CB_STOPDEBUG<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called when the debugging has been stopped, useful to
reset some variables.<BR>struct <STRONG>PLUG_CB_STOPDEBUG</STRONG>
<BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>void*</STRONG>
reserved;<BR>};</P>
<P>struct
<STRONG>PLUG_CB_CREATEPROCESS<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called after process creation (in the debug loop),
after the initialization of the symbol handler, the database file and setting
breakpoints on TLS callbacks / the entry breakpoint.<BR>struct <STRONG>PLUG_CB_CREATEPROCESS <BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>CREATE_PROCESS_DEBUG_INFO*</STRONG>
CreateProcessInfo;<BR>&nbsp;&nbsp;&nbsp; <STRONG>IMAGEHLP_MODULE64*</STRONG>
modInfo;<BR>&nbsp;&nbsp;&nbsp; <STRONG>const char*</STRONG>
DebugFileName;<BR>&nbsp;&nbsp;&nbsp;
<STRONG>PROCESS_INFORMATION*</STRONG>
fdProcessInfo;<BR>};</P>
<P>struct
<STRONG>PLUG_CB_EXITPROCESS</STRONG><BR>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called after the process exits (in the debug loop),
before the symbol handler is cleaned up.<BR>struct <STRONG>PLUG_CB_EXITPROCESS</STRONG> <BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>EXIT_PROCESS_DEBUG_INFO*</STRONG>
ExitProcess;<BR>};</P>
<P>struct
<STRONG>PLUG_CB_CREATETHREAD<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called after thread creation (in the debug loop),
after adding the thread to the internal thread list, before breaking the
debugger on thread creation and&nbsp;after setting breakpoints on the thread
entry.<BR>struct <STRONG>PLUG_CB_CREATETHREAD<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>CREATE_THREAD_DEBUG_INFO*</STRONG>
CreateThread;<BR>&nbsp;&nbsp;&nbsp; <STRONG>DWORD</STRONG>
dwThreadId;<BR>};</P>
<P>struct <STRONG> PLUG_CB_EXITTHREAD<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp; <STRONG>EXIT_THREAD_DEBUG_INFO*</STRONG>
<P>//Called after thread termination (in the debug loop),
before the thread is removed from the internal thread list, before breaking on
thread termination.<BR>struct <STRONG>PLUG_CB_EXITTHREAD</STRONG> <BR>{<BR>&nbsp;&nbsp;&nbsp; <STRONG>EXIT_THREAD_DEBUG_INFO*</STRONG>
ExitThread;<BR>&nbsp;&nbsp;&nbsp; <STRONG>DWORD</STRONG>
dwThreadId;<BR>};</P>
<P>struct <STRONG>
PLUG_CB_SYSTEMBREAKPOINT<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called at the system breakpoint (in the debug loop),
after setting the initial dump location, before breaking the debugger on the
system breakpoint.<BR>struct <STRONG>PLUG_CB_SYSTEMBREAKPOINT</STRONG>
<BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>void*</STRONG> reserved;<BR>};</P>
<P>struct <STRONG> PLUG_CB_LOADDLL<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called on DLL loading (in the debug loop), after the
DLL has been added to the internal library list, after setting the DLL entry
breakpoint.<BR>struct <STRONG>PLUG_CB_LOADDLL</STRONG> <BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>LOAD_DLL_DEBUG_INFO*</STRONG>
LoadDll;<BR>&nbsp;&nbsp;&nbsp; <STRONG>IMAGEHLP_MODULE64*</STRONG>
modInfo;<BR>&nbsp;&nbsp;&nbsp; <STRONG>const char*</STRONG> modname;<BR>};</P>
<P>struct <STRONG> PLUG_CB_UNLOADDLL<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called on DLL unloading (in the debug loop), before
removing the DLL from the internal library list, before breaking on DLL
unloading.<BR>struct <STRONG>PLUG_CB_UNLOADDLL</STRONG> <BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>UNLOAD_DLL_DEBUG_INFO*</STRONG>
UnloadDll;<BR>};</P>
<P>struct <STRONG>
PLUG_CB_OUTPUTDEBUGSTRING<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called on a DebugString event (in the debug loop),
before dumping the string to the log, before breaking on a debug
string.<BR>struct <STRONG>PLUG_CB_OUTPUTDEBUGSTRING</STRONG>
<BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>OUTPUT_DEBUG_STRING_INFO*</STRONG>
DebugString;<BR>};</P>
<P>struct <STRONG> PLUG_CB_EXCEPTION<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called on an unhandled (by the debugger) exception (in
the debug loop), after setting the continue status, after locking the debugger
to pause.<BR>struct <STRONG>PLUG_CB_EXCEPTION</STRONG> <BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>EXCEPTION_DEBUG_INFO*</STRONG>
Exception;<BR>};</P>
<P>struct <STRONG> PLUG_CB_BREAKPOINT<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp; <STRONG>BRIDGEBP*</STRONG>
<P>//Called on a normal/memory/hardware breakpoint (in the
debug loop), after locking the debugger to pause.<BR>struct <STRONG>PLUG_CB_BREAKPOINT</STRONG> <BR>{<BR>&nbsp;&nbsp;&nbsp; <STRONG>BRIDGEBP*</STRONG>
breakpoint;<BR>};</P>
<P>struct <STRONG> PLUG_CB_PAUSEDEBUG<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called after the debugger has been locked to pause (in
the debug loop), before any other callback that's before pausing the
debugger.<BR>struct <STRONG>PLUG_CB_PAUSEDEBUG</STRONG> <BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>void*</STRONG>
reserved;<BR>};</P>
<P>struct <STRONG> PLUG_CB_RESUMEDEBUG<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called after the debugger has been unlocked to resume
(outside of the debug loop).<BR>struct <STRONG>PLUG_CB_RESUMEDEBUG</STRONG> <BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>void*</STRONG>
reserved;<BR>};</P>
<P>struct <STRONG> PLUG_CB_STEPPED<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called after the debugger stepped (in the debug loop),
after locking the debugger to pause.<BR>struct <STRONG>PLUG_CB_STEPPED</STRONG> <BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>void*</STRONG>
reserved;<BR>};</P>
<P>struct
<STRONG>PLUG_CB_ATTACH<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<P>//Called before attaching to a process.<BR>struct <STRONG>PLUG_CB_ATTACH</STRONG><BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>DWORD</STRONG> dwProcessId;<BR>};</P>
<P>struct
<STRONG>PLUG_CB_DETACH<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>PROCESS_INFORMATION*</STRONG> fdProcessInfo;<BR>};</P></BODY></HTML>
<P>//Called before detaching from the process.<BR>struct <STRONG>PLUG_CB_DETACH</STRONG><BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>PROCESS_INFORMATION*</STRONG> fdProcessInfo;<BR>};</P>
<P>//Called on any debug event, even the ones that are
handled internally, <U><STRONG>AVOID</STRONG> doing stuff that takes time
here</U>, this will slow the debugger down a lot!<BR>struct <STRONG>PLUG_CB_DEBUGEVENT</STRONG> <BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>DEBUG_EVENT*</STRONG> DebugEvent;<BR>};</P>
<P>//Called when a menu entry created by the plugin has
been clicked, the GUI will resume when this callback returns.<BR>struct <STRONG>PLUG_CB_MENUENTRY</STRONG><BR>{<BR>&nbsp;&nbsp;&nbsp;
<STRONG>int</STRONG> hEntry;<BR>};</P></body></HTML>

View File

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>pluginit</title>
<title>PLUG_INITSTRUCT</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
@ -20,14 +20,14 @@ export in the plugin
interface:</P>
<P>struct
<STRONG>PLUG_INITSTRUCT<BR></STRONG>{<BR>&nbsp;&nbsp;&nbsp; <EM>//data provided
by the debugger to the plugin</EM><BR>&nbsp;&nbsp;&nbsp; [IN]
by the debugger to the plugin.</EM><BR>&nbsp;&nbsp;&nbsp; [IN]
<STRONG>int</STRONG> pluginHandle; //handle of the plugin<BR>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;<EM>//data provided by the plugin
to the debugger (required)</EM><BR>&nbsp;&nbsp;&nbsp; [OUT]
to the debugger (required).</EM><BR>&nbsp;&nbsp;&nbsp; [OUT]
<STRONG>int</STRONG> sdkVersion; //plugin SDK version,&nbsp;use the
PLUG_SDKVERSION define for this<BR>&nbsp;&nbsp;&nbsp; [OUT]
<STRONG>int</STRONG> pluginVersion; //plugin version,
useful for crash reports<BR>&nbsp;&nbsp;&nbsp; [OUT]
<STRONG>char</STRONG> pluginName[256]; //plugin name, also
useful for crash reports<BR>
};</P></body>
};</P></body>

28
help/PLUG_SETUPSTRUCT.htm Normal file
View File

@ -0,0 +1,28 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>PLUG_SETUPSTRUCT</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
html,body {
/* Default Font */
font-family: Courier New;
font-size: 11pt;
}
</style>
</head>
<body>
<P><STRONG>plugsetup</STRONG><BR>This structure is used by the function that allows the
creation of plugin menu entries:</P>
<P>
struct <STRONG>PLUG_SETUPSTRUCT</STRONG>
<BR>{<BR>&nbsp;&nbsp;&nbsp; <EM>//data provided by the debugger to
the plugin.</EM>
<BR>&nbsp;&nbsp;&nbsp; [IN] <STRONG>HWND</STRONG> hwndDlg; //GUI window
handle<BR>&nbsp;&nbsp;&nbsp; [IN]
<STRONG>int</STRONG> hMenu; //plugin menu
handle<BR>
};</P></head>

View File

@ -15,5 +15,6 @@ html,body {
</head>
<body>
<P><STRONG>Scripting</STRONG><BR>This sections provides an overview of automating tasks with x64_dbg using
scripts.</P></body>
<P><STRONG>Scripting</STRONG><BR>This sections provides an overview of automating tasks with
x64_dbg using scripts. See Commands for a description of all possible script commands. See Introduction for an introduction to
expressions.</P></body>

View File

@ -48,7 +48,9 @@ Rogers </DIV>
target=_blank>Tuts4You community</A>
</DIV>
<LI>
<DIV>DMichael&nbsp;&nbsp; </DIV>
<DIV>DMichael </DIV>
<LI>
<DIV>TEAM DVT </DIV>
<LI>
<DIV>Sorry if I forgot
you! </DIV></LI></UL></body>
you! </DIV></LI></UL></head>

29
help/The_basics.htm Normal file
View File

@ -0,0 +1,29 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>The basics</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
html,body {
/* Default Font */
font-family: Courier New;
font-size: 11pt;
}
</style>
</head>
<body>
<P><STRONG>The basics</STRONG><BR>This page covers the
basic principles of plugin development for x64_dbg.</P>
<P><STRONG>Exports</STRONG><BR>A plugin has at least one
export. This export must be called <U>pluginit</U>. See the PLUG_INITSTRUCT and
the plugin headers for
more information. The other valid exports are:</P>
<P><U>plugstop</U>: called when the plugin is about to be
unloaded. Remove all registered commands and
callbacks here. Also clean up plugin data.</P>
<P><U>plugsetup</U>: Called when the plugin initialization
was successful, here you
can register menus and other GUI-related things.</P></body>

View File

@ -15,11 +15,15 @@ html,body {
</head>
<body>
<P><STRONG>_plugin_debugpause<BR></STRONG>This function
returns debugger control to the user. You would use this function when you write
an unpacker that needs support from x64_dbg (for example in development).
Calling this function will set the debug state to 'paused' and it will not
return until the user runs the debuggee using the 'run' command.</P>
<P><STRONG>_plugin_debugpause<BR></STRONG>This function returns debugger control to the
user. You would use this function when you write an unpacker that needs support
from x64_dbg (for example in development). Calling this function will set the
debug state to 'paused' and <U>it will <STRONG>not</STRONG> return until the
user runs the debuggee using the 'run' command</U>
.</P>
<P><STRONG>void
_plugin_debugpause();</STRONG></P>
<P><STRONG>Parameters</STRONG> </P>
@ -29,4 +33,4 @@ _plugin_debugpause();</STRONG></P>
<BR >
This function does not return a value.
</P></body>
</P></body>

View File

@ -0,0 +1,32 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>_plugin_debugskipexceptions</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
html,body {
/* Default Font */
font-family: Courier New;
font-size: 11pt;
}
</style>
</head>
<body>
<P><STRONG>_plugin_debugskipexceptions<BR></STRONG>This function returns sets if the debugger should
skip first-chance exceptions. This is useful when creating unpackers or other
plugins that run the debuggee.</P>
<P><STRONG>void _plugin_debugskipexceptions(<BR>bool
</STRONG>skip //skip
flag<BR><STRONG>);</STRONG></P>
<P><STRONG>Parameters</STRONG> </P>
<P><U>skip</U>: Flag if we need to skip first-chance exceptions or not.</P>
<P>
<STRONG>
Return Values
</STRONG>
<BR>This function does not return a value.
</P></BODY></HTML>

29
help/_plugin_menuadd.htm Normal file
View File

@ -0,0 +1,29 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>_plugin_menuadd</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
html,body {
/* Default Font */
font-family: Courier New;
font-size: 11pt;
}
</style>
</head>
<body>
<P><STRONG>_plugin_menuadd<BR></STRONG>This function adds a new child menu to a menu.</P>
<P><STRONG>int&nbsp;_plugin_menuadd(<BR>int </STRONG>hMenu<STRONG>, </STRONG>//menu handle to add the
new child menu to<BR><STRONG>const char* </STRONG>title //child menu title<BR><STRONG>);</STRONG></P>
<P><STRONG>Parameters</STRONG> </P>
<P><U>hMenu</U>: Menu handle from a previously-added child menu or from
the main plugin menu.</P>
<P><U>title</U>
: Menu title.</P>
<P>
<STRONG>Return Values</STRONG>
<BR > Returns the child menu handle
(unique), -1 on failure.</P></BODY></HTML>

View File

@ -0,0 +1,35 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>_plugin_menuaddentry</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
html,body {
/* Default Font */
font-family: Courier New;
font-size: 11pt;
}
</style>
</head>
<body>
<P><STRONG>_plugin_menuaddentry<BR></STRONG>This function adds a menu entry to a menu.</P>
<P><STRONG>bool&nbsp;_plugin_menuaddentry(<BR>int
</STRONG>hMenu<STRONG>, </STRONG>//menu handle to add the new
child menu to<BR><STRONG>int</STRONG> hEntry, //plugin-wide identifier for the
menu entry<BR><STRONG>const char*
</STRONG>title //menu entry title<BR><STRONG>);</STRONG></P>
<P><STRONG>Parameters</STRONG> </P>
<P><U>hMenu</U>: Menu handle from a
previously-added child menu or from the main plugin menu.</P>
<P><U>hEntry</U>: A plugin-wide identifier for the menu
entry. This is the value you will get in the PLUG_CB_MENUENTRY callback
structure.</P>
<P><U>title</U> : Menu
entry&nbsp;title.</P>
<P><STRONG>Return Values</STRONG> <BR>Returns true when the entry was added without problems, false
otherwise.</P>
<P>&nbsp;</P></body>
</html>

View File

@ -0,0 +1,31 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>_plugin_menuaddseparator</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
html,body {
/* Default Font */
font-family: Courier New;
font-size: 11pt;
}
</style>
</head>
<body>
<P><STRONG>_plugin_menuaddseparator<BR></STRONG>This function adds a new child menu to a menu.</P>
<P><STRONG>bool&nbsp;</STRONG><STRONG>_plugin_menuaddseparator</STRONG><STRONG>(<BR>int </STRONG>hMenu<STRONG>
</STRONG>//menu handle to add the separator to
<BR>
<STRONG >
);</STRONG></P>
<P >
<STRONG>
Parameters</STRONG></P>
<P><U>hMenu</U>: Menu handle from a
previously-added child menu or from the main plugin menu.</P>
<P><STRONG>Return Values</STRONG> <BR>Returns true on success.</P></body>
</html>

View File

@ -0,0 +1,38 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>_plugin_menuclear</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
html,body {
/* Default Font */
font-family: Courier New;
font-size: 11pt;
}
</style>
</head>
<body>
<P><STRONG>_plugin_menuclear<BR></STRONG>This function removes all entries and child menus
from a menu. It will <STRONG>not </STRONG>remove the menu itself.</P>
<P>
<STRONG>
bool&nbsp;
</STRONG>
<STRONG>
_plugin_menuclear
</STRONG>
<STRONG>(
<BR > int</STRONG>hMenu
<STRONG ></STRONG>//menu handle&nbsp;of the menu to clear&nbsp;
<BR>
<STRONG>);</STRONG></P>
<P><STRONG>Parameters</STRONG></P>
<P><U>hMenu</U>: Menu handle from a
previously-added child menu or from the main plugin menu.</P>
<P><STRONG>Return Values</STRONG> <BR>Returns true on success.</P></body>
</html>

View File

@ -52,11 +52,12 @@ CB_BREAKPOINT,<BR>
&nbsp;&nbsp;&nbsp; CB_PAUSEDEBUG,
<BR>
&nbsp;&nbsp;&nbsp; CB_RESUMEDEBUG,<BR>&nbsp;&nbsp;&nbsp; CB_STEPPED,<BR>&nbsp;&nbsp;&nbsp;
CB_ATTACH,<BR> &nbsp;&nbsp;&nbsp;
CB_DETACH
CB_ATTACH,<BR>&nbsp;&nbsp;&nbsp; CB_DETACH,<BR>&nbsp;&nbsp;&nbsp;
CB_DEBUGEVENT,<BR> &nbsp;&nbsp;&nbsp;
CB_MENUENTRY&nbsp;
</P>
<P><STRONG>Return Values<BR></STRONG>This function returns
true when the callback was removed without problems.
</P></body></HTML>
</P></body>

View File

@ -96,7 +96,7 @@ Font=
DefaultTopic=Introduction.htm
[TOPICS]
TitleList=103
TitleList=110
TitleList.Title.0=Introduction
TitleList.Level.0=0
TitleList.Url.0=Introduction.htm
@ -145,7 +145,7 @@ TitleList.Status.4=0
TitleList.Keywords.4=
TitleList.ContextNumber.4=1003
TitleList.ApplyTemp.4=0
TitleList.Expanded.4=1
TitleList.Expanded.4=0
TitleList.Kind.4=0
TitleList.Title.5=Debug Control
TitleList.Level.5=1
@ -155,7 +155,7 @@ TitleList.Status.5=0
TitleList.Keywords.5=
TitleList.ContextNumber.5=1040
TitleList.ApplyTemp.5=0
TitleList.Expanded.5=1
TitleList.Expanded.5=0
TitleList.Kind.5=0
TitleList.Title.6=InitDebug/initdbg/init
TitleList.Level.6=2
@ -985,146 +985,216 @@ TitleList.Status.88=0
TitleList.Keywords.88=
TitleList.ContextNumber.88=1050
TitleList.ApplyTemp.88=0
TitleList.Expanded.88=0
TitleList.Expanded.88=1
TitleList.Kind.88=0
TitleList.Title.89=Exports
TitleList.Title.89=The basics
TitleList.Level.89=1
TitleList.Url.89=Exports.htm
TitleList.Url.89=The_basics.htm
TitleList.Icon.89=0
TitleList.Status.89=0
TitleList.Keywords.89=
TitleList.ContextNumber.89=1051
TitleList.ContextNumber.89=1103
TitleList.ApplyTemp.89=0
TitleList.Expanded.89=0
TitleList.Kind.89=0
TitleList.Title.90=_plugin_registercallback
TitleList.Level.90=2
TitleList.Url.90=_plugin_registercallback.htm
TitleList.Title.90=API
TitleList.Level.90=1
TitleList.Url.90=Exports.htm
TitleList.Icon.90=0
TitleList.Status.90=0
TitleList.Keywords.90=
TitleList.ContextNumber.90=1052
TitleList.ContextNumber.90=1051
TitleList.ApplyTemp.90=0
TitleList.Expanded.90=0
TitleList.Expanded.90=1
TitleList.Kind.90=0
TitleList.Title.91=_plugin_unregistercallback
TitleList.Title.91=_plugin_registercallback
TitleList.Level.91=2
TitleList.Url.91=_plugin_unregistercallback.htm
TitleList.Url.91=_plugin_registercallback.htm
TitleList.Icon.91=0
TitleList.Status.91=0
TitleList.Keywords.91=
TitleList.ContextNumber.91=1053
TitleList.ContextNumber.91=1052
TitleList.ApplyTemp.91=0
TitleList.Expanded.91=0
TitleList.Kind.91=0
TitleList.Title.92=_plugin_registercommand
TitleList.Title.92=_plugin_unregistercallback
TitleList.Level.92=2
TitleList.Url.92=_plugin_registercommand.htm
TitleList.Url.92=_plugin_unregistercallback.htm
TitleList.Icon.92=0
TitleList.Status.92=0
TitleList.Keywords.92=
TitleList.ContextNumber.92=1054
TitleList.ContextNumber.92=1053
TitleList.ApplyTemp.92=0
TitleList.Expanded.92=0
TitleList.Kind.92=0
TitleList.Title.93=_plugin_unregistercommand
TitleList.Title.93=_plugin_registercommand
TitleList.Level.93=2
TitleList.Url.93=_plugin_unregistercommand.htm
TitleList.Url.93=_plugin_registercommand.htm
TitleList.Icon.93=0
TitleList.Status.93=0
TitleList.Keywords.93=
TitleList.ContextNumber.93=1055
TitleList.ContextNumber.93=1054
TitleList.ApplyTemp.93=0
TitleList.Expanded.93=0
TitleList.Kind.93=0
TitleList.Title.94=_plugin_logprintf
TitleList.Title.94=_plugin_unregistercommand
TitleList.Level.94=2
TitleList.Url.94=_plugin_logprintf.htm
TitleList.Url.94=_plugin_unregistercommand.htm
TitleList.Icon.94=0
TitleList.Status.94=0
TitleList.Keywords.94=
TitleList.ContextNumber.94=1056
TitleList.ContextNumber.94=1055
TitleList.ApplyTemp.94=0
TitleList.Expanded.94=0
TitleList.Kind.94=0
TitleList.Title.95=_plugin_logputs
TitleList.Title.95=_plugin_logprintf
TitleList.Level.95=2
TitleList.Url.95=_plugin_logputs.htm
TitleList.Url.95=_plugin_logprintf.htm
TitleList.Icon.95=0
TitleList.Status.95=0
TitleList.Keywords.95=
TitleList.ContextNumber.95=1057
TitleList.ContextNumber.95=1056
TitleList.ApplyTemp.95=0
TitleList.Expanded.95=0
TitleList.Kind.95=0
TitleList.Title.96=_plugin_debugpause
TitleList.Title.96=_plugin_logputs
TitleList.Level.96=2
TitleList.Url.96=_plugin_debugpause.htm
TitleList.Url.96=_plugin_logputs.htm
TitleList.Icon.96=0
TitleList.Status.96=0
TitleList.Keywords.96=
TitleList.ContextNumber.96=1058
TitleList.ContextNumber.96=1057
TitleList.ApplyTemp.96=0
TitleList.Expanded.96=0
TitleList.Kind.96=0
TitleList.Title.97=Structures
TitleList.Level.97=1
TitleList.Url.97=Structures.htm
TitleList.Title.97=_plugin_debugpause
TitleList.Level.97=2
TitleList.Url.97=_plugin_debugpause.htm
TitleList.Icon.97=0
TitleList.Status.97=0
TitleList.Keywords.97=
TitleList.ContextNumber.97=1059
TitleList.ContextNumber.97=1058
TitleList.ApplyTemp.97=0
TitleList.Expanded.97=0
TitleList.Kind.97=0
TitleList.Title.98=Callbacks
TitleList.Title.98=_plugin_debugskipexceptions
TitleList.Level.98=2
TitleList.Url.98=Callbacks.htm
TitleList.Url.98=_plugin_debugskipexceptions.htm
TitleList.Icon.98=0
TitleList.Status.98=0
TitleList.Keywords.98=
TitleList.ContextNumber.98=1060
TitleList.ContextNumber.98=1104
TitleList.ApplyTemp.98=0
TitleList.Expanded.98=0
TitleList.Kind.98=0
TitleList.Title.99=PLUG_INITSTRUCT
TitleList.Title.99=_plugin_menuadd
TitleList.Level.99=2
TitleList.Url.99=PLUGINIT_STRUCT.htm
TitleList.Url.99=_plugin_menuadd.htm
TitleList.Icon.99=0
TitleList.Status.99=0
TitleList.Keywords.99=
TitleList.ContextNumber.99=1061
TitleList.ContextNumber.99=1108
TitleList.ApplyTemp.99=0
TitleList.Expanded.99=0
TitleList.Kind.99=0
TitleList.Title.100=Scripting
TitleList.Level.100=0
TitleList.Url.100=Scripting.htm
TitleList.Title.100=_plugin_menuaddentry
TitleList.Level.100=2
TitleList.Url.100=_plugin_menuaddentry.htm
TitleList.Icon.100=0
TitleList.Status.100=0
TitleList.Keywords.100=
TitleList.ContextNumber.100=1069
TitleList.ContextNumber.100=1107
TitleList.ApplyTemp.100=0
TitleList.Expanded.100=0
TitleList.Kind.100=0
TitleList.Title.101=Special Thanks
TitleList.Level.101=0
TitleList.Url.101=Special_Thanks.htm
TitleList.Title.101=_plugin_menuaddseparator
TitleList.Level.101=2
TitleList.Url.101=_plugin_menuaddseparator.htm
TitleList.Icon.101=0
TitleList.Status.101=0
TitleList.Keywords.101=
TitleList.ContextNumber.101=1024
TitleList.ContextNumber.101=1106
TitleList.ApplyTemp.101=0
TitleList.Expanded.101=0
TitleList.Kind.101=0
TitleList.Title.102=Fixed Top Style
TitleList.Level.102=0
TitleList.Url.102=template\fixedtop.htm
TitleList.Title.102=_plugin_menuclear
TitleList.Level.102=2
TitleList.Url.102=_plugin_menuclear.htm
TitleList.Icon.102=0
TitleList.Status.102=0
TitleList.Keywords.102=
TitleList.ContextNumber.102=
TitleList.ContextNumber.102=1105
TitleList.ApplyTemp.102=0
TitleList.Expanded.102=0
TitleList.Kind.102=2
TitleList.Kind.102=0
TitleList.Title.103=Structures
TitleList.Level.103=1
TitleList.Url.103=Structures.htm
TitleList.Icon.103=0
TitleList.Status.103=0
TitleList.Keywords.103=
TitleList.ContextNumber.103=1059
TitleList.ApplyTemp.103=0
TitleList.Expanded.103=1
TitleList.Kind.103=0
TitleList.Title.104=Callback Structures
TitleList.Level.104=2
TitleList.Url.104=Callbacks.htm
TitleList.Icon.104=0
TitleList.Status.104=0
TitleList.Keywords.104=
TitleList.ContextNumber.104=1060
TitleList.ApplyTemp.104=0
TitleList.Expanded.104=0
TitleList.Kind.104=0
TitleList.Title.105=PLUG_INITSTRUCT
TitleList.Level.105=2
TitleList.Url.105=PLUGINIT_STRUCT.htm
TitleList.Icon.105=0
TitleList.Status.105=0
TitleList.Keywords.105=
TitleList.ContextNumber.105=1061
TitleList.ApplyTemp.105=0
TitleList.Expanded.105=0
TitleList.Kind.105=0
TitleList.Title.106=PLUG_SETUPSTRUCT
TitleList.Level.106=2
TitleList.Url.106=PLUG_SETUPSTRUCT.htm
TitleList.Icon.106=0
TitleList.Status.106=0
TitleList.Keywords.106=
TitleList.ContextNumber.106=1102
TitleList.ApplyTemp.106=0
TitleList.Expanded.106=0
TitleList.Kind.106=0
TitleList.Title.107=Scripting
TitleList.Level.107=0
TitleList.Url.107=Scripting.htm
TitleList.Icon.107=0
TitleList.Status.107=0
TitleList.Keywords.107=
TitleList.ContextNumber.107=1069
TitleList.ApplyTemp.107=0
TitleList.Expanded.107=0
TitleList.Kind.107=0
TitleList.Title.108=Special Thanks
TitleList.Level.108=0
TitleList.Url.108=Special_Thanks.htm
TitleList.Icon.108=0
TitleList.Status.108=0
TitleList.Keywords.108=
TitleList.ContextNumber.108=1024
TitleList.ApplyTemp.108=0
TitleList.Expanded.108=0
TitleList.Kind.108=0
TitleList.Title.109=Fixed Top Style
TitleList.Level.109=0
TitleList.Url.109=template\fixedtop.htm
TitleList.Icon.109=0
TitleList.Status.109=0
TitleList.Keywords.109=
TitleList.ContextNumber.109=
TitleList.ApplyTemp.109=0
TitleList.Expanded.109=0
TitleList.Kind.109=2

View File

@ -80,6 +80,7 @@ The icon is taken from VisualPharm (http://www.visualpharm.com/)
- EXETools community
- Tuts4You community
- DMichael
- TEAM DVT
- Sorry if I forgot you!
>Lead developers:

View File

@ -427,13 +427,13 @@ static void cbStep()
GuiSetDebugState(paused);
PLUG_CB_STEPPED stepInfo;
stepInfo.reserved=0;
plugincbcall(CB_STEPPED, &stepInfo);
//lock
lock(WAITID_RUN);
bSkipExceptions=false;
PLUG_CB_PAUSEDEBUG pauseInfo;
pauseInfo.reserved=0;
plugincbcall(CB_PAUSEDEBUG, &pauseInfo);
plugincbcall(CB_STEPPED, &stepInfo);
wait(WAITID_RUN);
}
@ -569,6 +569,14 @@ static void cbCreateThread(CREATE_THREAD_DEBUG_INFO* CreateThread)
{
threadcreate(CreateThread); //update thread list
DWORD dwThreadId=((DEBUG_EVENT*)GetDebugData())->dwThreadId;
if(settingboolget("Events", "ThreadEntry"))
{
char command[256]="";
sprintf(command, "bp "fhex",\"Thread %X\",ss", CreateThread->lpStartAddress, dwThreadId);
cmddirectexec(dbggetcommandlist(), command);
}
PLUG_CB_CREATETHREAD callbackInfo;
callbackInfo.CreateThread=CreateThread;
callbackInfo.dwThreadId=dwThreadId;
@ -588,13 +596,6 @@ static void cbCreateThread(CREATE_THREAD_DEBUG_INFO* CreateThread)
plugincbcall(CB_PAUSEDEBUG, &pauseInfo);
wait(WAITID_RUN);
}
if(settingboolget("Events", "ThreadEntry"))
{
char command[256]="";
sprintf(command, "bp "fhex",\"Thread %X\",ss", CreateThread->lpStartAddress, dwThreadId);
cmddirectexec(dbggetcommandlist(), command);
}
}
static void cbExitThread(EXIT_THREAD_DEBUG_INFO* ExitThread)
@ -680,6 +681,17 @@ static void cbLoadDll(LOAD_DLL_DEBUG_INFO* LoadDll)
}
GuiUpdateBreakpointsView();
if(settingboolget("Events", "DllEntry") && !bAlreadySetEntry)
{
uint oep=GetPE32Data(DLLDebugFileName, 0, UE_OEP);
if(oep)
{
char command[256]="";
sprintf(command, "bp "fhex",\"DllMain (%s)\",ss", oep+(uint)base, modname);
cmddirectexec(dbggetcommandlist(), command);
}
}
//plugin callback
PLUG_CB_LOADDLL callbackInfo;
callbackInfo.LoadDll=LoadDll;
@ -699,17 +711,6 @@ static void cbLoadDll(LOAD_DLL_DEBUG_INFO* LoadDll)
plugincbcall(CB_PAUSEDEBUG, &pauseInfo);
wait(WAITID_RUN);
}
if(settingboolget("Events", "DllEntry") && !bAlreadySetEntry)
{
uint oep=GetPE32Data(DLLDebugFileName, 0, UE_OEP);
if(oep)
{
char command[256]="";
sprintf(command, "bp "fhex",\"DllMain (%s)\",ss", oep+(uint)base, modname);
cmddirectexec(dbggetcommandlist(), command);
}
}
}
static void cbUnloadDll(UNLOAD_DLL_DEBUG_INFO* UnloadDll)
@ -744,6 +745,7 @@ static void cbOutputDebugString(OUTPUT_DEBUG_STRING_INFO* DebugString)
PLUG_CB_OUTPUTDEBUGSTRING callbackInfo;
callbackInfo.DebugString=DebugString;
plugincbcall(CB_OUTPUTDEBUGSTRING, &callbackInfo);
if(!DebugString->fUnicode) //ASCII
{
char* DebugText=(char*)emalloc(DebugString->nDebugStringLength+1, "cbOutputDebugString:DebugText");