From: Julian Seward Date: Wed, 28 Sep 2005 01:36:01 +0000 (+0000) Subject: Get rid of some macros used only by the old aspacemgr, and tidy up X-Git-Tag: svn/VALGRIND_3_1_0~426 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68ccd98f629c4e2eeef79e8190576f88c0ae7b5a;p=thirdparty%2Fvalgrind.git Get rid of some macros used only by the old aspacemgr, and tidy up m_main even more. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4802 --- diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 331e8bda64..a0886059f9 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -61,35 +61,6 @@ #include "pub_core_ume.h" -#ifndef AT_DCACHEBSIZE -#define AT_DCACHEBSIZE 19 -#endif /* AT_DCACHEBSIZE */ - -#ifndef AT_ICACHEBSIZE -#define AT_ICACHEBSIZE 20 -#endif /* AT_ICACHEBSIZE */ - -#ifndef AT_UCACHEBSIZE -#define AT_UCACHEBSIZE 21 -#endif /* AT_UCACHEBSIZE */ - -#ifndef AT_SYSINFO -#define AT_SYSINFO 32 -#endif /* AT_SYSINFO */ - -#ifndef AT_SYSINFO_EHDR -#define AT_SYSINFO_EHDR 33 -#endif /* AT_SYSINFO_EHDR */ - -#ifndef AT_SECURE -#define AT_SECURE 23 /* secure mode boolean */ -#endif /* AT_SECURE */ - -/* Number of file descriptors that Valgrind tries to reserve for - it's own use - just a small constant. */ -#define N_RESERVED_FDS (10) - - /*====================================================================*/ /*=== Counters, for profiling purposes only ===*/ /*====================================================================*/ @@ -114,7 +85,7 @@ static void print_all_stats ( void ) /*====================================================================*/ -/*=== Environment and stack setup ===*/ +/*=== Setting up the client's environment ===*/ /*====================================================================*/ /* Prepare the client's environment. This is basically a copy of our @@ -236,6 +207,34 @@ static HChar** setup_client_env ( HChar** origenv, const HChar* toolname) } +/*====================================================================*/ +/*=== Setting up the client's stack ===*/ +/*====================================================================*/ + +#ifndef AT_DCACHEBSIZE +#define AT_DCACHEBSIZE 19 +#endif /* AT_DCACHEBSIZE */ + +#ifndef AT_ICACHEBSIZE +#define AT_ICACHEBSIZE 20 +#endif /* AT_ICACHEBSIZE */ + +#ifndef AT_UCACHEBSIZE +#define AT_UCACHEBSIZE 21 +#endif /* AT_UCACHEBSIZE */ + +#ifndef AT_SYSINFO +#define AT_SYSINFO 32 +#endif /* AT_SYSINFO */ + +#ifndef AT_SYSINFO_EHDR +#define AT_SYSINFO_EHDR 33 +#endif /* AT_SYSINFO_EHDR */ + +#ifndef AT_SECURE +#define AT_SECURE 23 /* secure mode boolean */ +#endif /* AT_SECURE */ + /* Add a string onto the string table, and return its address */ static char *copy_str(char **tab, const char *str) { @@ -254,7 +253,9 @@ static char *copy_str(char **tab, const char *str) return orig; } -/* + +/* ---------------------------------------------------------------- + This sets up the client's initial stack, containing the args, environment and aux vector. @@ -292,7 +293,8 @@ static char *copy_str(char **tab, const char *str) VG_(cache_line_size_ppc32) // ppc32 only -- cache line size VG_(have_altivec_ppc32) // ppc32 only -- is Altivec supported? -*/ + + ---------------------------------------------------------------- */ static Addr setup_client_stack( void* init_sp, @@ -1621,6 +1623,10 @@ static void print_preamble(Bool logging_to_fd, const char* toolname) /*=== File descriptor setup ===*/ /*====================================================================*/ +/* Number of file descriptors that Valgrind tries to reserve for + it's own use - just a small constant. */ +#define N_RESERVED_FDS (10) + static void setup_file_descriptors(void) { struct vki_rlimit rl; diff --git a/coregrind/pub_core_options.h b/coregrind/pub_core_options.h index aeb80add5c..a2e87fe430 100644 --- a/coregrind/pub_core_options.h +++ b/coregrind/pub_core_options.h @@ -158,7 +158,6 @@ typedef enum { Vg_SmcNone, // never generate self-checking translations Vg_SmcStack, // generate s-c-t's for code found in stacks - // (segments with SF_GROWDOWN, to be precise) // (this is the default) Vg_SmcAll // make all translations self-checking. } diff --git a/include/vki-linux.h b/include/vki-linux.h index 1cd0517939..b7f6181f51 100644 --- a/include/vki-linux.h +++ b/include/vki-linux.h @@ -33,8 +33,6 @@ All code is copied verbatim from kernel source files, except that: - VKI_/vki_ prefixes are added - - a few extra constants are defined (eg. VKI_MAP_NOSYMS); these are - marked 'internal' - some extra explanatory comments are included; they are all within "[[ ]]" - for some types, we only care about the size; for a few of them (big @@ -477,10 +475,6 @@ typedef struct vki_sigevent { #define VKI_SEEK_CUR 1 #define VKI_SEEK_END 2 -// [[Our own additional mmap flags]] -#define VKI_MAP_NOSYMS 0x40000000 // internal: disable symbol loading -#define VKI_MAP_CLIENT 0x80000000 // internal: distinguish client mappings - //---------------------------------------------------------------------- // From linux-2.6.8.1/include/linux/net.h //----------------------------------------------------------------------