}
__attribute__ ((noreturn))
-static void report_and_quit ( const Char* report,
+static void report_and_quit ( const HChar* report,
UnwindStartRegs* startRegsIN )
{
Addr stacktop;
VG_(exit)(1);
}
-void VG_(assert_fail) ( Bool isCore, const Char* expr, const Char* file,
- Int line, const Char* fn, const HChar* format, ... )
+void VG_(assert_fail) ( Bool isCore, const HChar* expr, const HChar* file,
+ Int line, const HChar* fn, const HChar* format, ... )
{
va_list vargs;
Char buf[256];
- Char* component;
- Char* bugs_to;
+ const HChar* component;
+ const HChar* bugs_to;
static Bool entered = False;
if (entered)
}
__attribute__ ((noreturn))
-static void panic ( Char* name, Char* report, Char* str,
+static void panic ( const HChar* name, const HChar* report, const HChar* str,
UnwindStartRegs* startRegs )
{
if (VG_(clo_xml))
report_and_quit(report, startRegs);
}
-void VG_(core_panic_at) ( Char* str, UnwindStartRegs* startRegs )
+void VG_(core_panic_at) ( const HChar* str, UnwindStartRegs* startRegs )
{
panic("valgrind", VG_BUGS_TO, str, startRegs);
}
-void VG_(core_panic) ( Char* str )
+void VG_(core_panic) ( const HChar* str )
{
VG_(core_panic_at)(str, NULL);
}
-void VG_(tool_panic) ( Char* str )
+void VG_(tool_panic) ( const HChar* str )
{
panic(VG_(details).name, VG_(details).bug_reports_to, str, NULL);
}
/* Print some helpful-ish text about unimplemented things, and give up. */
-void VG_(unimplemented) ( Char* msg )
+void VG_(unimplemented) ( const HChar* msg )
{
if (VG_(clo_xml))
VG_(printf_xml)("</valgrindoutput>\n");
/*--------------------------------------------------------------------*/
/*--- end ---*/
/*--------------------------------------------------------------------*/
-
return count;
}
-void VG_(fmsg_bad_option) ( HChar* opt, const HChar* format, ... )
+void VG_(fmsg_bad_option) ( const HChar* opt, const HChar* format, ... )
{
va_list vargs;
va_start(vargs,format);
}
__attribute__((noreturn))
-void VG_(err_config_error) ( Char* format, ... )
+void VG_(err_config_error) ( const HChar* format, ... )
{
va_list vargs;
va_start(vargs,format);
0)))
__attribute__ ((__noreturn__))
-extern void VG_(core_panic) ( Char* str );
+extern void VG_(core_panic) ( const HChar* str );
__attribute__ ((__noreturn__))
-extern void VG_(core_panic_at) ( Char* str, UnwindStartRegs* );
+extern void VG_(core_panic_at) ( const HChar* str, UnwindStartRegs* );
/* Called when some unhandleable client behaviour is detected.
Prints a msg and aborts. */
-extern void VG_(unimplemented) ( Char* msg )
+extern void VG_(unimplemented) ( const HChar* msg )
__attribute__((__noreturn__));
/* Show the state of all threads. Mostly for debugging V. */
/* Similarly - complain and stop if there is some kind of config
error. */
__attribute__((noreturn))
-extern void VG_(err_config_error) ( Char* format, ... );
+extern void VG_(err_config_error) ( const HChar* format, ... );
#endif // __PUB_CORE_LIBCPRINT_H
#define tl_assert(expr) \
((void) (LIKELY(expr) ? 0 : \
- (VG_(assert_fail) (/*isCore?*/False, (const Char*)#expr, \
- (const Char*)__FILE__, __LINE__, \
- (const Char*)__PRETTY_FUNCTION__, \
- (const HChar*)""), \
+ (VG_(assert_fail) (/*isCore?*/False, #expr, \
+ __FILE__, __LINE__, \
+ __PRETTY_FUNCTION__, \
+ ""), \
0)))
#define tl_assert2(expr, format, args...) \
((void) (LIKELY(expr) ? 0 : \
- (VG_(assert_fail) (/*isCore?*/False, (const Char*)#expr, \
- (const Char*)__FILE__, __LINE__, \
- (const Char*)__PRETTY_FUNCTION__, \
+ (VG_(assert_fail) (/*isCore?*/False, #expr, \
+ __FILE__, __LINE__, \
+ __PRETTY_FUNCTION__, \
format, ##args), \
0)))
/* Prints a panic message, appends newline and bug reporting info, aborts. */
__attribute__ ((__noreturn__))
-extern void VG_(tool_panic) ( Char* str );
+extern void VG_(tool_panic) ( const HChar* str );
__attribute__ ((__noreturn__))
-extern void VG_(assert_fail) ( Bool isCore, const Char* expr, const Char* file,
- Int line, const Char* fn,
+extern void VG_(assert_fail) ( Bool isCore, const HChar* expr, const HChar* file,
+ Int line, const HChar* fn,
const HChar* format, ... );
#endif // __PUB_TOOL_LIBCBASSERT_H
// an option was given an inappropriate argument. This function prints an
// error message, then shuts down the entire system.
__attribute__((noreturn))
-extern void VG_(fmsg_bad_option) ( HChar* opt, const HChar* format, ... )
+extern void VG_(fmsg_bad_option) ( const HChar* opt, const HChar* format, ... )
PRINTF_CHECK(2, 3);
// This is used for messages that are interesting to the user: info about