Fix more Char/HChar mixups. Closing in...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/drd/drd.h b/drd/drd.h
index c3537d2..9226ed1 100644
--- a/drd/drd.h
+++ b/drd/drd.h
@@ -440,7 +440,7 @@
 
    /* Tell DRD that a DRD annotation has not yet been implemented. */
    VG_USERREQ__DRD_ANNOTATION_UNIMP,
-   /* args: Char*. */
+   /* args: char*. */
 
    /* Tell DRD that a user-defined reader-writer synchronization object
     * has been created. */
@@ -466,7 +466,7 @@
    /* Tell DRD that a Helgrind annotation has not yet been implemented. */
    VG_USERREQ__HELGRIND_ANNOTATION_UNIMP
       = VG_USERREQ_TOOL_BASE('H','G') + 256 + 32,
-   /* args: Char*. */
+   /* args: char*. */
 
    /* Tell DRD to insert a happens-before annotation. */
    VG_USERREQ__DRD_ANNOTATE_HAPPENS_BEFORE
diff --git a/drd/drd_barrier.c b/drd/drd_barrier.c
index 06da0ec..f7c6d5c 100644
--- a/drd/drd_barrier.c
+++ b/drd/drd_barrier.c
@@ -55,8 +55,8 @@
 static void barrier_cleanup(struct barrier_info* p);
 static void barrier_delete_thread(struct barrier_info* const p,
                                   const DrdThreadId tid);
-static const char* barrier_get_typename(struct barrier_info* const p);
-static const char* barrier_type_name(const BarrierT bt);
+static const HChar* barrier_get_typename(struct barrier_info* const p);
+static const HChar* barrier_type_name(const BarrierT bt);
 static
 void barrier_report_wait_delete_race(const struct barrier_info* const p,
                                      const struct barrier_thread_info* const q);
@@ -540,14 +540,14 @@
    }
 }
 
-static const char* barrier_get_typename(struct barrier_info* const p)
+static const HChar* barrier_get_typename(struct barrier_info* const p)
 {
    tl_assert(p);
 
    return barrier_type_name(p->barrier_type);
 }
 
-static const char* barrier_type_name(const BarrierT bt)
+static const HChar* barrier_type_name(const BarrierT bt)
 {
    switch (bt)
    {
diff --git a/drd/drd_clientobj.c b/drd/drd_clientobj.c
index 1e9876b..a7996f5 100644
--- a/drd/drd_clientobj.c
+++ b/drd/drd_clientobj.c
@@ -243,7 +243,7 @@
    }
 }
 
-const char* DRD_(clientobj_type_name)(const ObjType t)
+const HChar* DRD_(clientobj_type_name)(const ObjType t)
 {
    switch (t)
    {
diff --git a/drd/drd_clientobj.h b/drd/drd_clientobj.h
index f177d85..fc4ae50 100644
--- a/drd/drd_clientobj.h
+++ b/drd/drd_clientobj.h
@@ -165,7 +165,7 @@
 Bool DRD_(clientobj_remove)(const Addr addr, const ObjType t);
 void DRD_(clientobj_stop_using_mem)(const Addr a1, const Addr a2);
 void DRD_(clientobj_delete_thread)(const DrdThreadId tid);
-const char* DRD_(clientobj_type_name)(const ObjType t);
+const HChar* DRD_(clientobj_type_name)(const ObjType t);
 
 
 #endif /* __DRD_CLIENTOBJ_H */
diff --git a/drd/drd_clientreq.c b/drd/drd_clientreq.c
index 49e1f11..8712764 100644
--- a/drd/drd_clientreq.c
+++ b/drd/drd_clientreq.c
@@ -142,7 +142,7 @@
       break;
 
    case VG_USERREQ__DRD_SET_THREAD_NAME:
-      DRD_(thread_set_name)(drd_tid, (const char*)arg[1]);
+      DRD_(thread_set_name)(drd_tid, (const HChar*)arg[1]);
       break;
 
    case VG_USERREQ__DRD_START_SUPPRESSION:
@@ -440,7 +440,7 @@
 
    case VG_USERREQ__POST_SEM_OPEN:
       if (DRD_(thread_leave_synchr)(drd_tid) == 0)
-         DRD_(semaphore_open)(arg[1], (Char*)arg[2], arg[3], arg[4], arg[5]);
+         DRD_(semaphore_open)(arg[1], (HChar*)arg[2], arg[3], arg[4], arg[5]);
       break;
 
    case VG_USERREQ__PRE_SEM_CLOSE:
@@ -548,7 +548,7 @@
           * freed, e.g. because it points to static data.
           */
          UnimpClReqInfo UICR =
-            { DRD_(thread_get_running_tid)(), (Char*)arg[1] };
+            { DRD_(thread_get_running_tid)(), (HChar*)arg[1] };
          VG_(maybe_record_error)(vg_tid,
                                  UnimpHgClReq,
                                  VG_(get_IP)(vg_tid),
@@ -563,7 +563,7 @@
           * freed, e.g. because it points to static data.
           */
          UnimpClReqInfo UICR =
-            { DRD_(thread_get_running_tid)(), (Char*)arg[1] };
+            { DRD_(thread_get_running_tid)(), (HChar*)arg[1] };
          VG_(maybe_record_error)(vg_tid,
                                  UnimpDrdClReq,
                                  VG_(get_IP)(vg_tid),
diff --git a/drd/drd_error.c b/drd/drd_error.c
index feb1494..cf1944d 100644
--- a/drd/drd_error.c
+++ b/drd/drd_error.c
@@ -56,7 +56,7 @@
    s_show_conflicting_segments = scs;
 }
 
-void DRD_(trace_msg)(const char* format, ...)
+void DRD_(trace_msg)(const HChar* format, ...)
 {
    va_list vargs;
    va_start(vargs, format);
@@ -71,7 +71,7 @@
    va_end(vargs);
 }
 
-void DRD_(trace_msg_w_bt)(const char* format, ...)
+void DRD_(trace_msg_w_bt)(const HChar* format, ...)
 {
    va_list vargs;
    va_start(vargs, format);
@@ -92,8 +92,8 @@
 /**
  * Emit error message detail in the format requested by the user.
  */
-static void print_err_detail(const char* format, ...) PRINTF_CHECK(1, 2);
-static void print_err_detail(const char* format, ...)
+static void print_err_detail(const HChar* format, ...) PRINTF_CHECK(1, 2);
+static void print_err_detail(const HChar* format, ...)
 {
    va_list vargs;
    va_start(vargs, format);
@@ -154,11 +154,11 @@
 void drd_report_data_race(Error* const err, const DataRaceErrInfo* const dri)
 {
    const Bool xml = VG_(clo_xml);
-   const char* const what_prefix = xml ? "  <what>" : "";
-   const char* const what_suffix = xml ? "</what>" : "";
-   const char* const auxwhat_prefix = xml ? "  <auxwhat>" : "";
-   const char* const auxwhat_suffix = xml ? "</auxwhat>" : "";
-   const char* const indent = xml ? "  " : "";
+   const HChar* const what_prefix = xml ? "  <what>" : "";
+   const HChar* const what_suffix = xml ? "</what>" : "";
+   const HChar* const auxwhat_prefix = xml ? "  <auxwhat>" : "";
+   const HChar* const auxwhat_suffix = xml ? "</auxwhat>" : "";
+   const HChar* const indent = xml ? "  " : "";
    AddrInfo ai;
 
    XArray* /* of HChar */ descr1
@@ -222,7 +222,7 @@
       if (xml)
          print_err_detail("  </allocation_context>\n");
    } else {
-      char sect_name[64];
+      HChar sect_name[64];
       VgSectKind sect_kind;
 
       sect_kind = VG_(DebugInfo_sect_kind)(sect_name, sizeof(sect_name),
@@ -301,8 +301,8 @@
 static void drd_tool_error_pp(Error* const e)
 {
    const Bool xml = VG_(clo_xml);
-   const char* const what_prefix = xml ? "  <what>" : "";
-   const char* const what_suffix = xml ? "</what>" : "";
+   const HChar* const what_prefix = xml ? "  <what>" : "";
+   const HChar* const what_suffix = xml ? "</what>" : "";
 
    if (xml)
       VG_(printf_xml)( "  <kind>%pS</kind>\n", drd_get_error_name(e));
@@ -507,7 +507,8 @@
  * types supported by DRD. So try to match the suppression name against the
  * names of DRD error types.
  */
-static Bool drd_is_recognized_suppression(Char* const name, Supp* const supp)
+static Bool drd_is_recognized_suppression(const HChar* const name,
+                                          Supp* const supp)
 {
    DrdErrorKind skind = 0;
 
@@ -554,7 +555,7 @@
  * that reading the 'extra' lines succeeded.
  */
 static
-Bool drd_read_extra_suppression_info(Int fd, Char** bufpp,
+Bool drd_read_extra_suppression_info(Int fd, HChar** bufpp,
                                      SizeT* nBufp, Supp* supp)
 {
    return True;
diff --git a/drd/drd_error.h b/drd/drd_error.h
index e6ed640..0829d11 100644
--- a/drd/drd_error.h
+++ b/drd/drd_error.h
@@ -90,8 +90,8 @@
    ExeContext* lastchange;    //   Mallocd
    DrdThreadId stack_tid;     //   Stack
    DebugInfo*  debuginfo;     //   Segment
-   Char        name[256];     //   Segment
-   Char        descr[256];    //   Segment
+   HChar       name[256];     //   Segment
+   HChar       descr[256];    //   Segment
 } AddrInfo;
 
 /*
@@ -174,13 +174,13 @@
 
 typedef struct {
    DrdThreadId tid;
-   Char*       descr;
+   HChar*      descr;
 } UnimpClReqInfo;
 
 void DRD_(set_show_conflicting_segments)(const Bool scs);
 void DRD_(register_error_handlers)(void);
-void DRD_(trace_msg)(const char* format, ...) PRINTF_CHECK(1, 2);
-void DRD_(trace_msg_w_bt)(const char* format, ...) PRINTF_CHECK(1, 2);
+void DRD_(trace_msg)(const HChar* format, ...) PRINTF_CHECK(1, 2);
+void DRD_(trace_msg_w_bt)(const HChar* format, ...) PRINTF_CHECK(1, 2);
 
 
 #endif /* __DRD_ERROR_H */
diff --git a/drd/drd_load_store.c b/drd/drd_load_store.c
index d5d46ce..6791555 100644
--- a/drd/drd_load_store.c
+++ b/drd/drd_load_store.c
@@ -93,7 +93,7 @@
 {
    if (DRD_(is_any_traced)(addr, addr + size))
    {
-      char* vc;
+      HChar* vc;
 
       vc = DRD_(vc_aprint)(DRD_(thread_get_vc)(DRD_(thread_get_running_tid)()));
       if (access_type == eStore && size <= sizeof(HWord)) {
diff --git a/drd/drd_main.c b/drd/drd_main.c
index 624c5f7..1147795 100644
--- a/drd/drd_main.c
+++ b/drd/drd_main.c
@@ -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));
    }
diff --git a/drd/drd_mutex.c b/drd/drd_mutex.c
index a3347e9..a073f56 100644
--- a/drd/drd_mutex.c
+++ b/drd/drd_mutex.c
@@ -445,14 +445,14 @@
    }
 }
 
-const char* DRD_(mutex_get_typename)(struct mutex_info* const p)
+const HChar* DRD_(mutex_get_typename)(struct mutex_info* const p)
 {
    tl_assert(p);
 
    return DRD_(mutex_type_name)(p->mutex_type);
 }
 
-const char* DRD_(mutex_type_name)(const MutexT mt)
+const HChar* DRD_(mutex_type_name)(const MutexT mt)
 {
    switch (mt)
    {
diff --git a/drd/drd_mutex.h b/drd/drd_mutex.h
index 41bd87f..205d43d 100644
--- a/drd/drd_mutex.h
+++ b/drd/drd_mutex.h
@@ -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);
diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c
index f883f7c..9eaae07 100644
--- a/drd/drd_pthread_intercepts.c
+++ b/drd/drd_pthread_intercepts.c
@@ -367,7 +367,7 @@
 #if defined(linux)
 #if defined(_CS_GNU_LIBPTHREAD_VERSION)
    /* Linux with a recent glibc. */
-   char buffer[256];
+   HChar buffer[256];
    unsigned len;
    len = confstr(_CS_GNU_LIBPTHREAD_VERSION, buffer, sizeof(buffer));
    assert(len <= sizeof(buffer));
diff --git a/drd/drd_segment.c b/drd/drd_segment.c
index 775bcd7..7d5d5d9 100644
--- a/drd/drd_segment.c
+++ b/drd/drd_segment.c
@@ -94,7 +94,7 @@
 
    if (s_trace_segment)
    {
-      char* vc;
+      HChar* vc;
 
       vc = DRD_(vc_aprint)(&sg->vc);
       VG_(message)(Vg_DebugMsg, "New segment for thread %d with vc %s\n",
@@ -138,7 +138,7 @@
 {
    if (DRD_(sg_get_trace)())
    {
-      char* vc;
+      HChar* vc;
 
       vc = DRD_(vc_aprint)(&sg->vc);
       VG_(message)(Vg_DebugMsg, "Discarding the segment with vector clock %s\n",
@@ -179,7 +179,7 @@
 
    if (s_trace_segment)
    {
-      char* vc;
+      HChar* vc;
 
       vc = DRD_(vc_aprint)(&sg->vc);
       VG_(message)(Vg_DebugMsg,
@@ -206,7 +206,7 @@
 
    if (s_trace_segment)
    {
-      char *vc1, *vc2;
+      HChar *vc1, *vc2;
 
       vc1 = DRD_(vc_aprint)(&sg1->vc);
       vc2 = DRD_(vc_aprint)(&sg2->vc);
diff --git a/drd/drd_semaphore.c b/drd/drd_semaphore.c
index 226c5ea..3a8b207 100644
--- a/drd/drd_semaphore.c
+++ b/drd/drd_semaphore.c
@@ -245,7 +245,7 @@
 
 /** Called after sem_open(). */
 struct semaphore_info* DRD_(semaphore_open)(const Addr semaphore,
-                                            const Char* name, const Word oflag,
+                                            const HChar* name, const Word oflag,
                                             const Word mode, const UInt value)
 {
    struct semaphore_info* p;
diff --git a/drd/drd_semaphore.h b/drd/drd_semaphore.h
index 2ebc130..62042a5 100644
--- a/drd/drd_semaphore.h
+++ b/drd/drd_semaphore.h
@@ -42,7 +42,7 @@
                                             const UInt value);
 void DRD_(semaphore_destroy)(const Addr semaphore);
 struct semaphore_info* DRD_(semaphore_open)(const Addr semaphore,
-                                            const Char* name, const Word oflag,
+                                            const HChar* name, const Word oflag,
                                             const Word mode, const UInt value);
 void DRD_(semaphore_close)(const Addr semaphore);
 void DRD_(semaphore_pre_wait)(const Addr semaphore);
diff --git a/drd/drd_suppression.c b/drd/drd_suppression.c
index 282ce7a..65768cb 100644
--- a/drd/drd_suppression.c
+++ b/drd/drd_suppression.c
@@ -60,7 +60,7 @@
 }
 
 void DRD_(start_suppression)(const Addr a1, const Addr a2,
-                             const char* const reason)
+                             const HChar* const reason)
 {
    if (s_trace_suppression)
       VG_(message)(Vg_DebugMsg, "start suppression of 0x%lx sz %ld (%s)\n",
diff --git a/drd/drd_suppression.h b/drd/drd_suppression.h
index 0fe8bdf..908877a 100644
--- a/drd/drd_suppression.h
+++ b/drd/drd_suppression.h
@@ -12,7 +12,7 @@
 void DRD_(suppression_set_trace)(const Bool trace_suppression);
 void DRD_(suppression_init)(void);
 void DRD_(start_suppression)(const Addr a1, const Addr a2,
-                             const char* const reason);
+                             const HChar* const reason);
 void DRD_(finish_suppression)(const Addr a1, const Addr a2);
 Bool DRD_(is_suppressed)(const Addr a1, const Addr a2);
 Bool DRD_(is_any_suppressed)(const Addr a1, const Addr a2);
diff --git a/drd/drd_thread.c b/drd/drd_thread.c
index adc6f62..160ce07 100644
--- a/drd/drd_thread.c
+++ b/drd/drd_thread.c
@@ -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,
diff --git a/drd/drd_thread.h b/drd/drd_thread.h
index 68e2917..1f2b0d4 100644
--- a/drd/drd_thread.h
+++ b/drd/drd_thread.h
@@ -75,7 +75,7 @@
    Addr      stack_startup; /**<Stack pointer after pthread_create() finished.*/
    Addr      stack_max;     /**< Top of stack. */
    SizeT     stack_size;    /**< Maximum size of stack. */
-   char      name[64];      /**< User-assigned thread name. */
+   HChar     name[64];      /**< User-assigned thread name. */
    Bool      on_alt_stack;
    /** Whether this structure contains valid information. */
    Bool      valid;
@@ -158,8 +158,8 @@
 void DRD_(thread_set_joinable)(const DrdThreadId tid, const Bool joinable);
 void DRD_(thread_entering_pthread_create)(const DrdThreadId tid);
 void DRD_(thread_left_pthread_create)(const DrdThreadId tid);
-const char* DRD_(thread_get_name)(const DrdThreadId tid);
-void DRD_(thread_set_name)(const DrdThreadId tid, const char* const name);
+const HChar* DRD_(thread_get_name)(const DrdThreadId tid);
+void DRD_(thread_set_name)(const DrdThreadId tid, const HChar* const name);
 void DRD_(thread_set_vg_running_tid)(const ThreadId vg_tid);
 void DRD_(thread_set_running_tid)(const ThreadId vg_tid,
                                   const DrdThreadId drd_tid);
diff --git a/drd/drd_vc.c b/drd/drd_vc.c
index f1d34d1..078a99a 100644
--- a/drd/drd_vc.c
+++ b/drd/drd_vc.c
@@ -236,7 +236,7 @@
 /** Print the contents of vector clock 'vc'. */
 void DRD_(vc_print)(const VectorClock* const vc)
 {
-   char* str;
+   HChar* str;
 
    if ((str = DRD_(vc_aprint)(vc)) != NULL)
    {
@@ -249,12 +249,12 @@
  * Print the contents of vector clock 'vc' to a newly allocated string.
  * The caller must call VG_(free)() on the return value of this function.
  */
-char* DRD_(vc_aprint)(const VectorClock* const vc)
+HChar* DRD_(vc_aprint)(const VectorClock* const vc)
 {
    unsigned i;
    unsigned reserved;
    unsigned size;
-   char* str = 0;
+   HChar* str = 0;
 
    tl_assert(vc);
    reserved = 64;
diff --git a/drd/drd_vc.h b/drd/drd_vc.h
index 096ad88..bf8ab10 100644
--- a/drd/drd_vc.h
+++ b/drd/drd_vc.h
@@ -87,7 +87,7 @@
 void DRD_(vc_combine)(VectorClock* const result,
                       const VectorClock* const rhs);
 void DRD_(vc_print)(const VectorClock* const vc);
-char* DRD_(vc_aprint)(const VectorClock* const vc);
+HChar* DRD_(vc_aprint)(const VectorClock* const vc);
 void DRD_(vc_check)(const VectorClock* const vc);
 void DRD_(vc_test)(void);
 
diff --git a/drd/tests/unit_vc.c b/drd/tests/unit_vc.c
index 4364fda..aff5ebf 100644
--- a/drd/tests/unit_vc.c
+++ b/drd/tests/unit_vc.c
@@ -42,7 +42,7 @@
 { UInt ret; va_list vargs; va_start(vargs, format); ret = vprintf(format, vargs); va_end(vargs); return ret; }
 UInt VG_(snprintf)(HChar* buf, Int size, const HChar *format, ...)
 { UInt ret; va_list vargs; va_start(vargs, format); ret = vsnprintf(buf, size, format, vargs); va_end(vargs); return ret; }
-SizeT VG_(strlen)(const Char* str) { return strlen(str); }
+SizeT VG_(strlen)(const HChar* str) { return strlen(str); }
 UInt VG_(message)(VgMsgKind kind, const HChar* format, ...)
 { UInt ret; va_list vargs; va_start(vargs, format); ret = vprintf(format, vargs); va_end(vargs); printf("\n"); return ret; }
 Bool DRD_(is_suppressed)(const Addr a1, const Addr a2)