Problem with debugging in Linux

Piotrek starpit at tlen.pl
Wed Jul 15 14:52:26 PDT 2009


Qian Xu pisze:
> grauzone wrote:
> 
>> It works with dmd 1.046 on Linux. The backtrace I'm getting is:
>>
>> Maybe that bug got fixed. Could it have to do with the changelog entry
>> "Fix instruction scheduler bug on Linux"?
> 
> 
> Thanks. It works with dmd 1.046.
> 
> Qian
> 

So, does gdb 6.8 work with dmd 1.046 binaries? I've tried it on ubuntu 
with the out-of-the-box gdb installation but no success (Using -g or -gc 
switch)

piotrek at yeti:~/Pulpit/dmd/linux/bin$ ./dmd -g test.d
piotrek at yeti:~/Pulpit/dmd/linux/bin$ gdb test
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) break test.d:9
Breakpoint 1 at 0x8049b19: file test.d, line 9.
(gdb) run
Starting program: /home/piotrek/Pulpit/dmd/linux/bin/test
[Thread debugging using libthread_db enabled]
Hello World, Reloaded
[New Thread 0xb7ec76d0 (LWP 8479)]
[Switching to Thread 0xb7ec76d0 (LWP 8479)]

Breakpoint 1, 0x08049b19 in _Dmain ()
Current language:  auto; currently asm
(gdb) list
1	import std.stdio;
2	
3	
4	void main(string[] args)
5	{
6	    writefln("Hello World, Reloaded");
7		
8		int d = 1;
9		d++;
10		d--;
(gdb) print d
No symbol "a" in current context.
(gdb)

Cheers
Piotrek



More information about the Digitalmars-d mailing list