1
0
Fork 0

BRIDGE: added BridgeSetting* exports

DBG: changed how modules are handled internally ('filename.extension' instead of 'filename')
DBG: fixed a bug in bpfixmemory (memory breakpoints would change the bytes too)
DBG: show breakpoint type when you break
DBG: added DeleteMemoryBPX command
DBG: set the most recent file using BridgeSetting
GUI: updated stuff with modules (MAX_MODULE_SIZE)
GUI: added restartDebugging() function
PROJECT: updated help
This commit is contained in:
mr.exodia 2013-11-20 17:55:59 +01:00
parent 1d2f496378
commit c15726cf2c
27 changed files with 674 additions and 238 deletions

View File

@ -18,6 +18,6 @@ html,body {
<P><STRONG>DeleteBPX[,bpc,bc]</STRONG><BR>Delete&nbsp;a
breakpoint set using the SetBPX command.</P>
<P><U>arguments</U><BR>[arg1]: Name or address of the breakpoint to delete. If this argument is not specified, all breakpoints will be
enabled.</P>
deleted.</P>
<P><U>result<BR></U>This command does not set any result variables.</P>
<P>&nbsp;</P></body>
<P>&nbsp;</P></head>

View File

@ -0,0 +1,23 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DeleteHardwareBreakpoint/bphc/bphwc</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>DeleteHardwareBreakpoint[,bphc,bphwc]</STRONG><BR>Delete&nbsp;a hardware breakpoint set using the
SetHardwareBreakpoint command.</P>
<P><U>arguments</U><BR>[arg1]: Name or address of the hardware breakpoint to delete. If
this argument is not specified, all hardware breakpoints will be deleted.</P>
<P><U>result<BR></U>This command does not set any result
variables.</P></body>

View File

@ -0,0 +1,39 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DeleteMemoryBPX/membpc/bpmc</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>
DeleteMemoryBPX[,membpc,bpmc]
</STRONG>
<BR>Delete&nbsp;a memory breakpoint set using the SetMemoryBPX
command.
</P>
<P >
<U >
arguments</U>
<BR>
[arg1]: Name or (base) address of the memory breakpoint to
delete. If this argument is not specified, all memory breakpoints will be
deleted.</P>
<P>
<U>
result
<BR>
</U>This command does not set any result
variables.</P></body>

View File

@ -17,10 +17,10 @@ html,body {
<body><STRONG>DisableBPX[,bpd,bd]<BR></STRONG>Disable&nbsp;a breakpoint set using the SetBPX
command.
<P><U>arguments</U><BR>[arg1]: Name or address of the breakpoint to disable. If
this argument is not specified, all breakpoints will be enabled.</P>
this argument is not specified, all breakpoints will be disabled.</P>
<P>
<U>
result
<BR>
</U>This command does not set any result
variables.</P></BODY></HTML>
variables.</P></body></HTML>

View File

@ -46,7 +46,9 @@ Rogers </DIV>
<LI>
<DIV><A href="http://forum.tuts4you.com"
target=_blank>Tuts4You community</A>
&nbsp; </DIV>
</DIV>
<LI>
<DIV>DMichael&nbsp;&nbsp; </DIV>
<LI>
<DIV>Sorry if I forgot
you! </DIV></LI></UL></BODY></HTML>
you! </DIV></LI></UL></body></HTML>

View File

@ -0,0 +1,24 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>StartScylla/scylla/imprec</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>StartScylla[,scylla,imprec]<BR></STRONG>Start the Scylla plugin auto-selecting the
currently debugged DLL/EXE.</P>
<P class=rvps3><SPAN class=rvts11><U>arguments </U><BR></SPAN><SPAN
class=rvts9>This command has no arguments.</SPAN></P>
<P class=rvps3><SPAN class=rvts11><U>result<BR></U></SPAN><SPAN class=rvts9>This command does not set any result
variables.</SPAN></P></body>
</html>

View File

@ -0,0 +1,34 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>StopDebug/stop/dbgstop</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>
StopDebug[,stop,dbgstop]
<BR>
</STRONG>Terminate the current debuggee and stop debugging
it.</P>
<P class=rvps3>
<SPAN class=rvts11 >
<U >
arguments</U>
<BR></SPAN>
<SPAN
class=rvts9>This command has no arguments.</SPAN> </P>
<P class=rvps3><SPAN class=rvts11><U>result<BR></U></SPAN><SPAN class=rvts9>This command does not set any result
variables.</SPAN></P></body>
</html>

View File

@ -15,7 +15,7 @@ html,body {
</head>
<body>
<P class=rvps3><SPAN class=rvts10><STRONG>cls</STRONG><BR></SPAN><SPAN class=rvts9>Clear the console screen.</SPAN><SPAN class=rvts9><BR></SPAN></P>
<P class=rvps3><SPAN class=rvts11><U>arguments</U><BR></SPAN><SPAN class=rvts9>This command has no arguments.</SPAN><SPAN class=rvts9><BR></SPAN></P>
<P class=rvps3><SPAN class=rvts11><U>result<BR></U></SPAN><SPAN class=rvts9>This command does not set any result
variables.</SPAN></P></head>
<P class=rvps3><SPAN class=rvts10><STRONG>cls</STRONG><BR></SPAN><SPAN class=rvts9>Clear the log window.</SPAN></P>
<P class=rvps3><SPAN class=rvts9> </SPAN><SPAN class=rvts11><U>arguments</U><BR></SPAN><SPAN class=rvts9>This command has no arguments.</SPAN></P>
<P class=rvps3><SPAN class=rvts9> </SPAN><SPAN class=rvts11><U>result<BR></U></SPAN><SPAN class=rvts9>This command does not set any result
variables.</SPAN></P></body></HTML>

View File

@ -15,8 +15,8 @@ html,body {
</head>
<body>
<P><STRONG>disasm[,dis,d]<BR></STRONG>Disassemble 500
instructions and put the result in the disassembly window.</P>
<P><STRONG>disasm[,dis,d]<BR></STRONG>
Disassemble at a certain position.</P>
<P class=rvps3>
<SPAN class=rvts11>
<U>arguments</U>
@ -29,4 +29,4 @@ instructions and put the result in the disassembly window.</P>
[arg1]: The address to disassemble at. When not specified,
there will be assembled at CIP.</SPAN>
</P><P class=rvps3><SPAN class=rvts11><U>result<BR></U></SPAN><SPAN class=rvts9>This command does not set any result
variables.</SPAN></P></body>
variables.</SPAN></P></body>

23
help/pause.htm Normal file
View File

@ -0,0 +1,23 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>pause</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>pause<BR></STRONG>Pause&nbsp;the debuggee.</P>
<P class=rvps3><SPAN class=rvts11><U>arguments </U><BR></SPAN><SPAN
class=rvts9>This command has no arguments.</SPAN></P>
<P class=rvps3><SPAN class=rvts11><U>result<BR></U></SPAN><SPAN class=rvts9>This command does not set any result variables.</SPAN></P>
<P>&nbsp;</P></body>
</html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>rtr</title>
<title>StepOut/rtr</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
@ -15,7 +15,7 @@ html,body {
</head>
<body>
<P><STRONG>rtr<BR></STRONG>Return from function by calling
<P><STRONG>StepOut[,rtr]<BR></STRONG>Return from function by calling
StepOver until the current instruction is a RET.</P>
<P class=rvps3>
<SPAN class=rvts11>
@ -33,4 +33,4 @@ This command has no arguments.</SPAN></P>
<U>result<BR>
</U></SPAN><SPAN
class=rvts9>This command does not set any result
variables.</SPAN></P></body>
variables.</SPAN></P></body>

View File

@ -96,7 +96,7 @@ Font=
DefaultTopic=Introduction.htm
[TOPICS]
TitleList=40
TitleList=51
TitleList.Title.0=Introduction
TitleList.Level.0=0
TitleList.Url.0=Introduction.htm
@ -147,354 +147,464 @@ TitleList.ContextNumber.4=1003
TitleList.ApplyTemp.4=0
TitleList.Expanded.4=1
TitleList.Kind.4=0
TitleList.Title.5=x/exit
TitleList.Title.5=Debug Control
TitleList.Level.5=1
TitleList.Url.5=x_exit.htm
TitleList.Url.5=
TitleList.Icon.5=0
TitleList.Status.5=0
TitleList.Status.5=1
TitleList.Keywords.5=
TitleList.ContextNumber.5=1004
TitleList.ContextNumber.5=1040
TitleList.ApplyTemp.5=0
TitleList.Expanded.5=0
TitleList.Kind.5=0
TitleList.Title.6=strlen/charcount/ccount
TitleList.Level.6=1
TitleList.Url.6=strlen_charcount_ccount.htm
TitleList.Title.6=InitDebug/initdbg/init
TitleList.Level.6=2
TitleList.Url.6=InitDebug_initdbg_init.htm
TitleList.Icon.6=0
TitleList.Status.6=0
TitleList.Keywords.6=
TitleList.ContextNumber.6=1005
TitleList.ContextNumber.6=1011
TitleList.ApplyTemp.6=0
TitleList.Expanded.6=0
TitleList.Kind.6=0
TitleList.Title.7=var/varnew
TitleList.Level.7=1
TitleList.Url.7=var_varnew.htm
TitleList.Title.7=StopDebug/stop/dbgstop
TitleList.Level.7=2
TitleList.Url.7=StopDebug_stop_dbgstop.htm
TitleList.Icon.7=0
TitleList.Status.7=0
TitleList.Keywords.7=
TitleList.ContextNumber.7=1006
TitleList.ContextNumber.7=1044
TitleList.ApplyTemp.7=0
TitleList.Expanded.7=0
TitleList.Kind.7=0
TitleList.Title.8=vardel
TitleList.Level.8=1
TitleList.Url.8=vardel.htm
TitleList.Title.8=run/go/r/g
TitleList.Level.8=2
TitleList.Url.8=run_go_r_g.htm
TitleList.Icon.8=0
TitleList.Status.8=0
TitleList.Keywords.8=
TitleList.ContextNumber.8=1007
TitleList.ContextNumber.8=1013
TitleList.ApplyTemp.8=0
TitleList.Expanded.8=0
TitleList.Kind.8=0
TitleList.Title.9=mov/set
TitleList.Level.9=1
TitleList.Url.9=mov_set.htm
TitleList.Title.9=pause
TitleList.Level.9=2
TitleList.Url.9=pause.htm
TitleList.Icon.9=0
TitleList.Status.9=0
TitleList.Keywords.9=
TitleList.ContextNumber.9=1008
TitleList.ContextNumber.9=1045
TitleList.ApplyTemp.9=0
TitleList.Expanded.9=0
TitleList.Kind.9=0
TitleList.Title.10=cls
TitleList.Level.10=1
TitleList.Url.10=cls.htm
TitleList.Title.10=StepInto/sti
TitleList.Level.10=2
TitleList.Url.10=StepInto.htm
TitleList.Icon.10=0
TitleList.Status.10=0
TitleList.Keywords.10=
TitleList.ContextNumber.10=1009
TitleList.ContextNumber.10=1021
TitleList.ApplyTemp.10=0
TitleList.Expanded.10=0
TitleList.Kind.10=0
TitleList.Title.11=varlist
TitleList.Level.11=1
TitleList.Url.11=varlist.htm
TitleList.Title.11=StepOver/step/sto/st
TitleList.Level.11=2
TitleList.Url.11=StepOver.htm
TitleList.Icon.11=0
TitleList.Status.11=0
TitleList.Keywords.11=
TitleList.ContextNumber.11=1010
TitleList.ContextNumber.11=1022
TitleList.ApplyTemp.11=0
TitleList.Expanded.11=0
TitleList.Kind.11=0
TitleList.Title.12=InitDebug/initdbg/init
TitleList.Level.12=1
TitleList.Url.12=InitDebug_initdbg_init.htm
TitleList.Title.12=SingleStep/sstep/sst
TitleList.Level.12=2
TitleList.Url.12=SingleStep.htm
TitleList.Icon.12=0
TitleList.Status.12=0
TitleList.Keywords.12=
TitleList.ContextNumber.12=1011
TitleList.ContextNumber.12=1023
TitleList.ApplyTemp.12=0
TitleList.Expanded.12=0
TitleList.Kind.12=0
TitleList.Title.13=run/go/r/g
TitleList.Level.13=1
TitleList.Url.13=run_go_r_g.htm
TitleList.Title.13=StepOut/rtr
TitleList.Level.13=2
TitleList.Url.13=rtr.htm
TitleList.Icon.13=0
TitleList.Status.13=0
TitleList.Keywords.13=
TitleList.ContextNumber.13=1013
TitleList.ContextNumber.13=1028
TitleList.ApplyTemp.13=0
TitleList.Expanded.13=0
TitleList.Kind.13=0
TitleList.Title.14=SetBPXOptions/bptype
TitleList.Title.14=Breakpoints
TitleList.Level.14=1
TitleList.Url.14=SetBPXOptions_bptype.htm
TitleList.Url.14=
TitleList.Icon.14=0
TitleList.Status.14=0
TitleList.Status.14=1
TitleList.Keywords.14=
TitleList.ContextNumber.14=1018
TitleList.ContextNumber.14=1019
TitleList.ApplyTemp.14=0
TitleList.Expanded.14=0
TitleList.Kind.14=0
TitleList.Title.15=SetBPX/bp/bpx
TitleList.Level.15=1
TitleList.Url.15=SetBPX_bp_bpx.htm
TitleList.Title.15=bplist
TitleList.Level.15=2
TitleList.Url.15=bplist.htm
TitleList.Icon.15=0
TitleList.Status.15=0
TitleList.Keywords.15=
TitleList.ContextNumber.15=1012
TitleList.ContextNumber.15=1015
TitleList.ApplyTemp.15=0
TitleList.Expanded.15=0
TitleList.Kind.15=0
TitleList.Title.16=DeleteBPX/bpc/bc
TitleList.Level.16=1
TitleList.Url.16=DeleteBPX_bpc_bc.htm
TitleList.Title.16=SetBPXOptions/bptype
TitleList.Level.16=2
TitleList.Url.16=SetBPXOptions_bptype.htm
TitleList.Icon.16=0
TitleList.Status.16=0
TitleList.Keywords.16=
TitleList.ContextNumber.16=1017
TitleList.ContextNumber.16=1018
TitleList.ApplyTemp.16=0
TitleList.Expanded.16=0
TitleList.Kind.16=0
TitleList.Title.17=EnableBPX/bpe/be
TitleList.Level.17=1
TitleList.Url.17=EnableBPX_bpe_be.htm
TitleList.Title.17=SetBPX/bp/bpx
TitleList.Level.17=2
TitleList.Url.17=SetBPX_bp_bpx.htm
TitleList.Icon.17=0
TitleList.Status.17=0
TitleList.Keywords.17=
TitleList.ContextNumber.17=1014
TitleList.ContextNumber.17=1012
TitleList.ApplyTemp.17=0
TitleList.Expanded.17=0
TitleList.Kind.17=0
TitleList.Title.18=DisableBPX/bpd/bd
TitleList.Level.18=1
TitleList.Url.18=DisableBPX_bpd_bd.htm
TitleList.Title.18=DeleteBPX/bpc/bc
TitleList.Level.18=2
TitleList.Url.18=DeleteBPX_bpc_bc.htm
TitleList.Icon.18=0
TitleList.Status.18=0
TitleList.Keywords.18=
TitleList.ContextNumber.18=1016
TitleList.ContextNumber.18=1017
TitleList.ApplyTemp.18=0
TitleList.Expanded.18=0
TitleList.Kind.18=0
TitleList.Title.19=bplist
TitleList.Level.19=1
TitleList.Url.19=bplist.htm
TitleList.Title.19=EnableBPX/bpe/be
TitleList.Level.19=2
TitleList.Url.19=EnableBPX_bpe_be.htm
TitleList.Icon.19=0
TitleList.Status.19=0
TitleList.Keywords.19=
TitleList.ContextNumber.19=1015
TitleList.ContextNumber.19=1014
TitleList.ApplyTemp.19=0
TitleList.Expanded.19=0
TitleList.Kind.19=0
TitleList.Title.20=StepInto/sti
TitleList.Level.20=1
TitleList.Url.20=StepInto.htm
TitleList.Title.20=DisableBPX/bpd/bd
TitleList.Level.20=2
TitleList.Url.20=DisableBPX_bpd_bd.htm
TitleList.Icon.20=0
TitleList.Status.20=0
TitleList.Keywords.20=
TitleList.ContextNumber.20=1021
TitleList.ContextNumber.20=1016
TitleList.ApplyTemp.20=0
TitleList.Expanded.20=0
TitleList.Kind.20=0
TitleList.Title.21=StepOver/step/sto/st
TitleList.Level.21=1
TitleList.Url.21=StepOver.htm
TitleList.Title.21=SetHardwareBreakpoint/bph/bphws
TitleList.Level.21=2
TitleList.Url.21=SetHardwareBreakpoint_bph_bphws.htm
TitleList.Icon.21=0
TitleList.Status.21=0
TitleList.Keywords.21=
TitleList.ContextNumber.21=1022
TitleList.ContextNumber.21=1030
TitleList.ApplyTemp.21=0
TitleList.Expanded.21=0
TitleList.Kind.21=0
TitleList.Title.22=SingleStep/sstep/sst
TitleList.Level.22=1
TitleList.Url.22=SingleStep.htm
TitleList.Title.22=SetMemoryBPX/membp/bpm
TitleList.Level.22=2
TitleList.Url.22=SetMemoryBPX_membp_bpm.htm
TitleList.Icon.22=0
TitleList.Status.22=0
TitleList.Keywords.22=
TitleList.ContextNumber.22=1023
TitleList.ContextNumber.22=1027
TitleList.ApplyTemp.22=0
TitleList.Expanded.22=0
TitleList.Kind.22=0
TitleList.Title.23=HideDebugger/dbh/hide
TitleList.Level.23=1
TitleList.Url.23=HideDebugger_dbh_hide.htm
TitleList.Title.23=DeleteHardwareBreakpoint/bphc/bphwc
TitleList.Level.23=2
TitleList.Url.23=DeleteHardwareBreakpoint_bphc_bphwc.htm
TitleList.Icon.23=0
TitleList.Status.23=0
TitleList.Keywords.23=
TitleList.ContextNumber.23=1025
TitleList.ContextNumber.23=1048
TitleList.ApplyTemp.23=0
TitleList.Expanded.23=0
TitleList.Kind.23=0
TitleList.Title.24=disasm/dis/d
TitleList.Level.24=1
TitleList.Url.24=disasm_dis_d.htm
TitleList.Title.24=DeleteMemoryBPX/membpc/bpmc
TitleList.Level.24=2
TitleList.Url.24=DeleteMemoryBPX_membpc_bpmc.htm
TitleList.Icon.24=0
TitleList.Status.24=0
TitleList.Keywords.24=
TitleList.ContextNumber.24=1026
TitleList.ContextNumber.24=1049
TitleList.ApplyTemp.24=0
TitleList.Expanded.24=0
TitleList.Kind.24=0
TitleList.Title.25=SetMemoryBPX/membp/bpm
TitleList.Title.25=Variables
TitleList.Level.25=1
TitleList.Url.25=SetMemoryBPX_membp_bpm.htm
TitleList.Url.25=
TitleList.Icon.25=0
TitleList.Status.25=0
TitleList.Status.25=1
TitleList.Keywords.25=
TitleList.ContextNumber.25=1027
TitleList.ContextNumber.25=1041
TitleList.ApplyTemp.25=0
TitleList.Expanded.25=0
TitleList.Kind.25=0
TitleList.Title.26=chd
TitleList.Level.26=1
TitleList.Url.26=chd.htm
TitleList.Title.26=var/varnew
TitleList.Level.26=2
TitleList.Url.26=var_varnew.htm
TitleList.Icon.26=0
TitleList.Status.26=0
TitleList.Keywords.26=
TitleList.ContextNumber.26=1029
TitleList.ContextNumber.26=1006
TitleList.ApplyTemp.26=0
TitleList.Expanded.26=0
TitleList.Kind.26=0
TitleList.Title.27=rtr
TitleList.Level.27=1
TitleList.Url.27=rtr.htm
TitleList.Title.27=vardel
TitleList.Level.27=2
TitleList.Url.27=vardel.htm
TitleList.Icon.27=0
TitleList.Status.27=0
TitleList.Keywords.27=
TitleList.ContextNumber.27=1028
TitleList.ContextNumber.27=1007
TitleList.ApplyTemp.27=0
TitleList.Expanded.27=0
TitleList.Kind.27=0
TitleList.Title.28=SetHardwareBreakpoint/bph/bphws
TitleList.Level.28=1
TitleList.Url.28=SetHardwareBreakpoint_bph_bphws.htm
TitleList.Title.28=varlist
TitleList.Level.28=2
TitleList.Url.28=varlist.htm
TitleList.Icon.28=0
TitleList.Status.28=0
TitleList.Keywords.28=
TitleList.ContextNumber.28=1030
TitleList.ContextNumber.28=1010
TitleList.ApplyTemp.28=0
TitleList.Expanded.28=0
TitleList.Kind.28=0
TitleList.Title.29=alloc
TitleList.Level.29=1
TitleList.Url.29=alloc.htm
TitleList.Title.29=mov/set
TitleList.Level.29=2
TitleList.Url.29=mov_set.htm
TitleList.Icon.29=0
TitleList.Status.29=0
TitleList.Keywords.29=
TitleList.ContextNumber.29=1032
TitleList.ContextNumber.29=1008
TitleList.ApplyTemp.29=0
TitleList.Expanded.29=0
TitleList.Kind.29=0
TitleList.Title.30=free
TitleList.Title.30=Misc
TitleList.Level.30=1
TitleList.Url.30=free.htm
TitleList.Url.30=
TitleList.Icon.30=0
TitleList.Status.30=0
TitleList.Status.30=1
TitleList.Keywords.30=
TitleList.ContextNumber.30=1031
TitleList.ContextNumber.30=1004
TitleList.ApplyTemp.30=0
TitleList.Expanded.30=0
TitleList.Kind.30=0
TitleList.Title.31=Fill/memset
TitleList.Level.31=1
TitleList.Url.31=Fill_memset.htm
TitleList.Title.31=strlen/charcount/ccount
TitleList.Level.31=2
TitleList.Url.31=strlen_charcount_ccount.htm
TitleList.Icon.31=0
TitleList.Status.31=0
TitleList.Keywords.31=
TitleList.ContextNumber.31=1033
TitleList.ContextNumber.31=1005
TitleList.ApplyTemp.31=0
TitleList.Expanded.31=0
TitleList.Kind.31=0
TitleList.Title.32=cmt/cmtset/commentset
TitleList.Level.32=1
TitleList.Url.32=cmt_cmtset_commentset.htm
TitleList.Title.32=cls
TitleList.Level.32=2
TitleList.Url.32=cls.htm
TitleList.Icon.32=0
TitleList.Status.32=0
TitleList.Keywords.32=
TitleList.ContextNumber.32=1035
TitleList.ContextNumber.32=1009
TitleList.ApplyTemp.32=0
TitleList.Expanded.32=0
TitleList.Kind.32=0
TitleList.Title.33=cmtc/cmtdel/commentdel
TitleList.Level.33=1
TitleList.Url.33=cmtc_cmtdel_commentdel.htm
TitleList.Title.33=chd
TitleList.Level.33=2
TitleList.Url.33=chd.htm
TitleList.Icon.33=0
TitleList.Status.33=0
TitleList.Keywords.33=
TitleList.ContextNumber.33=1036
TitleList.ContextNumber.33=1029
TitleList.ApplyTemp.33=0
TitleList.Expanded.33=0
TitleList.Kind.33=0
TitleList.Title.34=lbl/lblset/labelset
TitleList.Level.34=1
TitleList.Url.34=lbl_lblset_labelset.htm
TitleList.Title.34=disasm/dis/d
TitleList.Level.34=2
TitleList.Url.34=disasm_dis_d.htm
TitleList.Icon.34=0
TitleList.Status.34=0
TitleList.Keywords.34=
TitleList.ContextNumber.34=1037
TitleList.ContextNumber.34=1026
TitleList.ApplyTemp.34=0
TitleList.Expanded.34=0
TitleList.Kind.34=0
TitleList.Title.35=lblc/lbldel/labeldel
TitleList.Level.35=1
TitleList.Url.35=lblc_lbldel_labeldel.htm
TitleList.Title.35=HideDebugger/dbh/hide
TitleList.Level.35=2
TitleList.Url.35=HideDebugger_dbh_hide.htm
TitleList.Icon.35=0
TitleList.Status.35=0
TitleList.Keywords.35=
TitleList.ContextNumber.35=1038
TitleList.ContextNumber.35=1025
TitleList.ApplyTemp.35=0
TitleList.Expanded.35=0
TitleList.Kind.35=0
TitleList.Title.36=savedb/dbsave
TitleList.Title.36=User Database
TitleList.Level.36=1
TitleList.Url.36=savedb_dbsave.htm
TitleList.Url.36=
TitleList.Icon.36=0
TitleList.Status.36=0
TitleList.Status.36=1
TitleList.Keywords.36=
TitleList.ContextNumber.36=1034
TitleList.ContextNumber.36=1042
TitleList.ApplyTemp.36=0
TitleList.Expanded.36=0
TitleList.Expanded.36=1
TitleList.Kind.36=0
TitleList.Title.37=loaddb/dbload
TitleList.Level.37=1
TitleList.Url.37=loaddb_dbload.htm
TitleList.Title.37=cmt/cmtset/commentset
TitleList.Level.37=2
TitleList.Url.37=cmt_cmtset_commentset.htm
TitleList.Icon.37=0
TitleList.Status.37=0
TitleList.Keywords.37=
TitleList.ContextNumber.37=1039
TitleList.ContextNumber.37=1035
TitleList.ApplyTemp.37=0
TitleList.Expanded.37=0
TitleList.Kind.37=0
TitleList.Title.38=Special Thanks
TitleList.Level.38=0
TitleList.Url.38=Special_Thanks.htm
TitleList.Title.38=cmtc/cmtdel/commentdel
TitleList.Level.38=2
TitleList.Url.38=cmtc_cmtdel_commentdel.htm
TitleList.Icon.38=0
TitleList.Status.38=0
TitleList.Keywords.38=
TitleList.ContextNumber.38=1024
TitleList.ContextNumber.38=1036
TitleList.ApplyTemp.38=0
TitleList.Expanded.38=0
TitleList.Kind.38=0
TitleList.Title.39=Fixed Top Style
TitleList.Level.39=0
TitleList.Url.39=template\fixedtop.htm
TitleList.Title.39=lbl/lblset/labelset
TitleList.Level.39=2
TitleList.Url.39=lbl_lblset_labelset.htm
TitleList.Icon.39=0
TitleList.Status.39=0
TitleList.Keywords.39=
TitleList.ContextNumber.39=
TitleList.ContextNumber.39=1037
TitleList.ApplyTemp.39=0
TitleList.Expanded.39=0
TitleList.Kind.39=2
TitleList.Kind.39=0
TitleList.Title.40=lblc/lbldel/labeldel
TitleList.Level.40=2
TitleList.Url.40=lblc_lbldel_labeldel.htm
TitleList.Icon.40=0
TitleList.Status.40=0
TitleList.Keywords.40=
TitleList.ContextNumber.40=1038
TitleList.ApplyTemp.40=0
TitleList.Expanded.40=0
TitleList.Kind.40=0
TitleList.Title.41=savedb/dbsave
TitleList.Level.41=2
TitleList.Url.41=savedb_dbsave.htm
TitleList.Icon.41=0
TitleList.Status.41=0
TitleList.Keywords.41=
TitleList.ContextNumber.41=1034
TitleList.ApplyTemp.41=0
TitleList.Expanded.41=0
TitleList.Kind.41=0
TitleList.Title.42=loaddb/dbload
TitleList.Level.42=2
TitleList.Url.42=loaddb_dbload.htm
TitleList.Icon.42=0
TitleList.Status.42=0
TitleList.Keywords.42=
TitleList.ContextNumber.42=1039
TitleList.ApplyTemp.42=0
TitleList.Expanded.42=0
TitleList.Kind.42=0
TitleList.Title.43=Memory Operations
TitleList.Level.43=1
TitleList.Url.43=
TitleList.Icon.43=0
TitleList.Status.43=1
TitleList.Keywords.43=
TitleList.ContextNumber.43=1043
TitleList.ApplyTemp.43=0
TitleList.Expanded.43=1
TitleList.Kind.43=0
TitleList.Title.44=alloc
TitleList.Level.44=2
TitleList.Url.44=alloc.htm
TitleList.Icon.44=0
TitleList.Status.44=0
TitleList.Keywords.44=
TitleList.ContextNumber.44=1032
TitleList.ApplyTemp.44=0
TitleList.Expanded.44=0
TitleList.Kind.44=0
TitleList.Title.45=free
TitleList.Level.45=2
TitleList.Url.45=free.htm
TitleList.Icon.45=0
TitleList.Status.45=0
TitleList.Keywords.45=
TitleList.ContextNumber.45=1031
TitleList.ApplyTemp.45=0
TitleList.Expanded.45=0
TitleList.Kind.45=0
TitleList.Title.46=Fill/memset
TitleList.Level.46=2
TitleList.Url.46=Fill_memset.htm
TitleList.Icon.46=0
TitleList.Status.46=0
TitleList.Keywords.46=
TitleList.ContextNumber.46=1033
TitleList.ApplyTemp.46=0
TitleList.Expanded.46=0
TitleList.Kind.46=0
TitleList.Title.47=Plugins
TitleList.Level.47=1
TitleList.Url.47=
TitleList.Icon.47=0
TitleList.Status.47=1
TitleList.Keywords.47=
TitleList.ContextNumber.47=1046
TitleList.ApplyTemp.47=0
TitleList.Expanded.47=1
TitleList.Kind.47=0
TitleList.Title.48=StartScylla/scylla/imprec
TitleList.Level.48=2
TitleList.Url.48=StartScylla_scylla_imprec.htm
TitleList.Icon.48=0
TitleList.Status.48=0
TitleList.Keywords.48=
TitleList.ContextNumber.48=1047
TitleList.ApplyTemp.48=0
TitleList.Expanded.48=0
TitleList.Kind.48=0
TitleList.Title.49=Special Thanks
TitleList.Level.49=0
TitleList.Url.49=Special_Thanks.htm
TitleList.Icon.49=0
TitleList.Status.49=0
TitleList.Keywords.49=
TitleList.ContextNumber.49=1024
TitleList.ApplyTemp.49=0
TitleList.Expanded.49=0
TitleList.Kind.49=0
TitleList.Title.50=Fixed Top Style
TitleList.Level.50=0
TitleList.Url.50=template\fixedtop.htm
TitleList.Icon.50=0
TitleList.Status.50=0
TitleList.Keywords.50=
TitleList.ContextNumber.50=
TitleList.ApplyTemp.50=0
TitleList.Expanded.50=0
TitleList.Kind.50=2

View File

@ -1,23 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>x/exit</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 class=rvps3><SPAN class=rvts10><STRONG>x[,exit]</STRONG><BR></SPAN><SPAN
class=rvts9>Exit the program.</SPAN><SPAN class=rvts9><BR></SPAN></P>
<P class=rvps3><SPAN class=rvts11><U>arguments<BR></U></SPAN><SPAN
class=rvts9>This command has no arguments.</SPAN><SPAN class=rvts9><BR></SPAN></P>
<P class=rvps3><SPAN class=rvts11><U>result<BR></U></SPAN><SPAN class=rvts9>This
command does not set any result variables.</SPAN></P></body>

View File

@ -4,6 +4,7 @@
#include <new>
static HINSTANCE hInst;
static char szIniFile[1024]="";
#ifdef _WIN64
#define dbg_lib "x64_dbg.dll"
@ -16,6 +17,15 @@ static HINSTANCE hInst;
//Bridge
DLL_IMPEXP const char* BridgeInit()
{
///Settings load
GetModuleFileNameA(0, szIniFile, 1024);
int len=strlen(szIniFile);
while(szIniFile[len]!='.' and szIniFile[len]!='\\')
len--;
if(szIniFile[len]=='\\')
strcat(szIniFile, ".ini");
else
strcpy(&szIniFile[len], ".ini");
///GUI Load
hInstGui=LoadLibraryA(gui_lib); //Sigma
if(!hInstGui)
@ -145,6 +155,54 @@ DLL_IMPEXP void BridgeFree(void* ptr)
delete[] (unsigned char*)ptr;
}
DLL_IMPEXP bool BridgeSettingGet(const char* section, const char* key, char* value)
{
if(!section || !key || !value)
return false;
if(!GetPrivateProfileStringA(section, key, "", value, MAX_SETTING_SIZE, szIniFile))
return false;
return true;
}
DLL_IMPEXP bool BridgeSettingGetUint(const char* section, const char* key, duint* value)
{
if(!section || !key || !value)
return false;
char newvalue[MAX_SETTING_SIZE]="";
if(!BridgeSettingGet(section, key, newvalue))
return false;
#ifdef _WIN64
int ret=sscanf(newvalue, "%llX", value);
#else
int ret=sscanf(newvalue, "%X", value);
#endif //_WIN64
if(ret)
return true;
return false;
}
DLL_IMPEXP bool BridgeSettingSet(const char* section, const char* key, const char* value)
{
if(!section || !key || !value)
return false;
if(!WritePrivateProfileStringA(section, key, value, szIniFile))
return false;
return true;
}
DLL_IMPEXP bool BridgeSettingSetUint(const char* section, const char* key, duint value)
{
if(!section || !key)
return false;
char newvalue[MAX_SETTING_SIZE]="";
#ifdef _WIN64
sprintf(newvalue, "%llX", value);
#else
sprintf(newvalue, "%X", value);
#endif //_WIN64
return BridgeSettingSet(section, key, newvalue);
}
//Debugger
DLL_IMPEXP void DbgMemRead(duint va, unsigned char* dest, duint size)
{

View File

@ -24,15 +24,23 @@ extern "C"
{
#endif
//Bridge defines
#define MAX_SETTING_SIZE 2048
//Bridge functions
DLL_IMPEXP const char* BridgeInit();
DLL_IMPEXP const char* BridgeStart();
DLL_IMPEXP void* BridgeAlloc(size_t size);
DLL_IMPEXP void BridgeFree(void* ptr);
DLL_IMPEXP bool BridgeSettingGet(const char* section, const char* key, char* value);
DLL_IMPEXP bool BridgeSettingGetUint(const char* section, const char* key, duint* value);
DLL_IMPEXP bool BridgeSettingSet(const char* section, const char* key, const char* value);
DLL_IMPEXP bool BridgeSettingSetUint(const char* section, const char* key, duint value);
//Debugger defines
#define MAX_LABEL_SIZE 256
#define MAX_COMMENT_SIZE 256
#define MAX_MODULE_SIZE 256
//Debugger enums
enum DBGSTATE
@ -73,7 +81,7 @@ enum BPXTYPE
struct MEMPAGE
{
MEMORY_BASIC_INFORMATION mbi;
char mod[32];
char mod[MAX_MODULE_SIZE];
};
struct MEMMAP
@ -84,7 +92,7 @@ struct MEMMAP
struct ADDRINFO
{
char module[32]; //module the address is in
char module[MAX_MODULE_SIZE]; //module the address is in
char label[MAX_LABEL_SIZE];
char comment[MAX_COMMENT_SIZE];
int flags; //ADDRINFOFLAGS

View File

@ -37,7 +37,7 @@ extern "C" DLL_EXPORT bool _dbg_memmap(MEMMAP* memmap)
{
MEMPAGE curPage;
*curPage.mod=0;
modnamefromaddr(MyAddress, curPage.mod);
modnamefromaddr(MyAddress, curPage.mod, false);
memcpy(&curPage.mbi, &mbi, sizeof(mbi));
pageVector.push_back(curPage);
memmap->count++;
@ -95,7 +95,7 @@ extern "C" DLL_EXPORT bool _dbg_addrinfoget(duint addr, SEGMENTREG segment, ADDR
if(addrinfo->flags&flagmodule) //get module
{
char module[64]="";
if(modnamefromaddr(addr, module) and strlen(module)<32) //get module name
if(modnamefromaddr(addr, module, false) and strlen(module)<MAX_MODULE_SIZE) //get module name
{
strcpy(addrinfo->module, module);
retval=true;

View File

@ -57,11 +57,28 @@ void dbclose()
static std::vector<MODINFO> modinfo;
bool modload(uint base, uint size, const char* name)
bool modload(uint base, uint size, const char* fullpath)
{
if(!base or !size or !name or strlen(name)>=31)
if(!base or !size or !fullpath)
return false;
char name[deflen]="";
int len=strlen(fullpath);
while(fullpath[len]!='\\' and len)
len--;
if(len)
len++;
strcpy(name, fullpath+len);
len=strlen(name);
name[MAX_MODULE_SIZE-1]=0; //ignore later characters
while(name[len]!='.' and len)
len--;
MODINFO info;
if(len)
{
strcpy(info.extension, name+len);
_strlwr(info.extension);
name[len]=0; //remove extension
}
info.base=base;
info.size=size;
strcpy(info.name, name);
@ -89,28 +106,37 @@ void modclear()
modinfo.clear();
}
bool modnamefromaddr(uint addr, char* modname)
bool modnamefromaddr(uint addr, char* modname, bool extension)
{
if(!modname)
return false;
IMAGEHLP_MODULE64 modInfo;
memset(&modInfo, 0, sizeof(modInfo));
modInfo.SizeOfStruct=sizeof(IMAGEHLP_MODULE64);
if(!SymGetModuleInfo64(fdProcessInfo->hProcess, (DWORD64)addr, &modInfo))
return false;
_strlwr(modInfo.ModuleName);
strcpy(modname, modInfo.ModuleName);
return true;
int total=modinfo.size();
for(int i=0; i<total; i++)
{
uint modstart=modinfo.at(i).base;
uint modend=modstart+modinfo.at(i).size;
if(addr>=modstart and addr<modend) //found module
{
strcpy(modname, modinfo.at(i).name);
if(extension)
strcat(modname, modinfo.at(i).extension); //append extension
return true;
}
}
return false;
}
uint modbasefromaddr(uint addr)
{
IMAGEHLP_MODULE64 modInfo;
memset(&modInfo, 0, sizeof(modInfo));
modInfo.SizeOfStruct=sizeof(IMAGEHLP_MODULE64);
if(!SymGetModuleInfo64(fdProcessInfo->hProcess, (DWORD64)addr, &modInfo))
return false;
return modInfo.BaseOfImage;
int total=modinfo.size();
for(int i=0; i<total; i++)
{
uint modstart=modinfo.at(i).base;
uint modend=modstart+modinfo.at(i).size;
if(addr>=modstart and addr<modend) //found module
return modstart;
}
return 0;
}
uint modbasefromname(const char* modname)
@ -118,9 +144,19 @@ uint modbasefromname(const char* modname)
if(!modname)
return 0;
int total=modinfo.size();
int modname_len=strlen(modname);
if(modname_len>=MAX_MODULE_SIZE)
return 0;
char newmodname[MAX_MODULE_SIZE]="";
strcpy(newmodname, modname);
_strlwr(newmodname);
for(int i=0; i<total; i++)
{
if(!_stricmp(modinfo.at(i).name, modname))
int cur_len=strlen(modinfo.at(i).name);
int cmp_len=modname_len;
if(cur_len<cmp_len)
cmp_len=cur_len;
if(!memcmp(modinfo.at(i).name, newmodname, cmp_len))
return modinfo.at(i).base;
}
return 0;
@ -149,7 +185,7 @@ bool apienumexports(uint base, EXPORTENUMCALLBACK cbEnum)
if(!export_dir.NumberOfFunctions or !NumberOfNames) //no named exports
return false;
char modname[256]="";
modnamefromaddr(base, modname);
modnamefromaddr(base, modname, true);
uint original_name_va=export_dir.Name+base;
char original_name[deflen]="";
memset(original_name, 0, sizeof(original_name));
@ -213,7 +249,7 @@ bool commentset(uint addr, const char* text)
sqlstringescape(text, commenttext);
char modname[35]="";
char sql[deflen]="";
if(!modnamefromaddr(addr, modname)) //comments without module
if(!modnamefromaddr(addr, modname, true)) //comments without module
{
sprintf(sql, "SELECT text FROM comments WHERE mod IS NULL AND addr=%"fext"d", addr);
if(sqlhasresult(userdb, sql)) //there is a comment already
@ -247,7 +283,7 @@ bool commentget(uint addr, char* text)
return false;
char modname[35]="";
char sql[deflen]="";
if(!modnamefromaddr(addr, modname)) //comments without module
if(!modnamefromaddr(addr, modname, true)) //comments without module
sprintf(sql, "SELECT text FROM comments WHERE mod IS NULL AND addr=%"fext"d", addr);
else
sprintf(sql, "SELECT text FROM comments WHERE mod='%s' AND addr=%"fext"d", modname, addr-modbasefromaddr(addr));
@ -260,7 +296,7 @@ bool commentdel(uint addr)
return false;
char modname[35]="";
char sql[deflen]="";
if(!modnamefromaddr(addr, modname)) //comments without module
if(!modnamefromaddr(addr, modname, true)) //comments without module
sprintf(sql, "SELECT id FROM comments WHERE mod IS NULL AND addr=%"fext"d", addr);
else
{
@ -293,7 +329,7 @@ bool labelset(uint addr, const char* text)
sqlstringescape(text, labeltext);
char modname[35]="";
char sql[deflen]="";
if(!modnamefromaddr(addr, modname)) //labels without module
if(!modnamefromaddr(addr, modname, true)) //labels without module
{
sprintf(sql, "SELECT text FROM labels WHERE mod IS NULL AND addr=%"fext"d", addr);
if(sqlhasresult(userdb, sql)) //there is a label already
@ -327,7 +363,7 @@ bool labelget(uint addr, char* text)
return false;
char modname[35]="";
char sql[deflen]="";
if(!modnamefromaddr(addr, modname)) //labels without module
if(!modnamefromaddr(addr, modname, true)) //labels without module
sprintf(sql, "SELECT text FROM labels WHERE mod IS NULL AND addr=%"fext"d", addr);
else
sprintf(sql, "SELECT text FROM labels WHERE mod='%s' AND addr=%"fext"d", modname, addr-modbasefromaddr(addr));
@ -340,7 +376,7 @@ bool labeldel(uint addr)
return false;
char modname[35]="";
char sql[deflen]="";
if(!modnamefromaddr(addr, modname)) //labels without module
if(!modnamefromaddr(addr, modname, true)) //labels without module
sprintf(sql, "SELECT id FROM labels WHERE mod IS NULL AND addr=%"fext"d", addr);
else
{

View File

@ -14,17 +14,18 @@ struct MODINFO
{
uint base;
uint size;
char name[32];
char name[MAX_MODULE_SIZE];
char extension[MAX_MODULE_SIZE];
};
void dbinit();
bool dbsave();
bool dbload();
void dbclose();
bool modload(uint base, uint size, const char* name);
bool modload(uint base, uint size, const char* fullpath);
bool modunload(uint base);
void modclear();
bool modnamefromaddr(uint addr, char* modname);
bool modnamefromaddr(uint addr, char* modname, bool extension);
uint modbasefromaddr(uint addr);
uint modbasefromname(const char* modname);
bool apienumexports(uint base, EXPORTENUMCALLBACK cbEnum);

View File

@ -21,7 +21,7 @@ bool bpnew(uint addr, bool enabled, bool singleshoot, short oldbytes, BP_TYPE ty
char modname[256]="";
char sql[deflen]="";
char bpname[MAX_BREAKPOINT_NAME]="";
if(modnamefromaddr(addr, modname)) //no module
if(modnamefromaddr(addr, modname, true)) //no module
{
uint modbase=modbasefromaddr(addr);
if(name and *name)
@ -58,7 +58,7 @@ bool bpget(uint addr, BP_TYPE type, const char* name, BREAKPOINT* bp)
char modname[256]="";
char bpname[MAX_BREAKPOINT_NAME]="";
uint modbase=0;
if(!modnamefromaddr(addr, modname)) //no module
if(!modnamefromaddr(addr, modname, true)) //no module
{
if(bp)
*bp->mod=0;
@ -137,7 +137,7 @@ bool bpdel(uint addr, BP_TYPE type)
return false;
char modname[256]="";
char sql[deflen]="";
if(!modnamefromaddr(addr, modname)) //no module
if(!modnamefromaddr(addr, modname, true)) //no module
sprintf(sql, "DELETE FROM breakpoints WHERE addr=%"fext"d AND mod IS NULL AND type=%d", addr, type);
else
sprintf(sql, "DELETE FROM breakpoints WHERE addr=%"fext"d AND mod='%s' AND type=%d", addr-modbasefromaddr(addr), modname, type);
@ -158,7 +158,7 @@ bool bpenable(uint addr, BP_TYPE type, bool enable)
return false;
char modname[256]="";
char sql[deflen]="";
if(!modnamefromaddr(addr, modname)) //no module
if(!modnamefromaddr(addr, modname, true)) //no module
sprintf(sql, "UPDATE breakpoints SET enabled=%d WHERE addr=%"fext"d AND mod IS NULL AND type=%d", enable, addr, type);
else
sprintf(sql, "UPDATE breakpoints SET enabled=%d WHERE addr=%"fext"d AND mod='%s' AND type=%d", enable, addr-modbasefromaddr(addr), modname, type);
@ -180,7 +180,7 @@ bool bpsetname(uint addr, BP_TYPE type, const char* name)
char sql[deflen]="";
char bpname[MAX_BREAKPOINT_NAME]="";
sqlstringescape(name, bpname);
if(!modnamefromaddr(addr, modname)) //no module
if(!modnamefromaddr(addr, modname, true)) //no module
sprintf(sql, "UPDATE breakpoints SET name='%s' WHERE addr=%"fext"d AND mod IS NULL AND type=%d", bpname, addr, type);
else
sprintf(sql, "UPDATE breakpoints SET name='%s' WHERE addr=%"fext"d AND mod='%s' AND type=%d", bpname, addr-modbasefromaddr(addr), modname, type);
@ -278,6 +278,8 @@ void bpfixmemory(uint addr, unsigned char* dest, uint size)
unsigned char oldbytes[2];
for(int i=0; i<bpcount; i++)
{
if(!bpall[i].enabled or bpall[i].type!=BPNORMAL)
continue;
memcpy(oldbytes, &bpall[i].oldbytes, sizeof(short));
uint cur_addr=bpall[i].addr;
if(cur_addr>=start and cur_addr<end) //breakpoint is in range of current memory

View File

@ -69,6 +69,12 @@ static void cbUserBreakpoint()
dputs("breakpoint reached not in list!");
else
{
const char* bptype="INT3";
int titantype=bp.titantype;
if((titantype&UE_BREAKPOINT_TYPE_UD2)==UE_BREAKPOINT_TYPE_UD2)
bptype="UD2";
else if((titantype&UE_BREAKPOINT_TYPE_LONG_INT3)==UE_BREAKPOINT_TYPE_LONG_INT3)
bptype="LONG INT3";
const char* apiname=(const char*)ImporterGetAPINameFromDebugee(fdProcessInfo->hProcess, bp.addr);
char log[deflen]="";
if(apiname)
@ -85,16 +91,16 @@ static void cbUserBreakpoint()
break;
}
if(*bp.name)
sprintf(log, "breakpoint \"%s\" at %s.%s ("fhex")!", bp.name, dllname, apiname, bp.addr);
sprintf(log, "%s breakpoint \"%s\" at %s.%s ("fhex")!", bptype, bp.name, dllname, apiname, bp.addr);
else
sprintf(log, "breakpoint at %s.%s ("fhex")!", dllname, apiname, bp.addr);
sprintf(log, "%s breakpoint at %s.%s ("fhex")!", bptype, dllname, apiname, bp.addr);
}
else
{
if(*bp.name)
sprintf(log, "breakpoint \"%s\" at "fhex"!", bp.name, bp.addr);
sprintf(log, "%s breakpoint \"%s\" at "fhex"!", bptype, bp.name, bp.addr);
else
sprintf(log, "breakpoint at "fhex"!", bp.addr);
sprintf(log, "%s breakpoint at "fhex"!", bptype, bp.addr);
}
dputs(log);
if(bp.singleshoot)
@ -294,10 +300,10 @@ static void cbLoadDll(LOAD_DLL_DEBUG_INFO* LoadDll)
memset(&modInfo, 0, sizeof(modInfo));
modInfo.SizeOfStruct=sizeof(IMAGEHLP_MODULE64);
if(SymGetModuleInfo64(fdProcessInfo->hProcess, (DWORD64)base, &modInfo))
modload((uint)base, modInfo.ImageSize, modInfo.ModuleName);
modload((uint)base, modInfo.ImageSize, modInfo.ImageName);
bpenumall(0);
char modname[256]="";
if(modnamefromaddr((uint)base, modname))
if(modnamefromaddr((uint)base, modname, true))
bpenumall(cbSetModuleBreakpoints, modname);
}
@ -326,7 +332,7 @@ static void cbUnloadDll(UNLOAD_DLL_DEBUG_INFO* UnloadDll)
{
void* base=UnloadDll->lpBaseOfDll;
char modname[256]="???";
if(modnamefromaddr((uint)base, modname))
if(modnamefromaddr((uint)base, modname, true))
bpenumall(cbRemoveModuleBreakpoints, modname);
SymUnloadModule64(fdProcessInfo->hProcess, (DWORD64)base);
dprintf("DLL Unloaded: "fhex" %s\n", base, modname);
@ -366,10 +372,10 @@ static void cbCreateProcess(CREATE_PROCESS_DEBUG_INFO* CreateProcessInfo)
memset(&modInfo, 0, sizeof(modInfo));
modInfo.SizeOfStruct=sizeof(IMAGEHLP_MODULE64);
if(SymGetModuleInfo64(fdProcessInfo->hProcess, (DWORD64)base, &modInfo))
modload((uint)base, modInfo.ImageSize, modInfo.ModuleName);
modload((uint)base, modInfo.ImageSize, modInfo.ImageName);
bpenumall(0);
char modname[256]="";
if(modnamefromaddr((uint)base, modname))
if(modnamefromaddr((uint)base, modname, true))
bpenumall(cbSetModuleBreakpoints, modname);
}
@ -444,6 +450,7 @@ static DWORD WINAPI threadDebugLoop(void* lpParameter)
}
lock(WAITID_STOP);
strcpy(szFileName, init->exe);
BridgeSettingSet("Recent Files", "path", szFileName);
efree(init, "threadDebugLoop:init"); //free init struct
varset("$hp", (uint)fdProcessInfo->hProcess, true);
varset("$pid", fdProcessInfo->dwProcessId, true);
@ -621,7 +628,12 @@ CMDRESULT cbDebugSetBPX(const char* cmd) //bp addr [,name [,type]]
const char* bpname=0;
if(*argname)
bpname=argname;
if(IsBPXEnabled(addr) or !memread(fdProcessInfo->hProcess, (void*)addr, &oldbytes, sizeof(short), 0) or bpget(addr, BPNORMAL, bpname, 0) or !SetBPX(addr, type, (void*)cbUserBreakpoint) or !bpnew(addr, true, singleshoot, oldbytes, BPNORMAL, type, bpname))
if(bpget(addr, BPNORMAL, bpname, 0))
{
dputs("breakpoint already set!");
return STATUS_CONTINUE;
}
if(IsBPXEnabled(addr) or !memread(fdProcessInfo->hProcess, (void*)addr, &oldbytes, sizeof(short), 0) or !SetBPX(addr, type, (void*)cbUserBreakpoint) or !bpnew(addr, true, singleshoot, oldbytes, BPNORMAL, type, bpname))
{
dprintf("error setting breakpoint at "fhex"!\n", addr);
return STATUS_ERROR;
@ -921,7 +933,12 @@ CMDRESULT cbDebugSetMemoryBpx(const char* cmd)
bool singleshoot=false;
if(!restore)
singleshoot=true;
if(bpget(base, BPMEMORY, 0, 0) or !SetMemoryBPXEx(base, size, type, restore, (void*)cbMemoryBreakpoint) or !bpnew(base, true, singleshoot, 0, BPMEMORY, 0, 0))
if(bpget(base, BPMEMORY, 0, 0))
{
dputs("hardware breakpoint already set!");
return STATUS_CONTINUE;
}
if(!SetMemoryBPXEx(base, size, type, restore, (void*)cbMemoryBreakpoint) or !bpnew(base, true, singleshoot, 0, BPMEMORY, 0, 0))
{
dputs("error setting memory breakpoint!");
return STATUS_ERROR;
@ -931,6 +948,66 @@ CMDRESULT cbDebugSetMemoryBpx(const char* cmd)
return STATUS_CONTINUE;
}
static bool cbDeleteAllMemoryBreakpoints(const BREAKPOINT* bp)
{
if(!bp->enabled)
return true;
uint size;
memfindbaseaddr(fdProcessInfo->hProcess, bp->addr, &size);
if(!RemoveMemoryBPX(bp->addr, size) or !bpdel(bp->addr, BPMEMORY))
{
dprintf("delete memory breakpoint failed: "fhex"\n", bp->addr);
return STATUS_ERROR;
}
return true;
}
CMDRESULT cbDebugDeleteMemoryBreakpoint(const char* cmd)
{
char arg1[deflen]="";
if(!argget(cmd, arg1, 0, true)) //delete all breakpoints
{
if(!bpgetcount(BPMEMORY))
{
dputs("no memory breakpoints to delete!");
return STATUS_CONTINUE;
}
if(!bpenumall(cbDeleteAllMemoryBreakpoints)) //at least one deletion failed
return STATUS_ERROR;
dputs("all memory breakpoints deleted!");
GuiUpdateAllViews();
return STATUS_CONTINUE;
}
BREAKPOINT found;
if(bpget(0, BPMEMORY, arg1, &found)) //found a breakpoint with name
{
uint size;
memfindbaseaddr(fdProcessInfo->hProcess, found.addr, &size);
if(!RemoveMemoryBPX(found.addr, size) or !bpdel(found.addr, BPMEMORY))
{
dprintf("delete memory breakpoint failed: "fhex"\n", found.addr);
return STATUS_ERROR;
}
return STATUS_CONTINUE;
}
uint addr=0;
if(!valfromstring(arg1, &addr, 0, 0, true, 0) or !bpget(addr, BPMEMORY, 0, &found)) //invalid breakpoint
{
dprintf("no such memory breakpoint \"%s\"\n", arg1);
return STATUS_ERROR;
}
uint size;
memfindbaseaddr(fdProcessInfo->hProcess, found.addr, &size);
if(!RemoveMemoryBPX(found.addr, size) or !bpdel(found.addr, BPMEMORY))
{
dprintf("delete memory breakpoint failed: "fhex"\n", found.addr);
return STATUS_ERROR;
}
dputs("memory breakpoint deleted!");
GuiUpdateAllViews();
return STATUS_CONTINUE;
}
CMDRESULT cbDebugRtr(const char* cmd)
{
StepOver((void*)cbRtrStep);
@ -1002,7 +1079,12 @@ CMDRESULT cbDebugSetHardwareBreakpoint(const char* cmd)
}
int titantype=(drx<<8)|(type<<4)|size;
//TODO: hwbp in multiple threads TEST
if(bpget(addr, BPHARDWARE, 0, 0) or !SetHardwareBreakPoint(addr, drx, type, size, (void*)cbHardwareBreakpoint) or !bpnew(addr, true, false, 0, BPHARDWARE, titantype, 0))
if(bpget(addr, BPHARDWARE, 0, 0))
{
dputs("hardware breakpoint already set!");
return STATUS_CONTINUE;
}
if(!SetHardwareBreakPoint(addr, drx, type, size, (void*)cbHardwareBreakpoint) or !bpnew(addr, true, false, 0, BPHARDWARE, titantype, 0))
{
dputs("error setting hardware breakpoint!");
return STATUS_ERROR;
@ -1053,7 +1135,7 @@ CMDRESULT cbDebugDeleteHardwareBreakpoint(const char* cmd)
uint addr=0;
if(!valfromstring(arg1, &addr, 0, 0, true, 0) or !bpget(addr, BPHARDWARE, 0, &found)) //invalid breakpoint
{
dprintf("no such breakpoint \"%s\"\n", arg1);
dprintf("no such hardware breakpoint \"%s\"\n", arg1);
return STATUS_ERROR;
}
if(!DeleteHardwareBreakPoint((found.titantype>>8)&0xF) or !bpdel(found.addr, BPHARDWARE))

View File

@ -45,6 +45,7 @@ CMDRESULT cbDebugPause(const char* cmd);
CMDRESULT cbMemWrite(const char* cmd);
CMDRESULT cbStartScylla(const char* cmd);
CMDRESULT cbDebugDeleteHardwareBreakpoint(const char* cmd);
CMDRESULT cbDebugDeleteMemoryBreakpoint(const char* cmd);
//variables
extern PROCESS_INFORMATION* fdProcessInfo;

View File

@ -33,7 +33,6 @@ static CMDRESULT cbCls(const char* cmd)
static void registercommands()
{
COMMAND* cmd=command_list=cmdinit();
//cmdnew(cmd, "exit\1x", cbExit, false); //quit debugger
cmdnew(cmd, "strlen\1charcount\1ccount", cbStrLen, false); //get strlen, arg1:string
cmdnew(cmd, "varnew\1var", cbInstrVar, false); //make a variable arg1:name,[arg2:value]
cmdnew(cmd, "vardel", cbInstrVarDel, false); //delete a variable, arg1:variable name
@ -72,7 +71,8 @@ static void registercommands()
cmdnew(cmd, "lblc\1lbldel\1labeldel", cbInstrLbldel, true); //delete label
cmdnew(cmd, "savedb\1dbsave", cbSavedb, true); //save program database
cmdnew(cmd, "loaddb\1dbload", cbLoaddb, true); //load program database
cmdnew(cmd, "DeleteHardwareBreakpoint\1bphwc", cbDebugDeleteHardwareBreakpoint, true); //delete hardware breakpoint
cmdnew(cmd, "DeleteHardwareBreakpoint\1bphc\1bphwc", cbDebugDeleteHardwareBreakpoint, true); //delete hardware breakpoint
cmdnew(cmd, "DeleteMemoryBPX\1membpc\1bpmc", cbDebugDeleteMemoryBreakpoint, true); //delete memory breakpoint
}
static bool cbCommandProvider(char* cmd, int maxlen)

View File

@ -117,7 +117,7 @@ QString Disassembly::paintContent(QPainter* painter, int_t rowBase, int rowOffse
QString addrText=QString("%1").arg(cur_addr, sizeof(int_t)*2, 16, QChar('0')).toUpper();
if(DbgGetLabelAt(cur_addr, SEG_DEFAULT, label)) //has label
{
char module[MAX_LABEL_SIZE]="";
char module[MAX_MODULE_SIZE]="";
if(DbgGetModuleAt(cur_addr, module))
addrText+=" <"+QString(module)+"."+QString(label)+">";
else

View File

@ -88,8 +88,8 @@ void MemoryMapView::stateChangedSlot(DBGSTATE state)
setCellContent(wI, 1, wS);
// Module Name
char newMod[17]="";
memcpy(newMod, (wMemMapStruct.page)[wI].mod, 16);
char newMod[MAX_MODULE_SIZE]="";
strcpy(newMod, (wMemMapStruct.page)[wI].mod);
wS = QString(newMod);
setCellContent(wI, 2, wS);

View File

@ -122,7 +122,7 @@ bool BeaHighlight::PrintArgument(QList<CustomRichText_t>* richText, const ARGTYP
if(!label_addr)
label_addr=Instruction->AddrValue;
char label_text[MAX_LABEL_SIZE]="";
char module_text[33]="";
char module_text[MAX_MODULE_SIZE]="";
bool hasLabel=DbgGetLabelAt(label_addr, SEG_DEFAULT, label_text);
bool hasModule=DbgGetModuleAt(label_addr, module_text);
QString label_addr_text=QString("%1").arg(label_addr, 0, 16, QChar('0')).toUpper();;

View File

@ -86,6 +86,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
connect(ui->actionOpen,SIGNAL(triggered()),this,SLOT(openFile()));
connect(ui->actionPause,SIGNAL(triggered()),this,SLOT(execPause()));
connect(ui->actionScylla,SIGNAL(triggered()),this,SLOT(startScylla()));
connect(ui->actionRestart,SIGNAL(triggered()),this,SLOT(restartDebugging()));
}
@ -193,6 +194,20 @@ void MainWindow::startScylla() //this is executed
Bridge::getBridge()->execCmd("StartScylla");
}
void MainWindow::restartDebugging()
{
char filename[MAX_SETTING_SIZE]="";
if(!BridgeSettingGet("Recent Files", "path", filename))
return;
if(DbgIsDebugging())
{
Bridge::getBridge()->execCmd("stop"); //close current file (when present)
Sleep(400);
}
QString cmd;
Bridge::getBridge()->execCmd(cmd.sprintf("init \"%s\"", filename).toUtf8().constData());
}
void MainWindow::dragEnterEvent(QDragEnterEvent* pEvent)
{
if(pEvent->mimeData()->hasUrls())

View File

@ -39,6 +39,7 @@ public slots:
void openFile();
void execPause();
void startScylla();
void restartDebugging();
private slots:
void on_actionGoto_triggered();