From: Nicholas Nethercote Date: Tue, 21 Jun 2005 00:33:19 +0000 (+0000) Subject: Don't #include pub_core_stacktrace.h in pub_core_execontext.h. So X-Git-Tag: svn/VALGRIND_3_0_0~342 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78acf96da018259525cb0d634eb48b891b4258ca;p=thirdparty%2Fvalgrind.git Don't #include pub_core_stacktrace.h in pub_core_execontext.h. So a few places have to #include pub_core_stacktrace.h themselves, but that's ok because explicit is better. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3976 --- diff --git a/coregrind/m_errormgr.c b/coregrind/m_errormgr.c index fe30e08b4e..16709fc052 100644 --- a/coregrind/m_errormgr.c +++ b/coregrind/m_errormgr.c @@ -41,6 +41,7 @@ #include "pub_core_libcproc.h" // For VG_(getpid)() #include "pub_core_mallocfree.h" #include "pub_core_options.h" +#include "pub_core_stacktrace.h" #include "pub_core_tooliface.h" #include "pub_core_translate.h" // for VG_(translate)() diff --git a/coregrind/m_execontext.c b/coregrind/m_execontext.c index 2247359658..f247e5df98 100644 --- a/coregrind/m_execontext.c +++ b/coregrind/m_execontext.c @@ -35,6 +35,7 @@ #include "pub_core_mallocfree.h" #include "pub_core_options.h" #include "pub_core_profile.h" +#include "pub_core_stacktrace.h" /*------------------------------------------------------------*/ /*--- Low-level ExeContext storage. ---*/ diff --git a/coregrind/pub_core_execontext.h b/coregrind/pub_core_execontext.h index d6371e9e0a..dcc5211ea3 100644 --- a/coregrind/pub_core_execontext.h +++ b/coregrind/pub_core_execontext.h @@ -40,8 +40,6 @@ #include "pub_tool_execontext.h" -#include "pub_core_stacktrace.h" - /* The maximum number of calls we're prepared to save in an ExeContext. */ #define VG_DEEPEST_BACKTRACE 50 @@ -49,7 +47,10 @@ extern void VG_(print_ExeContext_stats) ( void ); // Extract the StackTrace from an ExeContext. -extern StackTrace VG_(extract_StackTrace) ( ExeContext* e ); +// (Minor hack: we use Addr* as the return type instead of StackTrace so +// that modules #including this file don't also have to #include +// pub_core_stacktrace.h also.) +extern /*StackTrace*/Addr* VG_(extract_StackTrace) ( ExeContext* e ); #endif // __PUB_CORE_EXECONTEXT_H