delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/09/17/10:52:30

Date: Tue, 17 Sep 1996 16:42:10 +0200 (METDST)
From: Robert Hoehne <robert DOT hoehne AT mathematik DOT tu-chemnitz DOT de>
To: bug-gcc AT prep DOT ai DOT mit DOT edu
Cc: DJGPP workers <djgpp-workers AT delorie DOT com>
Subject: Patch for go32.h of gcc 2.7.2.1
Message-Id: <Pine.HPP.3.91.960917163941.2677A-100000@newton.mathematik.tu-chemnitz.de>
Mime-Version: 1.0

Here is a patch for the file
'go32.h' in the dircetory 'config/i386' of the gcc distribution.

The patch is against the file from gcc 2.7.2.1.

Description of the patch:
The patch allows the user of gcc on DJGPP to produce stabs debugging
information with the '-gstabs' commandline switch. This is very usefull
when debugging c++ programs because it is much bether than sdb debugging
information. The sdb debugging information is still the default setting.

And the next change handles a bug with emitting the right filename
in the generated assembler file. Currently the there is the dump_base_name
used, but this is not correct, because the gcc driver calls
cc1 or cc1plus with '-dumpbase fo.cc', even when compiling a file
'foo.cpp'. I have changed this to use the main_input_name, which
point to the correct filename.

This bug is related not only to DJGPP, but I cannot say something
about the other platforms, probably the same patch can be applied to
them.

Because the patch has to to only with the DJGPP port of gcc, it cannot
break anything on other platforms.

Robert Hoehne <robert DOT hoehne AT mathematik DOT tu-chemnitz DOT de>

*** config/i386/go32.h~	Tue Sep 17 16:35:22 1996
--- config/i386/go32.h	Tue Sep 17 16:35:33 1996
***************
*** 1,5 ****
--- 1,9 ----
  /* Configuration for an i386 running MS-DOS with djgpp/go32.  */
  
+ #define DBX_DEBUGGING_INFO /* support for stabs debugging info */
+ #define PREFERRED_DEBUGGING_TYPE SDB_DEBUG /* leave sdb as default */
+ #define NO_STAB_H /* DJGPP has no stab.h */
+ 
  /* Don't assume anything about the header files. */
  #define NO_IMPLICIT_EXTERN_C
  
***************
*** 61,64 ****
--- 65,77 ----
      fprintf (FILE, "\n");			\
    } while (0)
  
+ /* Output at beginning of assembler file.  */
+ /* The .file command should always begin the output.  */
+ /* Use the main_input_filename instead of dump_base_name */
+ 
+ #undef ASM_FILE_START
+ #define ASM_FILE_START(FILE)						\
+   do {									\
+ 	output_file_directive (FILE, main_input_filename);		\
+   } while (0)
  

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019