Thread overview
debugging
Jan 15, 2004
imr1984
Jan 18, 2004
Walter
gdb not working? Re: debugging
Jan 18, 2004
nobody
Jan 24, 2004
Walter
Jan 24, 2004
nobody
Apr 23, 2004
Ant
January 15, 2004
So the compiler can generate debugging information. How do we use it? Is there some program available that supports D debugging info?


January 18, 2004
"imr1984" <imr1984_member@pathlink.com> wrote in message news:bu5njn$1fk2$1@digitaldaemon.com...
> So the compiler can generate debugging information. How do we use it? Is
there
> some program available that supports D debugging info?

Any debugger that uses standard debugging information. If using linux, you can use gdb. If using Windows, you can use, for example, Microsoft's windbg.exe program (which comes on the DMC++ CD).


January 18, 2004
In article <buemru$13fd$1@digitaldaemon.com>, Walter says...
>
>Any debugger that uses standard debugging information. If using linux, you can use gdb. If using Windows, you can use, for example, Microsoft's windbg.exe program (which comes on the DMC++ CD).
>

gdb seems not working, or I miss something?

[d] dmd -v -g -debug hello.d
parse     hello
semantic  hello
semantic2 hello
semantic3 hello
code      hello
generating code for function 'main'
gcc hello.o -o hello -g -lphobos -lpthread -lm

[d] ./hello a b c
hello world
args.length = 4
args[0] = './hello'
args[1] = 'a'
args[2] = 'b'
args[3] = 'c'
[d] which gdb
/usr/bin/gdb
[d] gdb hello
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
(gdb) b hello.d:5
No source file named hello.d.
(gdb) b main
Breakpoint 1 at 0x8049471
(gdb) run
Starting program: /mnt/hdH/project/dmd/samples/d/hello
[New Thread 16384 (LWP 1256)]
[Switching to Thread 16384 (LWP 1256)]

Breakpoint 1, 0x08049471 in main ()
(gdb) step
Single stepping until exit from function main,
which has no line number information.
hello world
args.length = 1
args[0] = '/mnt/hdH/project/dmd/samples/d/hello'
0x400ac4ed in __libc_start_main () from /lib/libc.so.6
(gdb) step
Single stepping until exit from function __libc_start_main,
which has no line number information.

Program exited normally.


January 24, 2004
I'm no expert on gdb, but I am able to get it to work. I don't know why it couldn't find hello.d for you, is it in your default directory?

<nobody@no.where> wrote in message news:buf4h5$1q4u$1@digitaldaemon.com...
> In article <buemru$13fd$1@digitaldaemon.com>, Walter says...
> >
> >Any debugger that uses standard debugging information. If using linux,
you
> >can use gdb. If using Windows, you can use, for example, Microsoft's windbg.exe program (which comes on the DMC++ CD).
> >
>
> gdb seems not working, or I miss something?
>
> [d] dmd -v -g -debug hello.d
> parse     hello
> semantic  hello
> semantic2 hello
> semantic3 hello
> code      hello
> generating code for function 'main'
> gcc hello.o -o hello -g -lphobos -lpthread -lm
>
> [d] ./hello a b c
> hello world
> args.length = 4
> args[0] = './hello'
> args[1] = 'a'
> args[2] = 'b'
> args[3] = 'c'
> [d] which gdb
> /usr/bin/gdb
> [d] gdb hello
> GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
> Copyright 2003 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
are
> welcome to change it and/or distribute copies of it under certain
conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
details.
> This GDB was configured as "i386-redhat-linux-gnu"...
> (gdb) b hello.d:5
> No source file named hello.d.
> (gdb) b main
> Breakpoint 1 at 0x8049471
> (gdb) run
> Starting program: /mnt/hdH/project/dmd/samples/d/hello
> [New Thread 16384 (LWP 1256)]
> [Switching to Thread 16384 (LWP 1256)]
>
> Breakpoint 1, 0x08049471 in main ()
> (gdb) step
> Single stepping until exit from function main,
> which has no line number information.
> hello world
> args.length = 1
> args[0] = '/mnt/hdH/project/dmd/samples/d/hello'
> 0x400ac4ed in __libc_start_main () from /lib/libc.so.6
> (gdb) step
> Single stepping until exit from function __libc_start_main,
> which has no line number information.
>
> Program exited normally.
>
>


January 24, 2004
In article <but689$a5d$2@digitaldaemon.com>, Walter says...
>
>I'm no expert on gdb, but I am able to get it to work. I don't know why it couldn't find hello.d for you, is it in your default directory?
>

All the command is issued from the same dir:

dmd/samples/d

so it should be able to see hello.d

Which version of gdb you're using?  and which Linux distribution (RedHat 9.0)?


April 23, 2004
On Fri, 23 Jan 2004 21:12:39 -0800, Walter wrote:

What's the word on this?
I'm trying to use gdb (with DDD frontend) and having the same
problem.
I can see all the GTK+ sources (C of course) but not
my D program (some DUI test).

Can some post the status of debuging on linux?
An entry on the wiki FAQ would be nice.

Ant

> I'm no expert on gdb, but I am able to get it to work. I don't know why it couldn't find hello.d for you, is it in your default directory?
> 
> <nobody@no.where> wrote in message news:buf4h5$1q4u$1@digitaldaemon.com...
>> In article <buemru$13fd$1@digitaldaemon.com>, Walter says...
>> >
>> >Any debugger that uses standard debugging information. If using linux,
> you
>> >can use gdb. If using Windows, you can use, for example, Microsoft's windbg.exe program (which comes on the DMC++ CD).
>> >
>>
>> gdb seems not working, or I miss something?
>>
>> [d] dmd -v -g -debug hello.d
>> parse     hello
>> semantic  hello
>> semantic2 hello
>> semantic3 hello
>> code      hello
>> generating code for function 'main'
>> gcc hello.o -o hello -g -lphobos -lpthread -lm
>>
>> [d] ./hello a b c
>> hello world
>> args.length = 4
>> args[0] = './hello'
>> args[1] = 'a'
>> args[2] = 'b'
>> args[3] = 'c'
>> [d] which gdb
>> /usr/bin/gdb
>> [d] gdb hello
>> GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
>> Copyright 2003 Free Software Foundation, Inc.
>> GDB is free software, covered by the GNU General Public License, and you
> are
>> welcome to change it and/or distribute copies of it under certain
> conditions.
>> Type "show copying" to see the conditions.
>> There is absolutely no warranty for GDB.  Type "show warranty" for
> details.
>> This GDB was configured as "i386-redhat-linux-gnu"...
>> (gdb) b hello.d:5
>> No source file named hello.d.
>> (gdb) b main
>> Breakpoint 1 at 0x8049471
>> (gdb) run
>> Starting program: /mnt/hdH/project/dmd/samples/d/hello
>> [New Thread 16384 (LWP 1256)]
>> [Switching to Thread 16384 (LWP 1256)]
>>
>> Breakpoint 1, 0x08049471 in main ()
>> (gdb) step
>> Single stepping until exit from function main,
>> which has no line number information.
>> hello world
>> args.length = 1
>> args[0] = '/mnt/hdH/project/dmd/samples/d/hello'
>> 0x400ac4ed in __libc_start_main () from /lib/libc.so.6
>> (gdb) step
>> Single stepping until exit from function __libc_start_main,
>> which has no line number information.
>>
>> Program exited normally.
>>
>>