" --colour=<WHEN> Colored syntax highlighting\n"
" WHEN is 'auto', 'always', or 'never'\n"
" --no-arg-names Don't dump argument names\n"
+ " --thread-ids Dump thread ids\n"
;
}
command(int argc, char *argv[])
{
trace::DumpFlags dumpFlags = 0;
+ bool dumpThreadIds = false;
int i;
color = COLOR_OPTION_NEVER;
} else if (!strcmp(arg, "--no-arg-names")) {
dumpFlags |= trace::DUMP_FLAG_NO_ARG_NAMES;
+ } else if (!strcmp(arg, "--thread-ids")) {
+ dumpThreadIds = true;
} else {
std::cerr << "error: unknown option " << arg << "\n";
usage();
while ((call = p.parse_call())) {
if (verbose ||
!(call->flags & trace::CALL_FLAG_VERBOSE)) {
+ if (dumpThreadIds) {
+ std::cout << std::hex << call->thread_id << std::dec << " ";
+ }
trace::dump(*call, std::cout, dumpFlags);
}
delete call;