🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #168

Workaround fixes for svr4 woes with -g.

#168
From: rfg
Date: Sat, 25 Jul 1992 15:23
88 lines
3476 bytes
Several people have reported problems with using g++ 2.2.2 under svr4
with the -g option (which causes DWARF debugging information to be
generated).  Specifically, there seem to have been two problems:

	o	The g++ front end was setting DECL_IGNORED_P on
		FUNCTION_DECL nodes when it should not have been, and

	o	the dwarfout.c implementation of support for inline
		functions (and inlined instances thereof) was not
		yet completed.

Both of these problems will be fixed in the next release of the compiler(s).

For the time being, people may wish to use the following work-around patches
in order to prevent further aborts when compiling C++ programs under
svr4 with the g++ compiler using the -g option.  THESE ARE NOT THE ACTUAL
AND FINAL FIXES.  They are only minimal work-arounds which prevent aborts.

Note that actually debugging g++ compiled code on svr4 systems will still
be problematic for some time to come, due to a large number of other
unresolved issues.  Nonetheless, I encourage people to continue to submit
bug reports whenever they see problems relating to g++ and the use of the
-g option under svr4.

These patches are for the 2.2.2 release of GCC/g++.

// Ron ("Loose Cannon") Guilmette
// Internet: rfg@ncd.com      uucp: ...uunet!ncd.com!rfg
// New new motto:  Quality control is a state of mind.


*** dwarfout.c-	Sat May 30 22:08:49 1992
--- dwarfout.c	Sat Jul 25 09:01:58 1992
*************** output_mem_loc_descriptor (rtl)
*** 1303,1308 ****
  
  	ASM_OUTPUT_DWARF_STACK_OP (asm_out_file, OP_BASEREG);
!         ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
! 				DBX_REGISTER_NUMBER (REGNO (rtl)));
  	break;
  
--- 1303,1311 ----
  
  	ASM_OUTPUT_DWARF_STACK_OP (asm_out_file, OP_BASEREG);
! 	if (is_pseudo_reg (rtl))
!           ASM_OUTPUT_DWARF_DATA4 (asm_out_file, (unsigned) -1);
! 	else
!           ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
! 				  DBX_REGISTER_NUMBER (REGNO (rtl)));
  	break;
  
*************** output_loc_descriptor (rtl)
*** 1359,1364 ****
      case REG:
  	ASM_OUTPUT_DWARF_STACK_OP (asm_out_file, OP_REG);
!         ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
! 				DBX_REGISTER_NUMBER (REGNO (rtl)));
  	break;
  
--- 1362,1370 ----
      case REG:
  	ASM_OUTPUT_DWARF_STACK_OP (asm_out_file, OP_REG);
! 	if (is_pseudo_reg (rtl))
!           ASM_OUTPUT_DWARF_DATA4 (asm_out_file, (unsigned) -1);
! 	else
!           ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
! 				  DBX_REGISTER_NUMBER (REGNO (rtl)));
  	break;
  
*************** dwarfout_file_scope_decl (decl, set_fina
*** 4098,4107 ****
       don't carry their own sequence numbers with them!)  */
  
!   if (DECL_IGNORED_P (decl))
!     {
!       if (TREE_CODE (decl) == FUNCTION_DECL && DECL_INITIAL (decl) != NULL)
! 	abort ();
!       return;
!     }
  
    switch (TREE_CODE (decl))
--- 4104,4109 ----
       don't carry their own sequence numbers with them!)  */
  
!   if (DECL_IGNORED_P (decl) && TREE_CODE (decl) != FUNCTION_DECL)
!     return;
  
    switch (TREE_CODE (decl))
Technical Details
Message-ID: <14323.712081434@segfault>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!segfault.UUCP!rfg

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!segfault.UUCP!rfg
From: rfg@segfault.UUCP
Subject: Workaround fixes for svr4 woes with -g.
Message-ID: <14323.712081434@segfault>
Sender: gnulists@ai.mit.edu
Reply-To: lupine!segfault!rfg@uunet.uu.net
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sat, 25 Jul 1992 15:23:54 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 89