|
From: <sv...@va...> - 2012-11-10 22:30:06
|
florian 2012-11-10 22:29:54 +0000 (Sat, 10 Nov 2012)
New Revision: 13119
Log:
Fix more Char/HChar mixups. Closing in...
Modified files:
trunk/cachegrind/cg-arch.c
trunk/cachegrind/cg_arch.h
trunk/cachegrind/cg_main.c
trunk/callgrind/callstack.c
trunk/callgrind/clo.c
trunk/callgrind/context.c
trunk/callgrind/debug.c
trunk/callgrind/dump.c
trunk/callgrind/events.c
trunk/callgrind/fn.c
trunk/callgrind/global.h
trunk/callgrind/main.c
trunk/callgrind/sim.c
trunk/coregrind/launcher-linux.c
trunk/coregrind/m_cache.c
trunk/coregrind/m_debugger.c
trunk/coregrind/m_debuginfo/debuginfo.c
trunk/coregrind/m_debuglog.c
trunk/coregrind/m_demangle/demangle.c
trunk/coregrind/m_errormgr.c
trunk/coregrind/m_gdbserver/m_gdbserver.c
trunk/coregrind/m_gdbserver/regdef.h
trunk/coregrind/m_gdbserver/remote-utils.c
trunk/coregrind/m_gdbserver/server.c
trunk/coregrind/m_gdbserver/server.h
trunk/coregrind/m_initimg/initimg-darwin.c
trunk/coregrind/m_initimg/initimg-linux.c
trunk/coregrind/m_libcbase.c
trunk/coregrind/m_libcfile.c
trunk/coregrind/m_libcproc.c
trunk/coregrind/m_machine.c
trunk/coregrind/m_main.c
trunk/coregrind/m_mallocfree.c
trunk/coregrind/m_options.c
trunk/coregrind/m_oset.c
trunk/coregrind/m_redir.c
trunk/coregrind/m_replacemalloc/replacemalloc_core.c
trunk/coregrind/m_seqmatch.c
trunk/coregrind/m_stacktrace.c
trunk/coregrind/m_syswrap/syswrap-generic.c
trunk/coregrind/m_tooliface.c
trunk/coregrind/m_translate.c
trunk/coregrind/m_transtab.c
trunk/coregrind/pub_core_demangle.h
trunk/coregrind/pub_core_initimg.h
trunk/coregrind/pub_core_libcfile.h
trunk/coregrind/pub_core_libcproc.h
trunk/coregrind/pub_core_mallocfree.h
trunk/coregrind/pub_core_options.h
trunk/coregrind/pub_core_redir.h
trunk/coregrind/pub_core_tooliface.h
trunk/coregrind/vg_preloaded.c
trunk/drd/drd.h
trunk/drd/drd_barrier.c
trunk/drd/drd_clientobj.c
trunk/drd/drd_clientobj.h
trunk/drd/drd_clientreq.c
trunk/drd/drd_error.c
trunk/drd/drd_error.h
trunk/drd/drd_load_store.c
trunk/drd/drd_main.c
trunk/drd/drd_mutex.c
trunk/drd/drd_mutex.h
trunk/drd/drd_pthread_intercepts.c
trunk/drd/drd_segment.c
trunk/drd/drd_semaphore.c
trunk/drd/drd_semaphore.h
trunk/drd/drd_suppression.c
trunk/drd/drd_suppression.h
trunk/drd/drd_thread.c
trunk/drd/drd_thread.h
trunk/drd/drd_vc.c
trunk/drd/drd_vc.h
trunk/drd/tests/unit_vc.c
trunk/exp-bbv/bbv_main.c
trunk/exp-dhat/dh_main.c
trunk/exp-sgcheck/pc_common.c
trunk/exp-sgcheck/pc_common.h
trunk/helgrind/hg_basics.c
trunk/helgrind/hg_basics.h
trunk/helgrind/hg_errors.c
trunk/helgrind/hg_errors.h
trunk/helgrind/hg_main.c
trunk/include/pub_tool_debuginfo.h
trunk/include/pub_tool_errormgr.h
trunk/include/pub_tool_gdbserver.h
trunk/include/pub_tool_libcbase.h
trunk/include/pub_tool_libcfile.h
trunk/include/pub_tool_libcproc.h
trunk/include/pub_tool_mallocfree.h
trunk/include/pub_tool_options.h
trunk/include/pub_tool_replacemalloc.h
trunk/include/pub_tool_seqmatch.h
trunk/include/pub_tool_tooliface.h
trunk/lackey/lk_main.c
trunk/massif/ms_main.c
trunk/memcheck/mc_errors.c
trunk/memcheck/mc_include.h
trunk/memcheck/mc_leakcheck.c
trunk/memcheck/mc_main.c
trunk/memcheck/tests/unit_libcbase.c
Modified: trunk/exp-bbv/bbv_main.c (+10 -10)
===================================================================
--- trunk/exp-bbv/bbv_main.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/exp-bbv/bbv_main.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -55,10 +55,10 @@
static Int interval_size=DEFAULT_GRAIN_SIZE;
/* filenames */
-static HChar *clo_bb_out_file="bb.out.%p";
-static HChar *clo_pc_out_file="pc.out.%p";
-static UChar *pc_out_file=NULL;
-static UChar *bb_out_file=NULL;
+static const HChar *clo_bb_out_file="bb.out.%p";
+static const HChar *clo_pc_out_file="pc.out.%p";
+static HChar *pc_out_file=NULL;
+static HChar *bb_out_file=NULL;
/* output parameters */
@@ -95,7 +95,7 @@
Int block_num; /* unique block identifier */
Int *inst_counter; /* times entered * num_instructions */
Bool is_entry; /* is this block a function entry point */
- UChar fn_name[FUNCTION_NAME_LENGTH]; /* Function block is in */
+ HChar fn_name[FUNCTION_NAME_LENGTH]; /* Function block is in */
};
@@ -275,8 +275,8 @@
#if defined(VGA_x86) || defined(VGA_amd64)
- unsigned char *inst_pointer;
- unsigned char inst_byte;
+ UChar *inst_pointer;
+ UChar inst_byte;
int i,possible_rep;
/* rep prefixed instructions are counted as one instruction on */
@@ -286,7 +286,7 @@
/* SSE instructions. So we need to specifically check for */
/* the following: movs, cmps, scas, lods, stos, ins, outs */
- inst_pointer=(unsigned char *)addr;
+ inst_pointer=(UChar *)addr;
i=0;
inst_byte=0;
possible_rep=0;
@@ -322,7 +322,7 @@
/* performance counters on pentium 4 processors so it is */
/* useful to have that count when doing validation work. */
- inst_pointer=(unsigned char *)addr;
+ inst_pointer=(UChar *)addr;
if (len>1) {
/* FLDCW detection */
/* opcode is 0xd9/5, ie 1101 1001 oo10 1mmm */
@@ -531,7 +531,7 @@
}
/* Parse the command line options */
-static Bool bbv_process_cmd_line_option(Char* arg)
+static Bool bbv_process_cmd_line_option(const HChar* arg)
{
if VG_INT_CLO (arg, "--interval-size", interval_size) {}
else if VG_STR_CLO (arg, "--bb-out-file", clo_bb_out_file) {}
Modified: trunk/coregrind/m_initimg/initimg-darwin.c (+1 -1)
===================================================================
--- trunk/coregrind/m_initimg/initimg-darwin.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/m_initimg/initimg-darwin.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -459,7 +459,7 @@
*ptr++ = 0;
/* --- envp --- */
- VG_(client_envp) = (Char **)ptr;
+ VG_(client_envp) = (HChar **)ptr;
for (cpp = orig_envp; cpp && *cpp; ptr++, cpp++)
*ptr = (Addr)copy_str(&strtab, *cpp);
*ptr++ = 0;
Modified: trunk/callgrind/events.c (+2 -2)
===================================================================
--- trunk/callgrind/events.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/callgrind/events.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -46,7 +46,7 @@
eventGroup[i] = 0;
for(i=0; i< MAX_EVENTSET_COUNT; i++)
- eventSetTable[i] = 0;
+ eventSetTable[i] = 0;
eventSets_initialized = 1;
}
@@ -62,7 +62,7 @@
CLG_ASSERT(eventGroup[id]==0);
eg = (EventGroup*) CLG_MALLOC("cl.events.group.1",
- sizeof(EventGroup) + n * sizeof(Char*));
+ sizeof(EventGroup) + n * sizeof(HChar*));
eg->size = n;
eventGroup[id] = eg;
return eg;
Modified: trunk/coregrind/m_debuginfo/debuginfo.c (+4 -4)
===================================================================
--- trunk/coregrind/m_debuginfo/debuginfo.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/m_debuginfo/debuginfo.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -1985,7 +1985,7 @@
// If user supplied --fullpath-after=foo, this will remove
// a leading string which matches '.*foo' (not greedy).
for (i = 0; i < VG_(clo_n_fullpath_after); i++) {
- UChar* prefix = VG_(clo_fullpath_after)[i];
+ UChar* prefix = (UChar *)VG_(clo_fullpath_after)[i]; // FIXME
UChar* str = VG_(strstr)(dirname, prefix);
if (str) {
dirname = str + VG_(strlen)(prefix);
@@ -3842,8 +3842,8 @@
/*OUT*/Addr* avma,
/*OUT*/Addr* tocptr,
/*OUT*/UInt* size,
- /*OUT*/UChar** pri_name,
- /*OUT*/UChar*** sec_names,
+ /*OUT*/HChar** pri_name,
+ /*OUT*/HChar*** sec_names,
/*OUT*/Bool* isText,
/*OUT*/Bool* isIFunc )
{
@@ -3852,7 +3852,7 @@
if (tocptr) *tocptr = si->symtab[idx].tocptr;
if (size) *size = si->symtab[idx].size;
if (pri_name) *pri_name = si->symtab[idx].pri_name;
- if (sec_names) *sec_names = si->symtab[idx].sec_names;
+ if (sec_names) *sec_names = (HChar **)si->symtab[idx].sec_names; // FIXME
if (isText) *isText = si->symtab[idx].isText;
if (isIFunc) *isIFunc = si->symtab[idx].isIFunc;
}
Modified: trunk/drd/drd_main.c (+5 -5)
===================================================================
--- trunk/drd/drd_main.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/drd/drd_main.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -65,7 +65,7 @@
/**
* Implement the needs_command_line_options for drd.
*/
-static Bool DRD_(process_cmd_line_option)(Char* arg)
+static Bool DRD_(process_cmd_line_option)(const HChar* arg)
{
int check_stack_accesses = -1;
int join_list_vol = -1;
@@ -89,8 +89,8 @@
int trace_segment = -1;
int trace_semaphore = -1;
int trace_suppression = -1;
- Char* trace_address = 0;
- Char* ptrace_address = 0;
+ const HChar* trace_address = 0;
+ const HChar* ptrace_address= 0;
if VG_BOOL_CLO(arg, "--check-stack-var", check_stack_accesses) {}
else if VG_INT_CLO (arg, "--join-list-vol", join_list_vol) {}
@@ -277,7 +277,7 @@
const HChar* const s,
const Addr a)
{
- const char* p = (void*)a;
+ const HChar* p = (void*)a;
SizeT size = 0;
// Don't segfault if the string starts in an obviously stupid
@@ -862,7 +862,7 @@
DRD_(thread_init)();
{
- Char* const smi = VG_(getenv)("DRD_SEGMENT_MERGING_INTERVAL");
+ HChar* const smi = VG_(getenv)("DRD_SEGMENT_MERGING_INTERVAL");
if (smi)
DRD_(thread_set_segment_merge_interval)(VG_(strtoll10)(smi, NULL));
}
Modified: trunk/lackey/lk_main.c (+6 -6)
===================================================================
--- trunk/lackey/lk_main.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/lackey/lk_main.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -192,9 +192,9 @@
/* The name of the function of which the number of calls (under
* --basic-counts=yes) is to be counted, with default. Override with command
* line option --fnname. */
-static HChar* clo_fnname = "main";
+static const HChar* clo_fnname = "main";
-static Bool lk_process_cmd_line_option(Char* arg)
+static Bool lk_process_cmd_line_option(const HChar* arg)
{
if VG_STR_CLO(arg, "--fnname", clo_fnname) {}
else if VG_BOOL_CLO(arg, "--basic-counts", clo_basic_counts) {}
@@ -321,7 +321,7 @@
}
}
-static HChar* nameOfTypeIndex ( Int i )
+static const HChar* nameOfTypeIndex ( Int i )
{
switch (i) {
case 0: return "I1"; break;
@@ -467,7 +467,7 @@
static void flushEvents(IRSB* sb)
{
Int i;
- HChar* helperName;
+ const HChar* helperName;
void* helperAddr;
IRExpr** argv;
IRDirty* di;
@@ -611,7 +611,7 @@
IRDirty* di;
Int i;
IRSB* sbOut;
- Char fnname[100];
+ HChar fnname[100];
IRType type;
IRTypeEnv* tyenv = sbIn->tyenv;
Addr iaddr = 0, dst;
@@ -911,7 +911,7 @@
static void lk_fini(Int exitcode)
{
- char percentify_buf[5]; /* Two digits, '%' and 0. */
+ HChar percentify_buf[5]; /* Two digits, '%' and 0. */
const int percentify_size = sizeof(percentify_buf) - 1;
const int percentify_decs = 0;
Modified: trunk/include/pub_tool_replacemalloc.h (+1 -1)
===================================================================
--- trunk/include/pub_tool_replacemalloc.h 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/include/pub_tool_replacemalloc.h 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -63,7 +63,7 @@
default: VG_MIN_MALLOC_SZB */
extern UInt VG_(clo_alignment);
-extern Bool VG_(replacement_malloc_process_cmd_line_option) ( Char* arg );
+extern Bool VG_(replacement_malloc_process_cmd_line_option) ( const HChar* arg );
#endif // __PUB_TOOL_REPLACEMALLOC_H
Modified: trunk/helgrind/hg_basics.c (+1 -1)
===================================================================
--- trunk/helgrind/hg_basics.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/helgrind/hg_basics.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -58,7 +58,7 @@
VG_(free)(p);
}
-Char* HG_(strdup) ( const HChar* cc, const Char* s )
+HChar* HG_(strdup) ( const HChar* cc, const HChar* s )
{
return VG_(strdup)( cc, s );
}
Modified: trunk/coregrind/m_transtab.c (+1 -1)
===================================================================
--- trunk/coregrind/m_transtab.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/m_transtab.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -805,7 +805,7 @@
TTEntry* tte
= index_tte(ie->from_sNo, ie->from_tteNo);
UChar* place_to_patch
- = ((HChar*)tte->tcptr) + ie->from_offs;
+ = ((UChar*)tte->tcptr) + ie->from_offs;
UChar* disp_cp_chain_me
= VG_(fnptr_to_fnentry)(
ie->to_fastEP ? &VG_(disp_cp_chain_me_to_fastEP)
Modified: trunk/coregrind/m_initimg/initimg-linux.c (+1 -1)
===================================================================
--- trunk/coregrind/m_initimg/initimg-linux.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/m_initimg/initimg-linux.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -603,7 +603,7 @@
*ptr++ = 0;
/* --- envp --- */
- VG_(client_envp) = (Char **)ptr;
+ VG_(client_envp) = (HChar **)ptr;
for (cpp = orig_envp; cpp && *cpp; ptr++, cpp++)
*ptr = (Addr)copy_str(&strtab, *cpp);
*ptr++ = 0;
Modified: trunk/coregrind/pub_core_libcproc.h (+5 -5)
===================================================================
--- trunk/coregrind/pub_core_libcproc.h 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/pub_core_libcproc.h 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -69,11 +69,11 @@
// Environment manipulations
-extern Char **VG_(env_setenv) ( Char ***envp, const Char* varname,
- const Char *val );
-extern void VG_(env_unsetenv) ( Char **env, const Char *varname );
-extern void VG_(env_remove_valgrind_env_stuff) ( Char** env );
-extern Char **VG_(env_clone) ( Char **env_clone );
+extern HChar **VG_(env_setenv) ( HChar ***envp, const HChar* varname,
+ const HChar *val );
+extern void VG_(env_unsetenv) ( HChar **env, const HChar *varname );
+extern void VG_(env_remove_valgrind_env_stuff) ( HChar** env );
+extern HChar **VG_(env_clone) ( HChar **env_clone );
// misc
extern Int VG_(getgroups)( Int size, UInt* list );
Modified: trunk/coregrind/m_main.c (+24 -24)
===================================================================
--- trunk/coregrind/m_main.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/m_main.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -269,8 +269,8 @@
"\n";
const HChar* gdb_path = GDB_PATH;
- Char default_alignment[30];
- Char default_redzone_size[30];
+ HChar default_alignment[30];
+ HChar default_redzone_size[30];
// Ensure the message goes to stdout
VG_(log_output_sink).fd = 1;
@@ -333,7 +333,7 @@
have handled here.
*/
static void early_process_cmd_line_options ( /*OUT*/Int* need_help,
- /*OUT*/HChar** tool )
+ /*OUT*/const HChar** tool )
{
UInt i;
HChar* str;
@@ -400,7 +400,7 @@
*/
static
void main_process_cmd_line_options ( /*OUT*/Bool* logging_to_fd,
- /*OUT*/Char** xml_fname_unexpanded,
+ /*OUT*/HChar** xml_fname_unexpanded,
const HChar* toolname )
{
// VG_(clo_log_fd) is used by all the messaging. It starts as 2 (stderr)
@@ -409,7 +409,7 @@
SysRes sres;
Int i, tmp_log_fd, tmp_xml_fd;
Int toolname_len = VG_(strlen)(toolname);
- Char* tmp_str; // Used in a couple of places.
+ const HChar* tmp_str; // Used in a couple of places.
enum {
VgLogTo_Fd,
VgLogTo_File,
@@ -420,8 +420,8 @@
/* Temporarily holds the string STR specified with
--{log,xml}-{name,socket}=STR. 'fs' stands for
file-or-socket. */
- Char* log_fsname_unexpanded = NULL;
- Char* xml_fsname_unexpanded = NULL;
+ const HChar* log_fsname_unexpanded = NULL;
+ const HChar* xml_fsname_unexpanded = NULL;
/* Log to stderr by default, but usage message goes to stdout. XML
output is initially disabled. */
@@ -690,7 +690,7 @@
and the fnpatt just by looking for the second occurrence
of C, without hardwiring any assumption about what C
is. */
- Char patt[7];
+ HChar patt[7];
Bool ok = True;
ok = tmp_str && VG_(strlen)(tmp_str) > 0;
if (ok) {
@@ -898,7 +898,7 @@
break;
case VgLogTo_File: {
- Char* logfilename;
+ HChar* logfilename;
vg_assert(log_fsname_unexpanded != NULL);
vg_assert(VG_(strlen)(log_fsname_unexpanded) <= 900); /* paranoia */
@@ -957,7 +957,7 @@
break;
case VgLogTo_File: {
- Char* xmlfilename;
+ HChar* xmlfilename;
vg_assert(xml_fsname_unexpanded != NULL);
vg_assert(VG_(strlen)(xml_fsname_unexpanded) <= 900); /* paranoia */
@@ -1075,7 +1075,7 @@
the default one. */
static const HChar default_supp[] = "default.supp";
Int len = VG_(strlen)(VG_(libdir)) + 1 + sizeof(default_supp);
- Char *buf = VG_(arena_malloc)(VG_AR_CORE, "main.mpclo.3", len);
+ HChar *buf = VG_(arena_malloc)(VG_AR_CORE, "main.mpclo.3", len);
VG_(sprintf)(buf, "%s/%s", VG_(libdir), default_supp);
VG_(clo_suppressions)[VG_(clo_n_suppressions)] = buf;
VG_(clo_n_suppressions)++;
@@ -1085,7 +1085,7 @@
}
// Write the name and value of log file qualifiers to the xml file.
-static void print_file_vars(Char* format)
+static void print_file_vars(HChar* format)
{
Int i = 0;
@@ -1097,8 +1097,8 @@
i++;
if ('{' == format[i]) {
// Get the env var name, print its contents.
- Char* qualname;
- Char* qual;
+ HChar* qualname;
+ HChar* qual;
i++;
qualname = &format[i];
while (True) {
@@ -1133,7 +1133,7 @@
/*====================================================================*/
// Print the argument, escaping any chars that require it.
-static void umsg_arg(const Char* arg)
+static void umsg_arg(const HChar* arg)
{
SizeT len = VG_(strlen)(arg);
const HChar* special = " \\<>";
@@ -1147,7 +1147,7 @@
}
// Send output to the XML-stream and escape any XML meta-characters.
-static void xml_arg(const Char* arg)
+static void xml_arg(const HChar* arg)
{
VG_(printf_xml)("%pS", arg);
}
@@ -1157,7 +1157,7 @@
command line args, to help people trying to interpret the
results of a run which encompasses multiple processes. */
static void print_preamble ( Bool logging_to_fd,
- Char* xml_fname_unexpanded,
+ HChar* xml_fname_unexpanded,
const HChar* toolname )
{
Int i;
@@ -1166,7 +1166,7 @@
UInt (*umsg_or_xml)( const HChar*, ... )
= VG_(clo_xml) ? VG_(printf_xml) : VG_(umsg);
- void (*umsg_or_xml_arg)( const Char* )
+ void (*umsg_or_xml_arg)( const HChar* )
= VG_(clo_xml) ? xml_arg : umsg_arg;
vg_assert( VG_(args_for_client) );
@@ -1319,7 +1319,7 @@
VG_(message)(Vg_DebugMsg, " can't open /proc/version\n");
} else {
# define BUF_LEN 256
- Char version_buf[BUF_LEN];
+ HChar version_buf[BUF_LEN];
Int n = VG_(read) ( sr_Res(fd), version_buf, BUF_LEN );
vg_assert(n <= BUF_LEN);
if (n > 0) {
@@ -1416,7 +1416,7 @@
{
ULong score_cumul, score_here;
HChar buf_cumul[10], buf_here[10];
- Char name[64];
+ HChar name[64];
Int r;
VG_(printf)("\n");
@@ -1541,11 +1541,11 @@
static
Int valgrind_main ( Int argc, HChar **argv, HChar **envp )
{
- HChar* toolname = "memcheck"; // default to Memcheck
+ const HChar* toolname = "memcheck"; // default to Memcheck
Int need_help = 0; // 0 = no, 1 = --help, 2 = --help-debug
ThreadId tid_main = VG_INVALID_THREADID;
Bool logging_to_fd = False;
- Char* xml_fname_unexpanded = NULL;
+ HChar* xml_fname_unexpanded = NULL;
Int loglevel, i;
struct vki_rlimit zero = { 0, 0 };
XArray* addr2dihandle = NULL;
@@ -1575,7 +1575,7 @@
//============================================================
/* This is needed to make VG_(getenv) usable early. */
- VG_(client_envp) = (Char**)envp;
+ VG_(client_envp) = (HChar**)envp;
//--------------------------------------------------------------
// Start up Mach kernel interface, if any
@@ -1769,7 +1769,7 @@
VG_(err_config_error)( "Can't establish current working "
"directory at startup\n");
}
- { Char buf[VKI_PATH_MAX+1];
+ { HChar buf[VKI_PATH_MAX+1];
Bool ok = VG_(get_startup_wd)( buf, sizeof(buf) );
vg_assert(ok);
buf[VKI_PATH_MAX] = 0;
Modified: trunk/coregrind/m_replacemalloc/replacemalloc_core.c (+1 -1)
===================================================================
--- trunk/coregrind/m_replacemalloc/replacemalloc_core.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/m_replacemalloc/replacemalloc_core.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -51,7 +51,7 @@
UInt VG_(clo_alignment) = VG_MIN_MALLOC_SZB;
-Bool VG_(replacement_malloc_process_cmd_line_option)(Char* arg)
+Bool VG_(replacement_malloc_process_cmd_line_option)(const HChar* arg)
{
if VG_INT_CLO(arg, "--alignment", VG_(clo_alignment)) {
if (VG_(clo_alignment) < VG_MIN_MALLOC_SZB ||
Modified: trunk/include/pub_tool_libcfile.h (+10 -10)
===================================================================
--- trunk/include/pub_tool_libcfile.h 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/include/pub_tool_libcfile.h 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -68,38 +68,38 @@
ULong ctime_nsec;
};
-extern SysRes VG_(mknod) ( const Char* pathname, Int mode, UWord dev );
-extern SysRes VG_(open) ( const Char* pathname, Int flags, Int mode );
+extern SysRes VG_(mknod) ( const HChar* pathname, Int mode, UWord dev );
+extern SysRes VG_(open) ( const HChar* pathname, Int flags, Int mode );
/* fd_open words like the open(2) system call:
returns fd if success, -1 otherwise */
-extern Int VG_(fd_open) (const Char* pathname, Int flags, Int mode);
+extern Int VG_(fd_open) (const HChar* pathname, Int flags, Int mode);
extern void VG_(close) ( Int fd );
extern Int VG_(read) ( Int fd, void* buf, Int count);
extern Int VG_(write) ( Int fd, const void* buf, Int count);
extern Int VG_(pipe) ( Int fd[2] );
extern Off64T VG_(lseek) ( Int fd, Off64T offset, Int whence );
-extern SysRes VG_(stat) ( const Char* file_name, struct vg_stat* buf );
+extern SysRes VG_(stat) ( const HChar* file_name, struct vg_stat* buf );
extern Int VG_(fstat) ( Int fd, struct vg_stat* buf );
extern SysRes VG_(dup) ( Int oldfd );
extern SysRes VG_(dup2) ( Int oldfd, Int newfd );
-extern Int VG_(rename) ( const Char* old_name, const Char* new_name );
-extern Int VG_(unlink) ( const Char* file_name );
+extern Int VG_(rename) ( const HChar* old_name, const HChar* new_name );
+extern Int VG_(unlink) ( const HChar* file_name );
extern Int VG_(poll) (struct vki_pollfd *fds, Int nfds, Int timeout);
-extern Int VG_(readlink)( const Char* path, Char* buf, UInt bufsize );
+extern Int VG_(readlink)( const HChar* path, HChar* buf, UInt bufsize );
extern Int VG_(getdents)( Int fd, struct vki_dirent *dirp, UInt count );
-extern Char* VG_(basename)( const Char* path );
-extern Char* VG_(dirname) ( const Char* path );
+extern HChar* VG_(basename)( const HChar* path );
+extern HChar* VG_(dirname) ( const HChar* path );
/* Return the name of a directory for temporary files. */
extern const HChar* VG_(tmpdir)(void);
/* Copy the working directory at startup into buf[0 .. size-1], or return
False if buf is too small. */
-extern Bool VG_(get_startup_wd) ( Char* buf, SizeT size );
+extern Bool VG_(get_startup_wd) ( HChar* buf, SizeT size );
#endif // __PUB_TOOL_LIBCFILE_H
Modified: trunk/drd/drd_thread.c (+15 -15)
===================================================================
--- trunk/drd/drd_thread.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/drd/drd_thread.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -377,7 +377,7 @@
{
const ThreadId joiner = DRD_(DrdThreadIdToVgThreadId)(drd_joiner);
const unsigned msg_size = 256;
- char* msg;
+ HChar* msg;
msg = VG_(malloc)("drd.main.dptj.1", msg_size);
tl_assert(msg);
@@ -386,7 +386,7 @@
drd_joiner, drd_joinee);
if (joiner)
{
- char* vc;
+ HChar* vc;
vc = DRD_(vc_aprint)(DRD_(thread_get_vc)(drd_joiner));
VG_(snprintf)(msg + VG_(strlen)(msg), msg_size - VG_(strlen)(msg),
@@ -636,7 +636,7 @@
}
/** Obtain the thread number and the user-assigned thread name. */
-const char* DRD_(thread_get_name)(const DrdThreadId tid)
+const HChar* DRD_(thread_get_name)(const DrdThreadId tid)
{
tl_assert(0 <= (int)tid && tid < DRD_N_THREADS
&& tid != DRD_INVALID_THREADID);
@@ -645,7 +645,7 @@
}
/** Set the name of the specified thread. */
-void DRD_(thread_set_name)(const DrdThreadId tid, const char* const name)
+void DRD_(thread_set_name)(const DrdThreadId tid, const HChar* const name)
{
tl_assert(0 <= (int)tid && tid < DRD_N_THREADS
&& tid != DRD_INVALID_THREADID);
@@ -893,7 +893,7 @@
DRD_(thread_compute_minimum_vc)(&thread_vc_min);
if (DRD_(sg_get_trace)())
{
- char *vc_min, *vc_max;
+ HChar *vc_min, *vc_max;
VectorClock thread_vc_max;
DRD_(vc_init)(&thread_vc_max, 0, 0);
@@ -1087,7 +1087,7 @@
if (DRD_(sg_get_trace)())
{
- char *str1, *str2;
+ HChar *str1, *str2;
str1 = DRD_(vc_aprint)(DRD_(thread_get_vc)(joiner));
str2 = DRD_(vc_aprint)(DRD_(thread_get_vc)(joinee));
VG_(message)(Vg_DebugMsg, "Before join: joiner %s, joinee %s\n",
@@ -1112,7 +1112,7 @@
thread_discard_ordered_segments();
if (DRD_(sg_get_trace)()) {
- char* str;
+ HChar* str;
str = DRD_(vc_aprint)(DRD_(thread_get_vc)(joiner));
VG_(message)(Vg_DebugMsg, "After join: %s\n", str);
@@ -1141,7 +1141,7 @@
DRD_(vc_copy)(&old_vc, DRD_(thread_get_vc)(tid));
DRD_(vc_combine)(DRD_(thread_get_vc)(tid), vc);
if (DRD_(sg_get_trace)()) {
- char *str1, *str2;
+ HChar *str1, *str2;
str1 = DRD_(vc_aprint)(&old_vc);
str2 = DRD_(vc_aprint)(DRD_(thread_get_vc)(tid));
VG_(message)(Vg_DebugMsg, "thread %d: vc %s -> %s\n", tid, str1, str2);
@@ -1400,7 +1400,7 @@
}
if (s_trace_conflict_set) {
- char* str;
+ HChar* str;
str = DRD_(vc_aprint)(DRD_(thread_get_vc)(tid));
VG_(message)(Vg_DebugMsg,
@@ -1414,7 +1414,7 @@
unsigned j;
if (s_trace_conflict_set) {
- char* vc;
+ HChar* vc;
vc = DRD_(vc_aprint)(&p->vc);
VG_(message)(Vg_DebugMsg, "conflict set: thread [%d] at vc %s\n",
@@ -1430,7 +1430,7 @@
if (!DRD_(vc_lte)(&q->vc, &p->vc)
&& !DRD_(vc_lte)(&p->vc, &q->vc)) {
if (s_trace_conflict_set) {
- char* str;
+ HChar* str;
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
@@ -1441,7 +1441,7 @@
DRD_(bm_merge2)(*conflict_set, DRD_(sg_bm)(q));
} else {
if (s_trace_conflict_set) {
- char* str;
+ HChar* str;
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
@@ -1486,7 +1486,7 @@
tl_assert(DRD_(g_conflict_set));
if (s_trace_conflict_set) {
- char* str;
+ HChar* str;
str = DRD_(vc_aprint)(DRD_(thread_get_vc)(tid));
VG_(message)(Vg_DebugMsg,
@@ -1516,7 +1516,7 @@
= !DRD_(vc_lte)(new_vc, &q->vc);
if (UNLIKELY(s_trace_conflict_set)) {
- char* str;
+ HChar* str;
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
@@ -1538,7 +1538,7 @@
&& !DRD_(vc_lte)(new_vc, &q->vc);
if (UNLIKELY(s_trace_conflict_set)) {
- char* str;
+ HChar* str;
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
Modified: trunk/drd/drd_mutex.h (+2 -2)
===================================================================
--- trunk/drd/drd_mutex.h 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/drd/drd_mutex.h 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -46,8 +46,8 @@
const Bool post_cond_wait);
void DRD_(mutex_unlock)(const Addr mutex, const MutexT mutex_type);
void DRD_(spinlock_init_or_unlock)(const Addr spinlock);
-const char* DRD_(mutex_get_typename)(struct mutex_info* const p);
-const char* DRD_(mutex_type_name)(const MutexT mt);
+const HChar* DRD_(mutex_get_typename)(struct mutex_info* const p);
+const HChar* DRD_(mutex_type_name)(const MutexT mt);
Bool DRD_(mutex_is_locked_by)(const Addr mutex, const DrdThreadId tid);
int DRD_(mutex_get_recursion_count)(const Addr mutex);
ULong DRD_(get_mutex_lock_count)(void);
Modified: trunk/callgrind/dump.c (+8 -8)
===================================================================
--- trunk/callgrind/dump.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/callgrind/dump.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -36,8 +36,8 @@
/* Dump Part Counter */
static Int out_counter = 0;
-static Char* out_file = 0;
-static Char* out_directory = 0;
+static HChar* out_file = 0;
+static HChar* out_directory = 0;
static Bool dumps_initialized = False;
/* Command */
@@ -62,13 +62,13 @@
return out_counter;
}
-Char* CLG_(get_out_file)()
+HChar* CLG_(get_out_file)()
{
CLG_(init_dumps)();
return out_file;
}
-Char* CLG_(get_out_directory)()
+HChar* CLG_(get_out_directory)()
{
CLG_(init_dumps)();
return out_directory;
@@ -440,8 +440,8 @@
static /* __inline__ */
Bool get_debug_pos(BBCC* bbcc, Addr addr, AddrPos* p)
{
- Char file[FILENAME_LEN];
- Char dir[FILENAME_LEN];
+ HChar file[FILENAME_LEN];
+ HChar dir[FILENAME_LEN];
Bool found_file_line, found_dirname;
int cachepos = addr % DEBUG_CACHE_SIZE;
@@ -1715,12 +1715,12 @@
i++;
}
i = lastSlash;
- out_directory = (Char*) CLG_MALLOC("cl.dump.init_dumps.1", i+1);
+ out_directory = (HChar*) CLG_MALLOC("cl.dump.init_dumps.1", i+1);
VG_(strncpy)(out_directory, out_file, i);
out_directory[i] = 0;
/* allocate space big enough for final filenames */
- filename = (Char*) CLG_MALLOC("cl.dump.init_dumps.2",
+ filename = (HChar*) CLG_MALLOC("cl.dump.init_dumps.2",
VG_(strlen)(out_file)+32);
CLG_ASSERT(filename != 0);
Modified: trunk/coregrind/pub_core_demangle.h (+1 -1)
===================================================================
--- trunk/coregrind/pub_core_demangle.h 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/pub_core_demangle.h 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -41,7 +41,7 @@
* (2) undoes C++ demangling, if 'do_cxx_demangle' is True. */
extern
void VG_(demangle) ( Bool do_cxx_demangling, Bool do_z_demangling,
- Char* orig, Char* result, Int result_size );
+ HChar* orig, HChar* result, Int result_size );
/* Demangle a Z-encoded name as described in pub_tool_redir.h.
Z-encoded names are used by Valgrind for doing function
Modified: trunk/drd/drd_clientobj.c (+1 -1)
===================================================================
--- trunk/drd/drd_clientobj.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/drd/drd_clientobj.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -243,7 +243,7 @@
}
}
-const char* DRD_(clientobj_type_name)(const ObjType t)
+const HChar* DRD_(clientobj_type_name)(const ObjType t)
{
switch (t)
{
Modified: trunk/include/pub_tool_seqmatch.h (+1 -1)
===================================================================
--- trunk/include/pub_tool_seqmatch.h 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/include/pub_tool_seqmatch.h 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -89,7 +89,7 @@
/* Mini-regexp function. Searches for 'pat' in 'str'. Supports
meta-symbols '*' and '?'. There is no way to escape meta-symbols
in the pattern. */
-Bool VG_(string_match) ( const Char* pat, const Char* str );
+Bool VG_(string_match) ( const HChar* pat, const HChar* str );
#endif // __PUB_TOOL_SEQMATCH_H
Modified: trunk/exp-dhat/dh_main.c (+6 -6)
===================================================================
--- trunk/exp-dhat/dh_main.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/exp-dhat/dh_main.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -801,7 +801,7 @@
Int goff_sp)
{
IRType tyAddr = Ity_INVALID;
- HChar* hName = NULL;
+ const HChar* hName= NULL;
void* hAddr = NULL;
IRExpr** argv = NULL;
IRDirty* di = NULL;
@@ -1031,12 +1031,12 @@
// FORWARDS
static Bool identify_metric ( /*OUT*/ULong(**get_metricP)(APInfo*),
/*OUT*/Bool* increasingP,
- HChar* metric_name );
+ const HChar* metric_name );
static Int clo_show_top_n = 10;
-static HChar* clo_sort_by = "max-bytes-live";
+static const HChar *clo_sort_by = "max-bytes-live";
-static Bool dh_process_cmd_line_option(Char* arg)
+static Bool dh_process_cmd_line_option(const HChar* arg)
{
if VG_BINT_CLO(arg, "--show-top-n", clo_show_top_n, 1, 100000) {}
@@ -1184,7 +1184,7 @@
string could not be identified.*/
static Bool identify_metric ( /*OUT*/ULong(**get_metricP)(APInfo*),
/*OUT*/Bool* increasingP,
- HChar* metric_name )
+ const HChar* metric_name )
{
if (0 == VG_(strcmp)(metric_name, "max-bytes-live")) {
*get_metricP = get_metric__max_bytes_live;
@@ -1212,7 +1212,7 @@
ULong (*get_metric)(APInfo*);
Bool increasing;
- HChar* metric_name = clo_sort_by;
+ const HChar* metric_name = clo_sort_by;
tl_assert(metric_name); // ensured by clo processing
Bool ok = identify_metric( &get_metric, &increasing, metric_name );
Modified: trunk/coregrind/m_oset.c (+3 -2)
===================================================================
--- trunk/coregrind/m_oset.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/m_oset.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -935,7 +935,7 @@
}
static void OSet_Print2( AvlTree* t, AvlNode* n,
- Char*(*strElem)(void *), Int p )
+ HChar*(*strElem)(void *), Int p )
{
// This is a recursive in-order traversal.
Int q = p;
@@ -947,7 +947,8 @@
}
__attribute__((unused))
-static void OSet_Print( AvlTree* t, const HChar *where, Char*(*strElem)(void *) )
+static void OSet_Print( AvlTree* t, const HChar *where,
+ HChar*(*strElem)(void *) )
{
VG_(printf)("-- start %s ----------------\n", where);
OSet_Print2(t, t->root, strElem, 0);
Modified: trunk/coregrind/m_libcproc.c (+38 -37)
===================================================================
--- trunk/coregrind/m_libcproc.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/m_libcproc.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -60,12 +60,12 @@
/* As deduced from sp_at_startup, the client's argc, argv[] and
envp[] as extracted from the client's stack at startup-time. */
-Char** VG_(client_envp) = NULL;
+HChar** VG_(client_envp) = NULL;
/* Path to library directory */
-const Char *VG_(libdir) = VG_LIBDIR;
+const HChar *VG_(libdir) = VG_LIBDIR;
-const Char *VG_(LD_PRELOAD_var_name) =
+const HChar *VG_(LD_PRELOAD_var_name) =
#if defined(VGO_linux)
"LD_PRELOAD";
#elif defined(VGO_darwin)
@@ -76,13 +76,13 @@
/* We do getenv without libc's help by snooping around in
VG_(client_envp) as determined at startup time. */
-Char *VG_(getenv)(Char *varname)
+HChar *VG_(getenv)(const HChar *varname)
{
Int i, n;
vg_assert( VG_(client_envp) );
n = VG_(strlen)(varname);
for (i = 0; VG_(client_envp)[i] != NULL; i++) {
- Char* s = VG_(client_envp)[i];
+ HChar* s = VG_(client_envp)[i];
if (VG_(strncmp)(varname, s, n) == 0 && s[n] == '=') {
return & s[n+1];
}
@@ -90,9 +90,9 @@
return NULL;
}
-void VG_(env_unsetenv) ( Char **env, const Char *varname )
+void VG_(env_unsetenv) ( HChar **env, const HChar *varname )
{
- Char **from, **to;
+ HChar **from, **to;
vg_assert(env);
vg_assert(varname);
to = NULL;
@@ -108,14 +108,15 @@
}
/* set the environment; returns the old env if a new one was allocated */
-Char **VG_(env_setenv) ( Char ***envp, const Char* varname, const Char *val )
+HChar **VG_(env_setenv) ( HChar ***envp, const HChar* varname,
+ const HChar *val )
{
- Char **env = (*envp);
- Char **cpp;
+ HChar **env = (*envp);
+ HChar **cpp;
Int len = VG_(strlen)(varname);
- Char *valstr = VG_(arena_malloc)(VG_AR_CORE, "libcproc.es.1",
- len + VG_(strlen)(val) + 2);
- Char **oldenv = NULL;
+ HChar *valstr = VG_(arena_malloc)(VG_AR_CORE, "libcproc.es.1",
+ len + VG_(strlen)(val) + 2);
+ HChar **oldenv = NULL;
VG_(sprintf)(valstr, "%s=%s", varname, val);
@@ -127,7 +128,7 @@
}
if (env == NULL) {
- env = VG_(arena_malloc)(VG_AR_CORE, "libcproc.es.2", sizeof(Char **) * 2);
+ env = VG_(arena_malloc)(VG_AR_CORE, "libcproc.es.2", sizeof(HChar *) * 2);
env[0] = valstr;
env[1] = NULL;
@@ -135,8 +136,8 @@
} else {
Int envlen = (cpp-env) + 2;
- Char **newenv = VG_(arena_malloc)(VG_AR_CORE, "libcproc.es.3",
- envlen * sizeof(Char **));
+ HChar **newenv = VG_(arena_malloc)(VG_AR_CORE, "libcproc.es.3",
+ envlen * sizeof(HChar *));
for (cpp = newenv; *env; )
*cpp++ = *env++;
@@ -162,18 +163,18 @@
This is also careful to mop up any excess ':'s, since empty strings
delimited by ':' are considered to be '.' in a path.
*/
-static void mash_colon_env(Char *varp, const Char *remove_pattern)
+static void mash_colon_env(HChar *varp, const HChar *remove_pattern)
{
- Char *const start = varp;
- Char *entry_start = varp;
- Char *output = varp;
+ HChar *const start = varp;
+ HChar *entry_start = varp;
+ HChar *output = varp;
if (varp == NULL)
return;
while(*varp) {
if (*varp == ':') {
- Char prev;
+ HChar prev;
Bool match;
/* This is a bit subtle: we want to match against the entry
@@ -219,7 +220,7 @@
// Removes all the Valgrind-added stuff from the passed environment. Used
// when starting child processes, so they don't see that added stuff.
-void VG_(env_remove_valgrind_env_stuff)(Char** envp)
+void VG_(env_remove_valgrind_env_stuff)(HChar** envp)
{
#if defined(VGO_darwin)
@@ -230,10 +231,10 @@
#endif
Int i;
- Char* ld_preload_str = NULL;
- Char* ld_library_path_str = NULL;
- Char* dyld_insert_libraries_str = NULL;
- Char* buf;
+ HChar* ld_preload_str = NULL;
+ HChar* ld_library_path_str = NULL;
+ HChar* dyld_insert_libraries_str = NULL;
+ HChar* buf;
// Find LD_* variables
// DDD: should probably conditionally compiled some of this:
@@ -296,11 +297,11 @@
}
/* clone the environment */
-Char **VG_(env_clone) ( Char **oldenv )
+HChar **VG_(env_clone) ( HChar **oldenv )
{
- Char **oldenvp;
- Char **newenvp;
- Char **newenv;
+ HChar **oldenvp;
+ HChar **newenvp;
+ HChar **newenv;
Int envlen;
vg_assert(oldenv);
@@ -309,7 +310,7 @@
envlen = oldenvp - oldenv + 1;
newenv = VG_(arena_malloc)(VG_AR_CORE, "libcproc.ec.1",
- envlen * sizeof(Char **));
+ envlen * sizeof(HChar *));
oldenvp = oldenv;
newenvp = newenv;
@@ -323,9 +324,9 @@
return newenv;
}
-void VG_(execv) ( Char* filename, Char** argv )
+void VG_(execv) ( const HChar* filename, HChar** argv )
{
- Char** envp;
+ HChar** envp;
SysRes res;
/* restore the DATA rlimit for the child */
@@ -342,7 +343,7 @@
/* Return -1 if error, else 0. NOTE does not indicate return code of
child! */
-Int VG_(system) ( Char* cmd )
+Int VG_(system) ( const HChar* cmd )
{
Int pid;
if (cmd == NULL)
@@ -352,7 +353,7 @@
return -1;
if (pid == 0) {
/* child */
- Char* argv[4] = { "/bin/sh", "-c", cmd, 0 };
+ const HChar* argv[4] = { "/bin/sh", "-c", cmd, 0 };
VG_(execv)(argv[0], argv);
/* If we're still alive here, execve failed. */
@@ -442,7 +443,7 @@
SysRes res = VG_(do_syscall0)(__NR_gettid);
if (sr_isError(res) && sr_Res(res) == VKI_ENOSYS) {
- Char pid[16];
+ HChar pid[16];
/*
* The gettid system call does not exist. The obvious assumption
* to make at this point would be that we are running on an older
@@ -460,7 +461,7 @@
res = VG_(do_syscall3)(__NR_readlink, (UWord)"/proc/self",
(UWord)pid, sizeof(pid));
if (!sr_isError(res) && sr_Res(res) > 0) {
- Char* s;
+ HChar* s;
pid[sr_Res(res)] = '\0';
res = VG_(mk_SysRes_Success)( VG_(strtoll10)(pid, &s) );
if (*s != '\0') {
Modified: trunk/cachegrind/cg_arch.h (+1 -1)
===================================================================
--- trunk/cachegrind/cg_arch.h 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/cachegrind/cg_arch.h 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -47,7 +47,7 @@
// If arg is a command line option configuring I1 or D1 or LL cache,
// then parses arg to set the relevant cache_t elements.
// Returns True if arg is a cache command line option, False otherwise.
-Bool VG_(str_clo_cache_opt)(Char *arg,
+Bool VG_(str_clo_cache_opt)(const HChar *arg,
cache_t* clo_I1c,
cache_t* clo_D1c,
cache_t* clo_LLc);
Modified: trunk/coregrind/m_libcfile.c (+19 -19)
===================================================================
--- trunk/coregrind/m_libcfile.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/m_libcfile.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -104,7 +104,7 @@
# endif
}
-SysRes VG_(mknod) ( const Char* pathname, Int mode, UWord dev )
+SysRes VG_(mknod) ( const HChar* pathname, Int mode, UWord dev )
{
# if defined(VGO_linux) || defined(VGO_darwin)
SysRes res = VG_(do_syscall3)(__NR_mknod,
@@ -115,7 +115,7 @@
return res;
}
-SysRes VG_(open) ( const Char* pathname, Int flags, Int mode )
+SysRes VG_(open) ( const HChar* pathname, Int flags, Int mode )
{
# if defined(VGO_linux)
SysRes res = VG_(do_syscall3)(__NR_open,
@@ -129,7 +129,7 @@
return res;
}
-Int VG_(fd_open) (const Char* pathname, Int flags, Int mode)
+Int VG_(fd_open) (const HChar* pathname, Int flags, Int mode)
{
SysRes sr;
sr = VG_(open) (pathname, flags, mode);
@@ -270,7 +270,7 @@
(_p_vgstat)->ctime_nsec = (ULong)( (_p_vkistat)->st_ctime_nsec ); \
} while (0)
-SysRes VG_(stat) ( const Char* file_name, struct vg_stat* vgbuf )
+SysRes VG_(stat) ( const HChar* file_name, struct vg_stat* vgbuf )
{
SysRes res;
VG_(memset)(vgbuf, 0, sizeof(*vgbuf));
@@ -377,13 +377,13 @@
return sr_isError(res) ? -1 : sr_Res(res);
}
-Int VG_(rename) ( const Char* old_name, const Char* new_name )
+Int VG_(rename) ( const HChar* old_name, const HChar* new_name )
{
SysRes res = VG_(do_syscall2)(__NR_rename, (UWord)old_name, (UWord)new_name);
return sr_isError(res) ? (-1) : 0;
}
-Int VG_(unlink) ( const Char* file_name )
+Int VG_(unlink) ( const HChar* file_name )
{
SysRes res = VG_(do_syscall1)(__NR_unlink, (UWord)file_name);
return sr_isError(res) ? (-1) : 0;
@@ -426,8 +426,8 @@
tell us the startup path. Note the env var is keyed to the
parent's PID, not ours, since our parent is the launcher
process. */
- { Char envvar[100];
- Char* wd = NULL;
+ { HChar envvar[100];
+ HChar* wd = NULL;
VG_(memset)(envvar, 0, sizeof(envvar));
VG_(sprintf)(envvar, "VALGRIND_STARTUP_PWD_%d_XYZZY",
(Int)VG_(getppid)());
@@ -446,7 +446,7 @@
/* Copy the previously acquired startup_wd into buf[0 .. size-1],
or return False if buf isn't big enough. */
-Bool VG_(get_startup_wd) ( Char* buf, SizeT size )
+Bool VG_(get_startup_wd) ( HChar* buf, SizeT size )
{
vg_assert(startup_wd_acquired);
vg_assert(startup_wd[ sizeof(startup_wd)-1 ] == 0);
@@ -470,7 +470,7 @@
}
-Int VG_(readlink) (const Char* path, Char* buf, UInt bufsiz)
+Int VG_(readlink) (const HChar* path, HChar* buf, UInt bufsiz)
{
SysRes res;
/* res = readlink( path, buf, bufsiz ); */
@@ -705,7 +705,7 @@
------------------------------------------------------------------ */
static
-Int parse_inet_addr_and_port ( UChar* str, UInt* ip_addr, UShort* port );
+Int parse_inet_addr_and_port ( const HChar* str, UInt* ip_addr, UShort* port );
static
Int my_connect ( Int sockfd, struct vki_sockaddr_in* serv_addr, Int addrlen );
@@ -763,7 +763,7 @@
the relevant file (socket) descriptor, otherwise.
is used.
*/
-Int VG_(connect_via_socket)( UChar* str )
+Int VG_(connect_via_socket)( const HChar* str )
{
# if defined(VGO_linux) || defined(VGO_darwin)
Int sd, res;
@@ -809,7 +809,7 @@
/* Let d = one or more digits. Accept either:
d.d.d.d or d.d.d.d:d
*/
-static Int parse_inet_addr_and_port ( UChar* str, UInt* ip_addr, UShort* port )
+static Int parse_inet_addr_and_port ( const HChar* str, UInt* ip_addr, UShort* port )
{
# define GET_CH ((*str) ? (*str++) : 0)
UInt ipa, i, j, c, any;
@@ -1054,11 +1054,11 @@
}
-Char *VG_(basename)(const Char *path)
+HChar *VG_(basename)(const HChar *path)
{
- static Char buf[VKI_PATH_MAX];
+ static HChar buf[VKI_PATH_MAX];
- const Char *p, *end;
+ const HChar *p, *end;
if (path == NULL ||
0 == VG_(strcmp)(path, ""))
@@ -1090,11 +1090,11 @@
}
-Char *VG_(dirname)(const Char *path)
+HChar *VG_(dirname)(const HChar *path)
{
- static Char buf[VKI_PATH_MAX];
+ static HChar buf[VKI_PATH_MAX];
- const Char *p;
+ const HChar *p;
if (path == NULL ||
0 == VG_(strcmp)(path, "") ||
Modified: trunk/coregrind/m_errormgr.c (+27 -27)
===================================================================
--- trunk/coregrind/m_errormgr.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/coregrind/m_errormgr.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -213,7 +213,7 @@
SuppLocTy ty;
Bool name_is_simple_str; /* True if name is a string without
'?' and '*' wildcard characters. */
- Char* name; /* NULL for NoName and DotDotDot */
+ HChar* name; /* NULL for NoName and DotDotDot */
}
SuppLoc;
@@ -224,7 +224,7 @@
struct _Supp {
struct _Supp* next;
Int count; // The number of times this error has been suppressed.
- Char* sname; // The name by which the suppression is referred to.
+ HChar* sname; // The name by which the suppression is referred to.
// Length of 'callers'
Int n_callers;
@@ -234,7 +234,7 @@
/* The tool-specific part */
SuppKind skind; // What kind of suppression. Must use the range (0..).
- Char* string; // String -- use is optional. NULL by default.
+ HChar* string; // String -- use is optional. NULL by default.
void* extra; // Anything else -- use is optional. NULL by default.
};
@@ -243,7 +243,7 @@
return su->skind;
}
-Char* VG_(get_supp_string) ( Supp* su )
+HChar* VG_(get_supp_string) ( Supp* su )
{
return su->string;
}
@@ -259,7 +259,7 @@
su->skind = skind;
}
-void VG_(set_supp_string) ( Supp* su, Char* string )
+void VG_(set_supp_string) ( Supp* su, HChar* string )
{
su->string = string;
}
@@ -317,7 +317,7 @@
static void printSuppForIp_XML(UInt n, Addr ip, void* uu_opaque)
{
- static UChar buf[ERRTXT_LEN];
+ static HChar buf[ERRTXT_LEN];
if ( VG_(get_fnname_no_cxx_demangle) (ip, buf, ERRTXT_LEN) ) {
VG_(printf_xml)(" <sframe> <fun>%pS</fun> </sframe>\n", buf);
} else
@@ -330,7 +330,7 @@
static void printSuppForIp_nonXML(UInt n, Addr ip, void* textV)
{
- static UChar buf[ERRTXT_LEN];
+ static HChar buf[ERRTXT_LEN];
XArray* /* of HChar */ text = (XArray*)textV;
if ( VG_(get_fnname_no_cxx_demangle) (ip, buf, ERRTXT_LEN) ) {
VG_(xaprintf)(text, " fun:%s\n", buf);
@@ -447,7 +447,7 @@
*/
Bool VG_(is_action_requested) ( const HChar* action, Bool* clo )
{
- Char ch, ch2;
+ HChar ch, ch2;
Int res;
/* First off, we shouldn't be asking the user anything if
@@ -1034,10 +1034,10 @@
/* Get the next char from fd into *out_buf. Returns 1 if success,
0 if eof or < 0 if error. */
-static Int get_char ( Int fd, Char* out_buf )
+static Int get_char ( Int fd, HChar* out_buf )
{
Int r;
- static Char buf[256];
+ static HChar buf[256];
static Int buf_size = 0;
static Int buf_used = 0;
vg_assert(buf_size >= 0 && buf_size <= 256);
@@ -1058,11 +1058,11 @@
return 1;
}
-Bool VG_(get_line) ( Int fd, Char** bufpp, SizeT* nBufp, Int* lineno )
+Bool VG_(get_line) ( Int fd, HChar** bufpp, SizeT* nBufp, Int* lineno )
{
- Char* buf = *bufpp;
+ HChar* buf = *bufpp;
SizeT nBuf = *nBufp;
- Char ch;
+ HChar ch;
Int n, i;
while (True) {
/* First, read until a non-blank char appears. */
@@ -1106,7 +1106,7 @@
/* True if s contains no wildcard (?, *) characters. */
-static Bool is_simple_str (Char *s)
+static Bool is_simple_str (const HChar *s)
{
while (*s) {
if (*s == '?' || *s == '*')
@@ -1125,7 +1125,7 @@
after the descriptor (fun: or obj:) part.
Returns False if failed.
*/
-static Bool setLocationTy ( SuppLoc* p, Char *buf )
+static Bool setLocationTy ( SuppLoc* p, HChar *buf )
{
if (VG_(strncmp)(buf, "fun:", 4) == 0) {
p->name = VG_(arena_strdup)(VG_AR_CORE,
@@ -1154,10 +1154,10 @@
/* Look for "tool" in a string like "tool1,tool2,tool3" */
-static Bool tool_name_present(const HChar *name, Char *names)
+static Bool tool_name_present(const HChar *name, HChar *names)
{
Bool found;
- Char *s = NULL; /* Shut gcc up */
+ HChar *s = NULL; /* Shut gcc up */
Int len = VG_(strlen)(name);
found = (NULL != (s = VG_(strstr)(names, name)) &&
@@ -1172,15 +1172,15 @@
and place them in the suppressions list. If there's any difficulty
doing this, just give up -- there's no point in trying to recover.
*/
-static void load_one_suppressions_file ( Char* filename )
+static void load_one_suppressions_file ( const HChar* filename )
{
SysRes sres;
Int fd, i, j, lineno = 0;
Bool eof;
SizeT nBuf = 200;
- Char* buf = VG_(malloc)("errormgr.losf.1", nBuf);
- Char* tool_names;
- Char* supp_name;
+ HChar* buf = VG_(malloc)("errormgr.losf.1", nBuf);
+ HChar* tool_names;
+ HChar* supp_name;
const HChar* err_str = NULL;
SuppLoc tmp_callers[VG_MAX_SUPP_CALLERS];
@@ -1424,9 +1424,9 @@
// All function names and object names will be concatenated
// in names. names is reallocated on demand.
- Char *names;
+ HChar *names;
Int names_szB; // size of names.
- Int names_free; // offset first free Char in names.
+ Int names_free; // offset first free HChar in names.
}
IPtoFunOrObjCompleter;
@@ -1445,8 +1445,8 @@
The function name or object name will be computed and added in
names if not yet done.
IP must be equal to focompl->ipc[ixIP]. */
-static Char* foComplete(IPtoFunOrObjCompleter* ip2fo,
- Addr IP, Int ixIP, Bool needFun)
+static HChar* foComplete(IPtoFunOrObjCompleter* ip2fo,
+ Addr IP, Int ixIP, Bool needFun)
{
vg_assert (ixIP < ip2fo->n_ips);
vg_assert (IP == ip2fo->ips[ixIP]);
@@ -1480,7 +1480,7 @@
ip2fo->names_szB + ERRTXT_LEN);
ip2fo->names_szB += ERRTXT_LEN;
}
- Char* caller_name = ip2fo->names + ip2fo->names_free;
+ HChar* caller_name = ip2fo->names + ip2fo->names_free;
(*offsets)[ixIP] = ip2fo->names_free;
if (needFun) {
/* Get the function name into 'caller_name', or "???"
@@ -1511,7 +1511,7 @@
Addr ip = *(Addr*)addrV; /* INPUT */
IPtoFunOrObjCompleter* ip2fo
= (IPtoFunOrObjCompleter*)inputCompleter;
- Char* funobj_name; // Fun or Obj name.
+ HChar* funobj_name; // Fun or Obj name.
/* So, does this IP address match this suppression-line? */
switch (supploc->ty) {
Modified: trunk/include/pub_tool_mallocfree.h (+2 -2)
===================================================================
--- trunk/include/pub_tool_mallocfree.h 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/include/pub_tool_mallocfree.h 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -40,8 +40,8 @@
extern void* VG_(malloc) ( const HChar* cc, SizeT nbytes );
extern void VG_(free) ( void* p );
extern void* VG_(calloc) ( const HChar* cc, SizeT n, SizeT bytes_per_elem );
-extern void* VG_(realloc) ( const HChar* cc, void* p, SizeT size );
-extern Char* VG_(strdup) ( const HChar* cc, const Char* s );
+extern void* VG_(realloc) ( const HChar* cc, void* p, SizeT size );
+extern HChar* VG_(strdup) ( const HChar* cc, const HChar* s );
// Returns the usable size of a heap-block. It's the asked-for size plus
// possibly some more due to rounding up.
Modified: trunk/helgrind/hg_basics.h (+3 -3)
===================================================================
--- trunk/helgrind/hg_basics.h 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/helgrind/hg_basics.h 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -39,9 +39,9 @@
#define HG_(str) VGAPPEND(vgHelgrind_,str)
-void* HG_(zalloc) ( const HChar* cc, SizeT n );
-void HG_(free) ( void* p );
-Char* HG_(strdup) ( const HChar* cc, const Char* s );
+void* HG_(zalloc) ( const HChar* cc, SizeT n );
+void HG_(free) ( void* p );
+HChar* HG_(strdup) ( const HChar* cc, const HChar* s );
static inline Bool HG_(is_sane_ThreadId) ( ThreadId coretid ) {
return coretid >= 0 && coretid < VG_N_THREADS;
Modified: trunk/exp-sgcheck/pc_common.c (+5 -5)
===================================================================
--- trunk/exp-sgcheck/pc_common.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/exp-sgcheck/pc_common.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -63,7 +63,7 @@
/* Bool h_clo_lossage_check = False; */ /* dev flag only */
Bool sg_clo_enable_sg_checks = True; /* user visible */
-Bool pc_process_cmd_line_options(Char* arg)
+Bool pc_process_cmd_line_options(const HChar* arg)
{
if VG_BOOL_CLO(arg, "--partial-loads-ok", h_clo_partial_loads_ok) {}
/* else if VG_BOOL_CLO(arg, "--lossage-check", h_clo_lossage_check) {} */
@@ -134,7 +134,7 @@
Seg* vseg;
XArray* descr1; /* XArray* of HChar */
XArray* descr2; /* XArray* of HChar */
- Char datasym[96];
+ HChar datasym[96];
PtrdiffT datasymoff;
} Heap;
struct {
@@ -200,7 +200,7 @@
/*a*/0, /*str*/NULL, /*extra*/(void*)&xe);
}
-void h_record_sysparam_error( ThreadId tid, CorePart part, Char* s,
+void h_record_sysparam_error( ThreadId tid, CorePart part, const HChar* s,
Addr lo, Addr hi, Seg* seglo, Seg* seghi )
{
XError xe;
@@ -720,7 +720,7 @@
return sizeof(XError);
}
-Bool pc_is_recognised_suppression ( Char* name, Supp *su )
+Bool pc_is_recognised_suppression ( const HChar* name, Supp *su )
{
SuppKind skind;
@@ -735,7 +735,7 @@
return True;
}
-Bool pc_read_extra_suppression_info ( Int fd, Char** bufpp,
+Bool pc_read_extra_suppression_info ( Int fd, HChar** bufpp,
SizeT* nBufp, Supp* su )
{
Bool eof;
Modified: trunk/callgrind/sim.c (+2 -2)
===================================================================
--- trunk/callgrind/sim.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/callgrind/sim.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -1457,7 +1457,7 @@
*
* Called from CLG_(process_cmd_line_option)() in clo.c
*/
-static Bool cachesim_parse_opt(Char* arg)
+static Bool cachesim_parse_opt(const HChar* arg)
{
if VG_BOOL_CLO(arg, "--simulate-wb", clo_simulate_writeback) {}
else if VG_BOOL_CLO(arg, "--simulate-hwpref", clo_simulate_hwpref) {}
@@ -1535,7 +1535,7 @@
FullCost total = CLG_(total_cost), D_total = 0;
ULong LL_total_m, LL_total_mr, LL_total_mw,
LL_total, LL_total_r, LL_total_w;
- char buf1[RESULTS_BUF_LEN],
+ HChar buf1[RESULTS_BUF_LEN],
buf2[RESULTS_BUF_LEN],
buf3[RESULTS_BUF_LEN];
Int p;
Modified: trunk/cachegrind/cg-arch.c (+5 -4)
===================================================================
--- trunk/cachegrind/cg-arch.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/cachegrind/cg-arch.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -76,10 +76,11 @@
}
-static void parse_cache_opt ( cache_t* cache, Char* opt, Char* optval )
+static void parse_cache_opt ( cache_t* cache, const HChar* opt,
+ const HChar* optval )
{
Long i1, i2, i3;
- Char* endptr;
+ HChar* endptr;
const HChar* checkRes;
// Option argument looks like "65536,2,64". Extract them.
@@ -112,12 +113,12 @@
}
-Bool VG_(str_clo_cache_opt)(Char *arg,
+Bool VG_(str_clo_cache_opt)(const HChar *arg,
cache_t* clo_I1c,
cache_t* clo_D1c,
cache_t* clo_LLc)
{
- Char* tmp_str;
+ const HChar* tmp_str;
if VG_STR_CLO(arg, "--I1", tmp_str) {
parse_cache_opt(clo_I1c, arg, tmp_str);
Modified: trunk/callgrind/clo.c (+14 -13)
===================================================================
--- trunk/callgrind/clo.c 2012-11-10 20:11:14 +00:00 (rev 13118)
+++ trunk/callgrind/clo.c 2012-11-10 22:29:54 +00:00 (rev 13119)
@@ -89,7 +89,7 @@
config_node* wild_star;
config_node* wild_char;
- Char name[1];
+ HChar name[1];
};
/* root of trie */
@@ -119,7 +119,7 @@
}
-static config_node* new_config(Char* name, int length)
+static config_node* new_config(const HChar* name, int length)
{
int i;
config_node* node = (config_node*) CLG_MALLOC("cl.clo.nc.1",
@@ -145,7 +145,7 @@
}
static __inline__
-Bool is_wild(Char n)
+Bool is_wild(HChar n)
{
return (n == '*') || (n == '?');
}
@@ -158,7 +158,7 @@
* tree root is stored into <*pnode>, and the created
* leaf (fn_config) for the given pattern is returned.
*/
-...
[truncated message content] |