From: Nicholas Nethercote Date: Tue, 10 May 2005 04:56:56 +0000 (+0000) Subject: Modularised the demangler into m_demangle. (It very nearly fit our new X-Git-Tag: svn/VALGRIND_3_0_0~664 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da683dd528d4bc347f35d7043670fd0ae467342c;p=thirdparty%2Fvalgrind.git Modularised the demangler into m_demangle. (It very nearly fit our new module structure as-is.) git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3654 --- diff --git a/configure.in b/configure.in index 8976935726..953ca14ed3 100644 --- a/configure.in +++ b/configure.in @@ -393,7 +393,7 @@ AC_OUTPUT( include/x86-linux/Makefile auxprogs/Makefile coregrind/Makefile - coregrind/demangle/Makefile + coregrind/m_demangle/Makefile coregrind/m_aspacemgr/Makefile coregrind/m_replacemalloc/Makefile coregrind/m_sigframe/Makefile diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am index 0d01f4bf7a..f7dd59b026 100644 --- a/coregrind/Makefile.am +++ b/coregrind/Makefile.am @@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.all.am include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am MODULES = \ - demangle \ + m_demangle \ m_aspacemgr \ m_replacemalloc \ m_sigframe \ @@ -19,7 +19,7 @@ DIST_SUBDIRS = \ $(VG_ARCH_ALL) $(VG_OS_ALL) $(VG_PLATFORM_ALL) \ $(MODULES) . -AM_CPPFLAGS += -DVG_LIBDIR="\"$(valdir)"\" -I$(srcdir)/demangle \ +AM_CPPFLAGS += -DVG_LIBDIR="\"$(valdir)"\" \ -DKICKSTART_BASE=@KICKSTART_BASE@ AM_CFLAGS = $(WERROR) -Wmissing-prototypes -Winline -Wall -Wshadow -O -g @ARCH_CORE_AM_CFLAGS@ @@ -39,6 +39,7 @@ noinst_HEADERS = \ core_asm.h \ pub_core_aspacemgr.h \ pub_core_debuglog.h \ + pub_core_demangle.h \ pub_core_errormgr.h \ pub_core_execontext.h \ pub_core_mallocfree.h \ @@ -75,7 +76,6 @@ stage2_SOURCES = \ ume.c \ \ vg_scheduler.c \ - vg_demangle.c \ vg_hashtable.c \ vg_main.c \ vg_messages.c \ @@ -95,7 +95,7 @@ stage2_SOURCES = \ ## libplatform.a must be before libarch.a and libos.a, it seems. stage2_extra= \ - demangle/libdemangle.a \ + m_demangle/libdemangle.a \ m_aspacemgr/libaspacemgr.a \ m_sigframe/libsigframe.a \ m_syscalls/libsyscalls.a \ diff --git a/coregrind/core.h b/coregrind/core.h index 0ab6bc53fe..643bdc515c 100644 --- a/coregrind/core.h +++ b/coregrind/core.h @@ -717,14 +717,6 @@ extern void VG_(nanosleep)(struct vki_timespec *); use. */ extern void VG_(send_bytes_to_logging_sink) ( Char* msg, Int nbytes ); -/* --------------------------------------------------------------------- - Exports of vg_demangle.c - ------------------------------------------------------------------ */ - -extern void VG_(demangle) ( Char* orig, Char* result, Int result_size ); - -extern void VG_(reloc_abs_jump) ( UChar *jmp ); - /* --------------------------------------------------------------------- Exports of vg_translate.c ------------------------------------------------------------------ */ diff --git a/coregrind/demangle/.cvsignore b/coregrind/m_demangle/.cvsignore similarity index 100% rename from coregrind/demangle/.cvsignore rename to coregrind/m_demangle/.cvsignore diff --git a/coregrind/demangle/Makefile.am b/coregrind/m_demangle/Makefile.am similarity index 89% rename from coregrind/demangle/Makefile.am rename to coregrind/m_demangle/Makefile.am index 68040feef8..3625614526 100644 --- a/coregrind/demangle/Makefile.am +++ b/coregrind/m_demangle/Makefile.am @@ -18,7 +18,11 @@ noinst_HEADERS = \ noinst_LIBRARIES = libdemangle.a libdemangle_a_SOURCES = \ - cp-demangle.c cplus-dem.c dyn-string.c safe-ctype.c + cp-demangle.c \ + cplus-dem.c \ + demangle.c \ + dyn-string.c \ + safe-ctype.c ## Ignore harmless warnings for these ones cp-demangle.o: CFLAGS += -Wno-unused -Wno-shadow diff --git a/coregrind/demangle/ansidecl.h b/coregrind/m_demangle/ansidecl.h similarity index 100% rename from coregrind/demangle/ansidecl.h rename to coregrind/m_demangle/ansidecl.h diff --git a/coregrind/demangle/cp-demangle.c b/coregrind/m_demangle/cp-demangle.c similarity index 100% rename from coregrind/demangle/cp-demangle.c rename to coregrind/m_demangle/cp-demangle.c diff --git a/coregrind/demangle/cplus-dem.c b/coregrind/m_demangle/cplus-dem.c similarity index 100% rename from coregrind/demangle/cplus-dem.c rename to coregrind/m_demangle/cplus-dem.c diff --git a/coregrind/vg_demangle.c b/coregrind/m_demangle/demangle.c similarity index 94% rename from coregrind/vg_demangle.c rename to coregrind/m_demangle/demangle.c index 55026fe4af..b83d431bd5 100644 --- a/coregrind/vg_demangle.c +++ b/coregrind/m_demangle/demangle.c @@ -1,7 +1,6 @@ /*--------------------------------------------------------------------*/ -/*--- Demangling of C++ mangled names. ---*/ -/*--- vg_demangle.c ---*/ +/*--- Demangling of C++ mangled names. demangle.c ---*/ /*--------------------------------------------------------------------*/ /* @@ -57,7 +56,6 @@ void VG_(demangle) ( Char* orig, Char* result, Int result_size ) VGP_POPCC(VgpDemangle); } - /*--------------------------------------------------------------------*/ /*--- end ---*/ /*--------------------------------------------------------------------*/ diff --git a/coregrind/demangle/demangle.h b/coregrind/m_demangle/demangle.h similarity index 100% rename from coregrind/demangle/demangle.h rename to coregrind/m_demangle/demangle.h diff --git a/coregrind/demangle/dyn-string.c b/coregrind/m_demangle/dyn-string.c similarity index 100% rename from coregrind/demangle/dyn-string.c rename to coregrind/m_demangle/dyn-string.c diff --git a/coregrind/demangle/dyn-string.h b/coregrind/m_demangle/dyn-string.h similarity index 100% rename from coregrind/demangle/dyn-string.h rename to coregrind/m_demangle/dyn-string.h diff --git a/coregrind/demangle/safe-ctype.c b/coregrind/m_demangle/safe-ctype.c similarity index 100% rename from coregrind/demangle/safe-ctype.c rename to coregrind/m_demangle/safe-ctype.c diff --git a/coregrind/demangle/safe-ctype.h b/coregrind/m_demangle/safe-ctype.h similarity index 100% rename from coregrind/demangle/safe-ctype.h rename to coregrind/m_demangle/safe-ctype.h diff --git a/coregrind/pub_core_demangle.h b/coregrind/pub_core_demangle.h new file mode 100644 index 0000000000..bdc5bf7849 --- /dev/null +++ b/coregrind/pub_core_demangle.h @@ -0,0 +1,45 @@ + +/*--------------------------------------------------------------------*/ +/*--- The C++ name demangler. pub_core_demangle.h ---*/ +/*--------------------------------------------------------------------*/ + +/* + This file is part of Valgrind, a dynamic binary instrumentation + framework. + + Copyright (C) 2000-2005 Julian Seward + jseward@acm.org + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307, USA. + + The GNU General Public License is contained in the file COPYING. +*/ + +#ifndef __PUB_CORE_DEMANGLE_H +#define __PUB_CORE_DEMANGLE_H + +//-------------------------------------------------------------------- +// PURPOSE: This module exports a single function for demangling C++ +// names. +//-------------------------------------------------------------------- + +extern void VG_(demangle) ( Char* orig, Char* result, Int result_size ); + +#endif // __PUB_CORE_DEMANGLE_H + +/*--------------------------------------------------------------------*/ +/*--- end ---*/ +/*--------------------------------------------------------------------*/