Always check thread metadata
The thread metadata file is mandatory for trace version 2, so the emulator should fail if the file is not there or has the wrong version. Old traces with version 1 are not supported.
This commit is contained in:
parent
c424a3177d
commit
998200d507
@ -50,8 +50,6 @@ create_thread(struct proc *proc, const char *tracedir, const char *relpath)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Old version 1 doesn't have thread metadata */
|
||||
if (proc->metadata_version > 1) {
|
||||
/* Build metadata path */
|
||||
char mpath[PATH_MAX];
|
||||
if (snprintf(mpath, PATH_MAX, "%s/%s/thread.%d.json",
|
||||
@ -64,7 +62,6 @@ create_thread(struct proc *proc, const char *tracedir, const char *relpath)
|
||||
err("cannot load metadata from %s", mpath);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (proc_add_thread(proc, thread) != 0) {
|
||||
err("failed to add thread to proc");
|
||||
|
Loading…
Reference in New Issue
Block a user