October 22, 2013
On 23 October 2013 01:02, Iain Buclaw <ibuclaw@ubuntu.com> wrote:

> On 22 October 2013 15:58, David Nadlinger <code@klickverbot.at> wrote:
> > On Tuesday, 22 October 2013 at 14:39:55 UTC, Manu wrote:
> >>
> >> Well whatever object format it is, it seems it's not COFF by default, [...]
> >
> >
> > ---
> > $ gcc --version && gcc -c test.c && file test.o
> > gcc.exe (rubenvb-4.8.0) 4.8.0
> > Copyright (C) 2013 Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions.  There is
> NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE.
> >
> > test.o: MS Windows COFF Intel 80386 object file
> > ---
> >
>
> Thanks for having faith in my words... :o)
>

...okay. Ignore me!
You said "GCC _is able_ to emit COFF object code", which didn't make it
sound like it did, or at least not by default. Which seemed to match my
experience (from years ago).
I recall a conversation with Daniel Green about making a special
COFF-outputting toolchain for me.
So what debuginfo is in there then? MS link.exe seemed to ignore it.

So, you are saying that GDC does output COFF by default? And is debuggable
by gdb?
I'm thoroughly confused now, this seems to contradict past experiences.
Apparently I've been smoking a lot of crack...
What are the object+debuginfo formats supported by LDC?


October 22, 2013
On 22 October 2013 16:59, Manu <turkeyman@gmail.com> wrote:
> On 23 October 2013 01:02, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
>>
>> On 22 October 2013 15:58, David Nadlinger <code@klickverbot.at> wrote:
>> > On Tuesday, 22 October 2013 at 14:39:55 UTC, Manu wrote:
>> >>
>> >> Well whatever object format it is, it seems it's not COFF by default, [...]
>> >
>> >
>> > ---
>> > $ gcc --version && gcc -c test.c && file test.o
>> > gcc.exe (rubenvb-4.8.0) 4.8.0
>> > Copyright (C) 2013 Free Software Foundation, Inc.
>> > This is free software; see the source for copying conditions.  There is
>> > NO
>> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> > PURPOSE.
>> >
>> > test.o: MS Windows COFF Intel 80386 object file
>> > ---
>> >
>>
>> Thanks for having faith in my words... :o)
>
>
> ...okay. Ignore me!
> You said "GCC _is able_ to emit COFF object code", which didn't make it
> sound like it did, or at least not by default. Which seemed to match my
> experience (from years ago).
> I recall a conversation with Daniel Green about making a special
> COFF-outputting toolchain for me.
> So what debuginfo is in there then? MS link.exe seemed to ignore it.
>
> So, you are saying that GDC does output COFF by default? And is debuggable
> by gdb?
> I'm thoroughly confused now, this seems to contradict past experiences.
> Apparently I've been smoking a lot of crack...

Or eating the wrong mushrooms.

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
October 23, 2013
On 22/10/2013 14:48, Iain Buclaw wrote:
>
> If you are using GCC, you'll be using the GCC toolchain.  If you are
> using MSVC, you'll be using the MSVC toolchain.  It's as black and
> white as that.
>
>

I know. The point, for me at least, was not weather I could use GCC + MS debuggers or MS compilers + GDB. It was: if you use DMD (64 bit ATM) what debuggers can you use? Can you sucessfully use GDB? If not, could DMD be modified to supported whatever format GDB uses?

> Also, it's not likely DWARF debug information that it emits, as the
> COFF object format defines its own intrinsic symbolic debug format.
> GDB can't read CV8/PDB.

I think it's DWARF debug information, even for COFF and PE file format. If I run "info source" on a GDC compiled program, I get:
------
(gdb) info source
Current source file is ../../../gcc-4.6.1/libphobos/rt/dmain.d
Compilation directory is C:\crossdev\gdc\v2\build\i686-pc-mingw32\libphobos
Source language is d.
Compiled with DWARF 2 debugging format.
Does not include preprocessor macro info.
------

I suspect that what is happening is that by default GCC toolchain stores debug information in the COFF (and PE) file format in a non-standard way - it doesn't use the COFF debug standard but uses DWARF data format instead (DWARF "is independent of object file formats"). And that's why MS tools don't understand that symbolic info, I guess.


-- 
Bruno Medeiros - Software Engineer
October 23, 2013
On 22/10/2013 16:59, Manu wrote:
> ...okay. Ignore me!
> You said "GCC _is able_ to emit COFF object code", which didn't make it
> sound like it did, or at least not by default. Which seemed to match my
> experience (from years ago).
> I recall a conversation with Daniel Green about making a special
> COFF-outputting toolchain for me.
> So what debuginfo is in there then? MS link.exe seemed to ignore it.
>
> So, you are saying that GDC does output COFF by default? And is
> debuggable by gdb?
> I'm thoroughly confused now, this seems to contradict past experiences.
> Apparently I've been smoking a lot of crack...

See my OP. It seems by default GDC outputs COFF object file format, but with DWARF debug info.

But whatever format it is, GDB understands it quite well, that is for sure. GDC+GDB was the main configuration I tested when I was updating the Debuggers wiki page and see what kind of support there was.


-- 
Bruno Medeiros - Software Engineer
1 2 3
Next ›   Last »