This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


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

GDB PATCH to disable specific G++ demangling


G++ is in the process of switching to a new ABI, which includes a new
mangling scheme; therefore, AUTO_DEMANGLING is the best bet for G++ code.

OK?

2000-12-15  Jason Merrill  <jason@redhat.com>

	* dbxread.c (read_ofile_symtab): Stay with AUTO_DEMANGLING for G++.
	(process_one_symbol): Likewise.
	* dwarfread.c (handle_producer): Likewise.

*** dbxread.c.~1~	Fri Dec 15 14:37:01 2000
--- dbxread.c	Fri Dec 15 14:39:37 2000
*************** read_ofile_symtab (struct partial_symtab
*** 1738,1743 ****
--- 1738,1746 ----
        /* Try to select a C++ demangling based on the compilation unit
           producer. */
  
+ #if 0
+       /* For now, stay with AUTO_DEMANGLING for g++ output, as we don't
+ 	 know whether it will use the old style or v3 mangling.  */
        if (processing_gcc_compilation)
  	{
  	  if (AUTO_DEMANGLING)
*************** read_ofile_symtab (struct partial_symtab
*** 1745,1750 ****
--- 1748,1754 ----
  	      set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
  	    }
  	}
+ #endif
      }
    else
      {
*************** read_ofile_symtab (struct partial_symtab
*** 1798,1807 ****
--- 1802,1815 ----
  	  else if (STREQ (namestring, GCC2_COMPILED_FLAG_SYMBOL))
  	    processing_gcc_compilation = 2;
  
+ #if 0
+ 	  /* For now, stay with AUTO_DEMANGLING for g++ output, as we don't
+ 	     know whether it will use the old style or v3 mangling.  */
  	  if (AUTO_DEMANGLING)
  	    {
  	      set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
  	    }
+ #endif
  	}
        else if (type & N_EXT || type == (unsigned char) N_TEXT
  	       || type == (unsigned char) N_NBTEXT
*************** process_one_symbol (int type, int desc, 
*** 2367,2373 ****
  	  if (STREQ (name, GCC2_COMPILED_FLAG_SYMBOL))
  	    {
  	      processing_gcc_compilation = 2;
! #if 1				/* Works, but is experimental.  -fnf */
  	      if (AUTO_DEMANGLING)
  		{
  		  set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
--- 2375,2383 ----
  	  if (STREQ (name, GCC2_COMPILED_FLAG_SYMBOL))
  	    {
  	      processing_gcc_compilation = 2;
! #if 0				/* Works, but is experimental.  -fnf */
! 	      /* For now, stay with AUTO_DEMANGLING for g++ output, as we don't
! 		 know whether it will use the old style or v3 mangling.  */
  	      if (AUTO_DEMANGLING)
  		{
  		  set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
*** dwarfread.c.~1~	Fri Dec 15 14:37:01 2000
--- dwarfread.c	Fri Dec 15 14:39:46 2000
*************** handle_producer (char *producer)
*** 1838,1844 ****
--- 1838,1848 ----
      {
        if (STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER)))
  	{
+ #if 0
+ 	  /* For now, stay with AUTO_DEMANGLING for g++ output, as we don't
+ 	     know whether it will use the old style or v3 mangling.  */
  	  set_demangling_style (GNU_DEMANGLING_STYLE_STRING);
+ #endif
  	}
        else if (STREQN (producer, LCC_PRODUCER, strlen (LCC_PRODUCER)))
  	{

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