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


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

[PATCH]Make Java a demangler style


The demangler supports demangling Java, but it is not listed as a style.
So nm --style=java doesn't work.




2000-06-20  Kenneth Block  <krblock@computer.org>

	* include/demangle.h: Add java as a demangler style.
	* libiberty/cplus-dem.c: Add java as a demangler style

*** ./include/demangle.h.orig	Tue Jun 20 14:35:11 2000
--- ./include/demangle.h	Tue Jun 20 16:57:58 2000
***************
*** 40,46 ****
  #define DMGL_GNU_NEW_ABI (1 << 14)
  
  /* If none of these are set, use 'current_demangling_style' as the default. */
! #define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_NEW_ABI)
  
  /* Enumeration of possible demangling styles.
  
--- 40,46 ----
  #define DMGL_GNU_NEW_ABI (1 << 14)
  
  /* If none of these are set, use 'current_demangling_style' as the default. */
! #define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_NEW_ABI|DMGL_JAVA)
  
  /* Enumeration of possible demangling styles.
  
***************
*** 59,65 ****
    arm_demangling = DMGL_ARM,
    hp_demangling = DMGL_HP,
    edg_demangling = DMGL_EDG,
!   gnu_new_abi_demangling = DMGL_GNU_NEW_ABI
  } current_demangling_style;
  
  /* Define string names for the various demangling styles. */
--- 59,66 ----
    arm_demangling = DMGL_ARM,
    hp_demangling = DMGL_HP,
    edg_demangling = DMGL_EDG,
!   gnu_new_abi_demangling = DMGL_GNU_NEW_ABI,
!   java_demangling = DMGL_JAVA
  } current_demangling_style;
  
  /* Define string names for the various demangling styles. */
***************
*** 71,76 ****
--- 72,78 ----
  #define HP_DEMANGLING_STYLE_STRING	      "hp"
  #define EDG_DEMANGLING_STYLE_STRING	      "edg"
  #define GNU_NEW_ABI_DEMANGLING_STYLE_STRING   "gnu-new-abi"
+ #define JAVA_DEMANGLING_STYLE_STRING          "java"
  
  /* Some macros to test what demangling style is active. */
  
***************
*** 82,87 ****
--- 84,90 ----
  #define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP)
  #define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG)
  #define GNU_NEW_ABI_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_NEW_ABI)
+ #define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA)
  
  /* Provide information about the available demangle styles. This code is
     pulled from gdb into libiberty because it is useful to binutils also.  */
*** ./libiberty/cplus-dem.c.orig	Tue Jun 20 14:34:02 2000
--- ./libiberty/cplus-dem.c	Tue Jun 20 16:50:21 2000
***************
*** 297,302 ****
--- 297,308 ----
    }
    ,
    {
+     JAVA_DEMANGLING_STYLE_STRING,
+     java_demangling,
+     "Java style demangling"
+   }
+   ,
+   {
      NULL, unknown_demangling, NULL
    }
  };

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