From: Florian Krohm Date: Sun, 21 Oct 2012 02:39:42 +0000 (+0000) Subject: Fix a few Char/HChar mixups for cachegrind. X-Git-Tag: svn/VALGRIND_3_9_0~600 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d2d9aca2de2c97d5a06581a7fd405f53c76ddf6;p=thirdparty%2Fvalgrind.git Fix a few Char/HChar mixups for cachegrind. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13068 --- diff --git a/cachegrind/cg-arch.c b/cachegrind/cg-arch.c index f3c6df46b2..f66a83c53c 100644 --- a/cachegrind/cg-arch.c +++ b/cachegrind/cg-arch.c @@ -41,7 +41,7 @@ static void configure_caches(cache_t* I1c, cache_t* D1c, cache_t* LLc, // Checks cache config is ok. Returns NULL if ok, or a pointer to an error // string otherwise. -static Char* check_cache(cache_t* cache) +static const HChar* check_cache(cache_t* cache) { // Simulator requires set count to be a power of two. if ((cache->size % (cache->line_size * cache->assoc) != 0) || @@ -80,7 +80,7 @@ static void parse_cache_opt ( cache_t* cache, Char* opt, Char* optval ) { Long i1, i2, i3; Char* endptr; - Char* checkRes; + const HChar* checkRes; // Option argument looks like "65536,2,64". Extract them. i1 = VG_(strtoll10)(optval, &endptr); if (*endptr != ',') goto bad; @@ -133,7 +133,7 @@ Bool VG_(str_clo_cache_opt)(Char *arg, return False; } -static void umsg_cache_img(Char* desc, cache_t* c) +static void umsg_cache_img(const HChar* desc, cache_t* c) { VG_(umsg)(" %s: %'d B, %d-way, %d B lines\n", desc, c->size, c->assoc, c->line_size); @@ -141,9 +141,9 @@ static void umsg_cache_img(Char* desc, cache_t* c) // Verifies if c is a valid cache. // An invalid value causes an assert, unless clo_redefined is True. -static void check_cache_or_override(Char* desc, cache_t* c, Bool clo_redefined) +static void check_cache_or_override(const HChar* desc, cache_t* c, Bool clo_redefined) { - Char* checkRes; + const HChar* checkRes; checkRes = check_cache(c); if (checkRes) { @@ -416,7 +416,7 @@ configure_caches(cache_t *I1c, cache_t *D1c, cache_t *LLc, #endif if (!all_caches_clo_defined) { - const char warning[] = + const HChar warning[] = "Warning: Cannot auto-detect cache config, using defaults.\n" " Run with -v to see.\n"; VG_(dmsg)("%s", warning); diff --git a/cachegrind/cg_main.c b/cachegrind/cg_main.c index 487e0420f1..78c9d60627 100644 --- a/cachegrind/cg_main.c +++ b/cachegrind/cg_main.c @@ -67,7 +67,7 @@ static Bool clo_cache_sim = True; /* do cache simulation? */ static Bool clo_branch_sim = False; /* do branch simulation? */ -static Char* clo_cachegrind_out_file = "cachegrind.out.%p"; +static HChar* clo_cachegrind_out_file = "cachegrind.out.%p"; /*------------------------------------------------------------*/ /*--- Cachesim configuration ---*/ @@ -667,7 +667,7 @@ InstrInfo* setup_InstrInfo ( CgState* cgs, Addr instr_addr, UInt instr_len ) static void flushEvents ( CgState* cgs ) { Int i, regparms; - Char* helperName; + const HChar* helperName; void* helperAddr; IRExpr** argv; IRExpr* i_node_expr; @@ -1464,7 +1464,8 @@ static UInt ULong_width(ULong n) static void cg_fini(Int exitcode) { - static Char buf1[128], buf2[128], buf3[128], buf4[123], fmt[128]; + static Char buf1[128], buf2[128], buf3[128], buf4[123]; + static HChar fmt[128]; CacheCC D_total; BranchCC B_total;