return
GTXT ("See Chapter 19 of the \"Intel 64 and IA-32 Architectures Software Developer's Manual Volume 3B: System Programming Guide, Part 2\"\nOrder Number: 253669-045US, January 2013");
}
+#else
+ return GTXT ("Unknown cpu model");
#endif
}
init ();
/* set up header for file, file name, etc. */
- if (__collector_exp_dir_name == NULL)
+ if (*__collector_exp_dir_name == 0)
{
__collector_log_write ("<event kind=\"%s\" id=\"%d\">__collector_exp_dir_name==NULL</event>\n",
SP_JCMD_CERROR, COL_ERROR_EXPOPEN);
if (NULL_PTR (vfprintf))
init_io_intf ();
if (CHCK_REENTRANCE (guard) || stream == NULL)
- return CALL_REAL (vfprintf)(stream, format, ap);
+ {
+ ret = CALL_REAL (vfprintf)(stream, format, ap);
+ va_end (ap);
+ return ret;
+ }
PUSH_REENTRANCE (guard);
hrtime_t reqt = gethrtime ();
ret = CALL_REAL (vfprintf)(stream, format, ap);
+ va_end (ap);
if (RECHCK_REENTRANCE (guard))
{
POP_REENTRANCE (guard);
int
__collector_mutex_lock (collector_mutex_t *lock_var)
{
- volatile unsigned int i; /* xxxx volatile may not be honored on amd64 -x04 */
+ volatile unsigned int i = 0; /* xxxx volatile may not be honored on amd64 -x04 */
if (!(*lock_var) && !atomic_swap (lock_var, 1))
return 0;
const char *params = CALL_UTIL (getenv)(SP_COLLECTOR_PARAMS);
int ret;
- if (new_exp_name == NULL)
+ if (*new_exp_name == 0)
TprintfT (DBG_LT0, "linetrace_ext_fork_epilogue: ERROR: getenv(%s) undefined -- new expt aborted!\n",
SP_COLLECTOR_EXPNAME);
else if (params == NULL)
// like quit, but deletes all data loaded
{ HHELP, "xhelp", NULL, NULL, 0, &desc[HHELP]},
- { WHOAMI, "-whoami", NULL, NULL, 0, &desc[WHOAMI]},
+ { WHOAMI, "whoami", NULL, NULL, 0, NULL},
// these are not recognized at this point
{ LOADOBJECT, "segments", "pmap", NULL, 0, &desc[LOADOBJECT]},
Function::new_srcInfo ()
{
SrcInfo *t = new SrcInfo ();
+ t->src_line = NULL;
+ t->included_from = NULL;
t->next = srcinfo_list;
srcinfo_list = t;
return t;
return CMD_BAD_ARG;
bool soname_fmt = false;
- if (colon && (colon + 1))
+ if (colon)
{
colon++;
if (!strcasecmp (colon, NTXT ("soname")))
// now figure out if the platform can run it
struct utsname unbuf;
int r = uname (&unbuf);
- if (r == 0 && unbuf.machine && strstr (unbuf.machine, "_64") == NULL)
+ if (r == 0 && strstr (unbuf.machine, "_64") == NULL)
// machine can not run 64 bits, but this code is 64-bit
return EXEC_ELF_ARCH;
}
return v ? "true" : "false";
}
-inline char*
-str2str (String v)
+inline const char*
+str2str (const char* v)
{
- return (char*) (v ? v : "NULL");
+ return v ? v : "NULL";
}
-inline char*
-str2s (String v)
+inline const char*
+str2s (const char* v)
{
- return (char*) (v ? v : "");
+ return v ? v : "";
}
inline DbeView *