how to find stack trace of "Error: 4invalid UTF-8 sequence" "Error: std.format int argument expected"?
Leandro Lucarella
llucax at gmail.com
Thu May 28 08:45:24 PDT 2009
nobody, el 28 de mayo a las 04:08 me escribiste:
> > From what I understand, you can set GDB to break whenever _d_throw is
> > called. I don't know the syntax.
>
> Thanks for the hint. I googled it, here's the way to do it:
>
> $ objdump -x your.exe | grep throw
> 0819c1e0 g F .text 00000217 _d_throw at 4
>
> (gdb) break *0x0819c1e0
> Breakpoint 1 at 0x819c1e0
>
> (gdb) r
> ...
>
> (gdb) where
> #0 0x0819c1e0 in _d_throw at 4 ()
> #1 0x081b397c in _D3std6format8doFormatFDFwZvAC8TypeInfoPvZv10getFmtStarMFZi
> ()
> #2 0x081b2207 in _D3std6format8doFormatFDFwZvAC8TypeInfoPvZv ()
> #3 0x081b19c9 in _D3std5stdio7writefxFPS3std1c5stdio6_iobufAC8TypeInfoPviZv ()
> #4 0x081b1ac4 in _D3std5stdio6writefFYv ()
>
>
> > If you don't want to use a debugger, there's always
> > printf/writefln/Stdout debugging.
>
> using writefln to find writefln errors? ;-)
When debugging C++, the stack trace shows the exact point where the
exception was thrown, so there is a way to get this right in D, I just
don't know how =)
--
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145 104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
More information about the Digitalmars-d
mailing list