Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com From: Mikey To: cygwin AT sourceware DOT cygnus DOT com Subject: Re: Is conversion of debug format of g++ to a native Windows format possible? Date: Thu, 09 Mar 2000 23:14:54 -0700 Organization: Never Reply-To: jrson AT freewwweb DOT com Message-ID: <9e0hcss42uaoci8iojscasidrdotudqlaj@4ax.com> References: <200003091553 DOT QAA19258 AT intrams DOT rz DOT idtinc DOT de> <20000309111639 DOT I30934 AT cygnus DOT com> In-Reply-To: <20000309111639.I30934@cygnus.com> X-Mailer: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 AT sourceware DOT cygnus DOT com