This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Is conversion of debug format of g++ to a native Windows format possible?


Sorry I hit send a bit too soon.-)

The "New" windows debug format is coff,
which gdb understands just fine.

VTune may only recognize CodeView, I don't know
but compiling with /ZI or /Zi will allow
you to use gdb with any MS .obj.

You can force the Microsoft Compiler/Linker to store the debug
information in the *.exe files

Look at the following help file from Developer Studio
--------------------------------------------------------------------
Note      To create a library that contains debugging information
without using .PDB files, you must select the compilers C7 Compatible
(/Z7) option and clear the linkers Use Program Database (/PDB:NONE)
option. If you use the precompiled headers options, debugging
information for both the precompiled header and the rest of the source
code is placed in the PDB. The /Yd option is ignored when the Program
Database option is specified.
------------------------------------------------------------------------

cl /GX /Yd /ZI world1.cpp /link /pdb:none /debugtype:coff

Sadly gdb can't currently read debug symbols when
they are put into the .rdata section, which is what link.exe
does with small projects. So the only solution TIKO
would be to use the ld.exe from

ftp://ftp.franken.de/pub/win32/develop/gnuwin32/mingw32/porters/Mikey/binutils294-ming.tar.bz2

to link.
You will need to patch the the linker script and
use the -T option to ld.exe, or rebuild the above
binutils with the following patch to src\ld\scripttempl\pe.sc

--- i386pe.x.~1~        Sat Nov 13 20:46:40 1999
+++ i386pe.x    Thu Mar 09 21:46:42 2000
@@ -54,9 +54,6 @@
   } =0x0000
   /DISCARD/ :
   {
-    *(.debug$S)
-    *(.debug$T)
-    *(.debug$F)
     *(.drectve)
   }
   .idata BLOCK(__section_alignment__) :
@@ -103,6 +100,10 @@
   .stabstr BLOCK(__section_alignment__) (NOLOAD) :
   {
     [ .stabstr ]
+  } =0x0000
+  .debug BLOCK(__section_alignment__) :
+  {
+    *(SORT(.debug$*))
   } =0x0000
 end = .; /* MS startup code needs this */
 }


On Thu, 9 Mar 2000 11:16:39 -0500, you wrote:

>On Thu, Mar 09, 2000 at 04:53:23PM +0100, Max Griessl wrote:
>>Is it possible to convert the debug format produced by g++ (i.e.  for
>>C++ files) to a native Windows format which is correctly handled by
>>e.g.  VTune of Intel?
>
>I wish.  I would love to be able to convert back and forth between the
>two formats or, better, have bfd/gdb understand Microsoft format.
>
>I'm not aware of any such functionality but I'm sure that Mumit Khan can
>give a definitive answer.
>
>cgf


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]