summaryrefslogtreecommitdiffstats
path: root/base/linux_util.h
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-16 19:28:17 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-16 19:28:17 +0000
commit662183140166357f5088c40b34d1096d7a56fba7 (patch)
treefcb9f1e004ff1534fcc4b6eb8a95e26e0fdb7fb6 /base/linux_util.h
parent3d79804c583eef9a0bc8bff30d41ca5a19ef1bc4 (diff)
downloadchromium_src-662183140166357f5088c40b34d1096d7a56fba7.zip
chromium_src-662183140166357f5088c40b34d1096d7a56fba7.tar.gz
chromium_src-662183140166357f5088c40b34d1096d7a56fba7.tar.bz2
Linux: Guess the thread id for crashing renderers in a different PID namespace.
BUG=48997 TEST=Google Chrome gets valid crash reports for about:crash most of the time. Review URL: http://codereview.chromium.org/2961008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/linux_util.h')
-rw-r--r--base/linux_util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/linux_util.h b/base/linux_util.h
index e810674..a4ba9b6 100644
--- a/base/linux_util.h
+++ b/base/linux_util.h
@@ -29,6 +29,12 @@ bool FileDescriptorGetInode(ino_t* inode_out, int fd);
// multiple processes hold the socket, this function returns false.
bool FindProcessHoldingSocket(pid_t* pid_out, ino_t socket_inode);
+// For a given process |pid|, look through all its threads and find the first
+// thread with /proc/[pid]/task/[thread_id]/syscall whose first N bytes matches
+// |expected_data|, where N is the length of |expected_data|.
+// Returns the thread id or -1 on error.
+pid_t FindThreadIDWithSyscall(pid_t pid, const std::string& expected_data);
+
} // namespace base
#endif // BASE_LINUX_UTIL_H_