static struct crash_info {
char *cmd_info;
char *pid_info;
+ char *tid_info;
char time_info[80];
char temp_dir[PATH_MAX];
char name[FILENAME_MAX];
time_t time_val;
struct tm loc_tm;
- crash_info.cmd_info = argv[6];
crash_info.pid_info = argv[1];
+ crash_info.tid_info = argv[2];
+ crash_info.cmd_info = argv[7];
- time_val = atoll(argv[5]);
+ time_val = atoll(argv[6]);
localtime_r(&time_val, &loc_tm);
strftime(crash_info.time_info, sizeof(crash_info.time_info),
"%Y%m%d%H%M%S", &loc_tm);
/* Execute crash-stack */
/*
ret = snprintf(command, sizeof(command),
- "%s --pid %s >> %s",
+ "%s --pid %s --tid %s >> %s",
CRASH_STACK_PATH,
- crash_info.pid_info, crash_info.info_path);
+ crash_info.pid_info,
+ crash_info.tid_info,
+ crash_info.info_path);
if (ret < 0) {
_E("Failed to snprintf for crash-stack command");
return;
/* .dbugmode: launch crash-popup */
if (access(DEBUGMODE_FILE, F_OK) == 0)
- launch_crash_popup(argv[7]);
+ launch_crash_popup(argv[8]);
/* Exec dump_systemstate */
dump_system_state();
*/
enum {
OPT_PID,
+ OPT_TID,
OPT_OUTPUTFILE,
OPT_ERRFILE
};
*/
const struct option opts[] = {
{ "pid", required_argument, 0, OPT_PID },
+ { "tid", required_argument, 0, OPT_TID },
{ "output", required_argument, 0, OPT_OUTPUTFILE },
{ "erroutput", required_argument, 0, OPT_ERRFILE },
{ 0, 0, 0, 0 }
{
int c, i;
pid_t pid = 0;
+ /* pid_t tid = 0; */
const char *core_file_name;
case OPT_PID:
pid = atoi(optarg);
break;
+ case OPT_TID:
+ /* tid = atoi(optarg); */
+ break;
case OPT_OUTPUTFILE:
outputfile = fopen(optarg, "w");
break;