Print this page
Cstyle cleanup


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.

  24  */
  25 
  26 #include        <stdio.h>
  27 #include        <demangle-sys.h>
  28 #include        "_conv.h"
  29 #include        "demangle_msg.h"
  30 
  31 /*
  32  * Demangle C++ symbols.
  33  *
  34  * This routine acts as a generic routine for use by liblddbg (and hence tools
  35  * like elfdump(1) and pvs(1)), ld(1) and ld.so.1(1).
  36  *
  37  * The C++ ABI-2 places no limits on symbol names, thus when demangling a name
  38  * it's possible the buffer won't be big enough (DEMANGLE_ESPACE) so here we
  39  * try to allocate bigger buffers.  However, we place a limit on this buffer
  40  * size for fear of a C++ error sending us into an infinit loop.
  41  *
  42  * NOTE. we create and use a common buffer for use by cplus_demangle(), thus
  43  * each call to this routine will override the contents of any existing call.




   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2018, Joyent, Inc.
  25  */
  26 
  27 #include        <stdio.h>
  28 #include        <demangle-sys.h>
  29 #include        "_conv.h"
  30 #include        "demangle_msg.h"
  31 
  32 /*
  33  * Demangle C++ symbols.
  34  *
  35  * This routine acts as a generic routine for use by liblddbg (and hence tools
  36  * like elfdump(1) and pvs(1)), ld(1) and ld.so.1(1).
  37  *
  38  * The C++ ABI-2 places no limits on symbol names, thus when demangling a name
  39  * it's possible the buffer won't be big enough (DEMANGLE_ESPACE) so here we
  40  * try to allocate bigger buffers.  However, we place a limit on this buffer
  41  * size for fear of a C++ error sending us into an infinit loop.
  42  *
  43  * NOTE. we create and use a common buffer for use by cplus_demangle(), thus
  44  * each call to this routine will override the contents of any existing call.