Real World usage of D, Today (was Re: challenge #2: implement the varargs_reduce metafunction)

Thomas Kuehne thomas-dloop at kuehne.cn
Wed Jan 24 14:28:29 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thomas Kuehne schrieb am 2007-01-24:
>
> Sean Kelly schrieb am 2007-01-24:
> [...]
>> For the record, I read through the Phobos code looking for the problem 
>> but nothing jumped out at me (and the lack of a usable stack trace 
>> didn't help much). 
>
> Have you tried Flectioned's Trace.getTrace() ?

The latest version contains a convenince function for
gdb. Simply issue the gdb command "call print_trace ($ebp)" to print a
stack trace.

Sample session:
# gdb ./y
# GNU gdb 6.4
[...]
# (gdb) run
# Starting program: /tmp/y 
# [Thread debugging using libthread_db enabled]
# [New Thread 4158613168 (LWP 18759)]
#
# Program received signal SIGSEGV, Segmentation fault.
# [Switching to Thread 4158613168 (LWP 18759)]
# 0x0804f312 in _D3deb3fooFiZv ()
# (gdb) call print_trace($ebp)
# 0xFFC81E24      0x804F30B       void deb.foo(int) (0x804F2F0, 39)
# 0xFFC81E30      0x804F30B       void deb.foo(int) (0x804F2F0, 39)
# 0xFFC81E38      0x804F325       int main(char[][]) (0x804F318, 17)
# 0xFFC81E68      0x8050B7B       extern(C) int main(int, char**)

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFFt+kwLK5blCcjpWoRAuMEAJwJRj4bDV0iOT3AEPVc+iPECYLiMwCfeiFq
qssaJ0ke1hFWvMCn6laWMco=
=D9Ih
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list