October 06, 2009 Re: dmd 1.048 and 2.033 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | Vladimir Panteleev wrote:
> On Mon, 05 Oct 2009 10:54:22 +0300, Walter Bright <newshound1@digitalmars.com> wrote:
>
>> gdb stack trace should work now
>
> Could someone please elaborate on this a bit (what exactly was changed), or at least point to the respective SVN revision or something?
>
All the changes are in dwarf.c.
|
October 06, 2009 Re: dmd 1.048 and 2.033 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Denis Koroskin | Denis Koroskin wrote:
<snip>
> int bar() @property
> {
> return 42;
> }
What is @ going to be used for generally? (What is the essential difference between an attribute that's an @word and one that's a simple keyword before or after the type?)
Stewart.
|
October 06, 2009 Re: dmd 1.048 and 2.033 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Which gdb should this release work with?
I seem to have misplaced my patched gdb. The standard gdb 6.8 can show backtraces but can't list code, even if the code is linked in libraries from C++.
Walter Bright wrote:
> Another OSX 10.5 release :-)
>
> Anyhow, this should work with gdb now, and has contract inheritance
> (finally).
>
> http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.048.zip
>
>
> http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.033.zip
>
> Many thanks to the numerous people who contributed to this update.
|
October 06, 2009 Re: dmd 1.048 and 2.033 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jason House | Jason House wrote:
> Which gdb should this release work with?
>
> I seem to have misplaced my patched gdb. The standard gdb 6.8 can show backtraces but can't list code, even if the code is linked in libraries from C++.
If you're using the standard gdb, try compiling with -gc. I'm using whatever gdb came with Ubuntu.
|
October 06, 2009 Re: dmd 1.048 and 2.033 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jason House | Jason House wrote: > The standard gdb 6.8 can show backtraces but can't list code, even if the code is linked in libraries from C++. Can gdb *always* list code for you? For me, it sometimes does, sometimes doesn't. ---- cut here ---- % cat -n foo.d 1 import std.stdio; 2 3 void main() 4 { 5 *(cast(ubyte*)0) = 0; // intentional SEGV 6 // writefln("hello"); 7 } % dmd -gc foo.d; /usr/bin/gdb --quiet ./foo (gdb) run Starting program: /home/miura/work/foo [Thread debugging using libthread_db enabled] [New Thread 0xb7dde6f0 (LWP 12300)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0xb7dde6f0 (LWP 12300)] 0x08049239 in _Dmain () at foo.d:5 5 *(cast(ubyte*)0) = 0; // intentional SEGV (gdb) list 1 import std.stdio; 2 3 void main() 4 { 5 *(cast(ubyte*)0) = 0; // intentional SEGV 6 // writefln("hello"); 7 } (gdb) backtrace #0 0x08049239 in _Dmain () at foo.d:5 #1 0x08049514 in _D2rt6dmain24mainUiPPaZi7runMainMFZv () #2 0x0804931d in _D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv () #3 0x08049556 in _D2rt6dmain24mainUiPPaZi6runAllMFZv () #4 0x0804931d in _D2rt6dmain24mainUiPPaZi7tryExecMFMDFZvZv () #5 0x080492c8 in main () (gdb) ---- cut here ---- Uncomment the line 6, and gdb is now unable to list code: ---- cut here ---- % dmd -gc foo.d; /usr/bin/gdb --quiet ./foo (gdb) run Starting program: /home/miura/work/foo [Thread debugging using libthread_db enabled] [New Thread 0xb7d696f0 (LWP 12311)] Dwarf Error: Cannot find DIE at 0x846 referenced from DIE at 0x165 [in module /home/miura/work/foo] (gdb) list 1 // Written in the D programming language. 2 3 /** 4 Standard I/O functions that extend $(B std.c.stdio). $(B std.c.stdio) 5 is $(D_PARAM public)ally imported when importing $(B std.stdio). 6 7 Macros: 8 WIKI=Phobos/StdStdio 9 10 Copyright: Copyright Digital Mars 2007 - 2009. Dwarf Error: Cannot find DIE at 0x846 referenced from DIE at 0x165 [in module /home/miura/work/foo] (gdb) backtrace Dwarf Error: Cannot find DIE at 0x846 referenced from DIE at 0x165 [in module /home/miura/work/foo] Dwarf Error: Cannot find DIE at 0x846 referenced from DIE at 0x165 [in module /home/miura/work/foo] (gdb) ---- cut here ---- That's Kubuntu 32bit 9.04, gdb 6.8, and DMD 2.033. |
October 06, 2009 Re: dmd 1.048 and 2.033 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to MIURA Masahiro | MIURA Masahiro wrote:
> Uncomment the line 6, and gdb is now unable to list code:
Please post to bugzilla.
|
October 06, 2009 Re: dmd 1.048 and 2.033 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > Please post to bugzilla. Done! http://d.puremagic.com/issues/show_bug.cgi?id=3368 |
October 06, 2009 Re: dmd 1.048 and 2.033 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | Stewart Gordon Wrote:
> What is @ going to be used for generally? (What is the essential difference between an attribute that's an @word and one that's a simple keyword before or after the type?)
Annotations can be user-defined and can contain data.
|
October 07, 2009 Re: dmd 1.048 and 2.033 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright Wrote:
> Jason House wrote:
> > Which gdb should this release work with?
> >
> > I seem to have misplaced my patched gdb. The standard gdb 6.8 can show backtraces but can't list code, even if the code is linked in libraries from C++.
>
> If you're using the standard gdb, try compiling with -gc. I'm using whatever gdb came with Ubuntu.
My mini dmd test omitted that... Oops
It turns out the issue with my larger project was that g++ -g -O3 generates really, really bad debug info. So bad that it's practically unusable. Removing -O3 did wonders...
|
October 11, 2009 Re: dmd 1.048 and 2.033 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kagamin | Kagamin wrote:
> Stewart Gordon Wrote:
>
>> What is @ going to be used for generally? (What is the essential difference between an attribute that's an @word and one that's a simple keyword before or after the type?)
>
> Annotations can be user-defined and can contain data.
But @property clearly cannot be user-defined, unless it's merely a new kind of documentation comment with no meaning as far as the language is concerned. So what is its status as an annotation being used for here?
Stewart.
|
Copyright © 1999-2021 by the D Language Foundation