Jump to page: 1 2 3
Thread overview
[dmd-beta] dmd 1.060 and 2.045 beta
May 03, 2010
Walter Bright
May 03, 2010
Bernard Helyer
May 03, 2010
Robert Clipsham
May 03, 2010
Walter Bright
May 03, 2010
Robert Clipsham
May 03, 2010
Walter Bright
May 03, 2010
Jason House
May 03, 2010
Robert Clipsham
May 03, 2010
Jason House
May 04, 2010
Jason House
May 04, 2010
Walter Bright
May 04, 2010
Jason House
May 04, 2010
Robert Clipsham
May 04, 2010
Walter Bright
May 04, 2010
Robert Clipsham
May 04, 2010
Jason House
May 04, 2010
Walter Bright
May 03, 2010
Robert Clipsham
May 03, 2010
Bernard Helyer
May 03, 2010
Walter Bright
May 03, 2010
Bernard Helyer
May 04, 2010
Rainer Schuetze
May 04, 2010
Walter Bright
May 02, 2010
Attempt again to fix the dwarf problems.

http://ftp.digitalmars.com/dmd1beta.zip http://ftp.digitalmars.com/dmd2beta.zip
May 03, 2010
On 03/05/10 18:57, Walter Bright wrote:
> Attempt again to fix the dwarf problems.
>
> http://ftp.digitalmars.com/dmd1beta.zip
> http://ftp.digitalmars.com/dmd2beta.zip
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>

The GDB test case I've been using is still broken.
May 03, 2010
On 03/05/10 07:57, Walter Bright wrote:
> Attempt again to fix the dwarf problems.
>
> http://ftp.digitalmars.com/dmd1beta.zip http://ftp.digitalmars.com/dmd2beta.zip

This beta does not fix the DWARF issues, the following test case still fails:

----
void function(void function(void function())) foobar;

void main()
{
     foobar(null);
}
----

This said, building dmd r466 from the repository myself causes everything to work nicely. My guess is you haven't updated the binary... That or something works differently when dmd is compiled in debug mode.

Is there any chance you could take a look at including http://d.puremagic.com/issues/show_bug.cgi?id=3214 too? It might be a good idea to apply it in svn just after this release, so we don't end up breaking debug info again though, and it'll give it more chance to get it tested properly. Seems to work from my quick tests, but my quick tests are the reason we're having this release :/

Thanks :)

May 03, 2010

Robert Clipsham wrote:
> On 03/05/10 07:57, Walter Bright wrote:
>> Attempt again to fix the dwarf problems.
>>
>> http://ftp.digitalmars.com/dmd1beta.zip http://ftp.digitalmars.com/dmd2beta.zip
>
> This beta does not fix the DWARF issues, the following test case still fails:
>

No surprise, as in my build process I inadvertently copied over the new dwarf.c with the old one. I've fixed that with a new upload of the beta's.

The real problem, though, is I don't have a good way to automatically test the integrity of the dwarf output.
May 03, 2010
On 03/05/10 19:49, Walter Bright wrote:
> No surprise, as in my build process I inadvertently copied over the new dwarf.c with the old one. I've fixed that with a new upload of the beta's.
>
> The real problem, though, is I don't have a good way to automatically test the integrity of the dwarf output.

The following should do the trick:
----
for f in `find debug_tests -name \*.d`; do
  exe="debug_tests/`basename "$f" .d`"
  dmd -gc "$f" "-of$exe"
  if [ "`gdb -ex "b _Dmain" --batch $exe |& wc -l`" != "0" ]; then
   echo fail gdb: $exe;
  fi
  if [ "`objdump --dwarf $exe >/dev/null |& wc -l`" != "0" ]; then
   echo fail objdump: $exe;
  fi
done
----
If you have dwarfdump installed you can use the --verify switch too to test these too (and I advise you do this in addition to them, I don't have it installed to adapt the script for you though). There's probably a more elegant way to test this, this was just a quick hack to get it working/automated. Here's a set of test files for your debug_tests dir to get you started (I hereby release the following and previous code under Boost or any other license you wanna distribute them under):

fptr1.d:
----
void function() a;
void main()
{
   a();
}
----

fptr2.d:
----
void function(void function(int, string)) a;
void main()
{
   a(null);
}
----

fptr3.d:
----
void function(void function(void function())) a;
void main()
{
   a(null);
}
----

fptr4.d:
----
string function(ref int) a;
void main()
{
  int mi;
  a(mi);
}
----

wchr.d:
----
void main()
{
  wchar mwc;
}
----

These test cases cover most, if not all of the debug issues I've fixed, I've undoubtedly missed a few though. Hope this helps :)

Robert

May 04, 2010
Okay, now GDB appears to be working. That debugging printf is still in there, though. Not sure about the loop when you misspell an identifier.

On 04/05/10 06:49, Walter Bright wrote:
>
>
> Robert Clipsham wrote:
>> On 03/05/10 07:57, Walter Bright wrote:
>>> Attempt again to fix the dwarf problems.
>>>
>>> http://ftp.digitalmars.com/dmd1beta.zip http://ftp.digitalmars.com/dmd2beta.zip
>>
>> This beta does not fix the DWARF issues, the following test case still fails:
>>
>
> No surprise, as in my build process I inadvertently copied over the new dwarf.c with the old one. I've fixed that with a new upload of the beta's.
>
> The real problem, though, is I don't have a good way to automatically
> test the integrity of the dwarf output.
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
May 03, 2010
Thanks, this helps a lot. Does the current beta work?

Robert Clipsham wrote:
> On 03/05/10 19:49, Walter Bright wrote:
>> No surprise, as in my build process I inadvertently copied over the new dwarf.c with the old one. I've fixed that with a new upload of the beta's.
>>
>> The real problem, though, is I don't have a good way to automatically test the integrity of the dwarf output.
>
> The following should do the trick:
> ----
> for f in `find debug_tests -name \*.d`; do
>  exe="debug_tests/`basename "$f" .d`"
>  dmd -gc "$f" "-of$exe"
>  if [ "`gdb -ex "b _Dmain" --batch $exe |& wc -l`" != "0" ]; then
>   echo fail gdb: $exe;
>  fi
>  if [ "`objdump --dwarf $exe >/dev/null |& wc -l`" != "0" ]; then
>   echo fail objdump: $exe;
>  fi
> done
> ----
> If you have dwarfdump installed you can use the --verify switch too to test these too (and I advise you do this in addition to them, I don't have it installed to adapt the script for you though). There's probably a more elegant way to test this, this was just a quick hack to get it working/automated. Here's a set of test files for your debug_tests dir to get you started (I hereby release the following and previous code under Boost or any other license you wanna distribute them under):
>
> fptr1.d:
> ----
> void function() a;
> void main()
> {
>   a();
> }
> ----
>
> fptr2.d:
> ----
> void function(void function(int, string)) a;
> void main()
> {
>   a(null);
> }
> ----
>
> fptr3.d:
> ----
> void function(void function(void function())) a;
> void main()
> {
>   a(null);
> }
> ----
>
> fptr4.d:
> ----
> string function(ref int) a;
> void main()
> {
>  int mi;
>  a(mi);
> }
> ----
>
> wchr.d:
> ----
> void main()
> {
>  wchar mwc;
> }
> ----
>
> These test cases cover most, if not all of the debug issues I've fixed, I've undoubtedly missed a few though. Hope this helps :)
>
> Robert
>
> _______________________________________________
> dmd-beta mailing list
> dmd-beta at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-beta
>
>
May 03, 2010
On May 3, 2010, at 5:13 PM, Walter Bright <walter at digitalmars.com> wrote:

> Thanks, this helps a lot. Does the current beta work?

I'll test it on my project later tonight.
May 03, 2010
On 03/05/10 22:13, Walter Bright wrote:
> Thanks, this helps a lot. Does the current beta work?

No problem :) Bernard Helyer reports his test cases as working, and all my tests are passing, so I hope *fingers crossed* all is well now! If you'd like to run that test suite at your end to double check it wouldn't hurt (note it'll only pass on linux/freebsd/opensolaris atm, OS X debug info doesn't work due to http://d.puremagic.com/issues/show_bug.cgi?id=4154 which isn't fully patched yet).

Thanks for putting all this effort in to get debug info working :)

May 03, 2010
On 03/05/10 22:23, Jason House wrote:
> I'll test it on my project later tonight.

I've just tested on your behalf, it works now :)

« First   ‹ Prev
1 2 3