Code::Blocks
Jascha Wetzel
firstname at mainia.de
Mon Jun 25 09:38:50 PDT 2007
nobody wrote:
> The ddbg work an a Console but i didn't understand the usage
> from the command line. I can't find any example, anyway.
damn, some inner voice told me that it wasn't a good idea to remove that
example from the docs ;)
so here is the old example again. i hope you can find out everything
beyond that from the help and the docs. i'll improve them sometime soon.
C:\ddbg> ddbg debuggee.exe
Ddbg v0.0.6 alpha - D Debugger
Copyright (c) 2007 Jascha Wetzel
http://ddbg.mainia.de/
->arg asdf qwer 1234
->lsm
debugees\debuggee.d segs=1 lines=85
->bp deb:190
Breakpoint set: debugees\debuggee.d:190 0x40261a
->r
ntdll.dll loaded
KERNEL32.dll loaded
USER32.dll loaded
GDI32.dll loaded
IMM32.dll loaded
ADVAPI32.dll loaded
RPCRT4.dll loaded
LPK.dll loaded
USP10.dll loaded
msvcrt.dll loaded
Hello world, here are my args:
Breakpoint 0 hit
debugees\debuggee.d:190 0x40261a
uint num_chars = printArgs(args);
->= (cast(char[][])args)[0][3..12]
"ddbg\debu"
->= (cast(char[][uint])testhash)[345]
"asdf"
->in
debugees\debuggee.d:79 0x4020cc
uint printArgs(char[][] _D4argsAAa)
->
debugees\debuggee.d:81 0x4020d2
uint numchars;
->dal
debugees\debuggee.d:81 uint numchars;
004020d2: c745d800000000 mov dword [ebp-0x28], 0x0
->out
arg #0: C:\ddbg\debuggee.exe
arg #1: asdf
arg #2: qwer
arg #3: 1234
arg #0: C:\ddbg\debuggee.exe
arg #1: asdf
arg #2: qwer
arg #3: 1234
Unhandled D Exception (std.array.ArrayBoundsError "ArrayBoundsError
debuggee(65)") at KERNEL32.dll (0x7c812a5b)
->us
#0 0x7c812a5b in ?? () from KERNEL32.dll
#1 0x00406124 in __d_throw at 4 () from deh
#2 0x00402082 in debuggee.class2.test2 () at debugees\debuggee.d:65
#3 0x00402152 in debuggee.printArgs (char[][] args =
0x0012ff3400000004) at debugees\debuggee.d:103
#4 0x00402625 in _Dmain (args = 0x0012ff3400000004) at
debugees\debuggee.d:190
#5 0x0040540c in _main () from dmain2
#6 0x0040bdd5 in _mainCRTStartup () from constart
#7 0x7c816fd7 in ?? () from KERNEL32.dll
->q
> I get the error message:
>
> dmd.exe -g -IC:\dd\dmd\src\phobos -IC:\dd -c C:\dd\hello.d -ofC:\dd\hello.obj
you don't need to call the linker separately unless you really know why.
all you need to do is:
cd c:\dd
dmd -g hello.d
More information about the Digitalmars-d-learn
mailing list