blob: c835988192f6d702328f18ec3ceb6831688a4b31 [file] [log] [blame]
Petr Machatae99af272012-10-26 00:29:52 +02001/*
2 * This file is part of ltrace.
Petr Machata3ac8db62012-11-23 18:43:10 +01003 * Copyright (C) 2012 Petr Machata, Red Hat Inc.
Petr Machatae99af272012-10-26 00:29:52 +02004 * Copyright (C) 2006 Ian Wienand
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 */
21
Juan Cespedesd44c6b81998-09-25 14:48:42 +020022#include "config.h"
Juan Cespedesd44c6b81998-09-25 14:48:42 +020023
Petr Machata3ac8db62012-11-23 18:43:10 +010024#if defined HAVE_LIBSUPC__ || defined HAVE_LIBSTDC__
25# define USE_CXA_DEMANGLE
26#endif
27#if defined HAVE_LIBIBERTY || defined USE_CXA_DEMANGLE
28# define USE_DEMANGLE
29#endif
30
Ian Wienand2d45b1a2006-02-20 22:48:07 +010031extern char *cplus_demangle(const char *mangled, int options);
Juan Cespedesac3db291998-04-25 14:31:58 +020032
Ian Wienand2d45b1a2006-02-20 22:48:07 +010033const char *my_demangle(const char *function_name);
Juan Cespedesac3db291998-04-25 14:31:58 +020034
35/* Options passed to cplus_demangle (in 2nd parameter). */
36
Ian Wienand2d45b1a2006-02-20 22:48:07 +010037#define DMGL_NO_OPTS 0 /* For readability... */
38#define DMGL_PARAMS (1 << 0) /* Include function args */
39#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */
40#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */