aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/minidump_writer/linux_dumper.h
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-11-19 19:57:07 +0000
committerthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-11-19 19:57:07 +0000
commit3665a7d09bb32ab3939635daec398618dd1ef955 (patch)
treedcafba6bde2e1dd5db7389500654d291d01b43b4 /src/client/linux/minidump_writer/linux_dumper.h
parentAdd specific curl headers to facilitate building on Ubuntu Lucid (diff)
downloadbreakpad-3665a7d09bb32ab3939635daec398618dd1ef955.tar.xz
Linux: Attempt to generate an ELF identifier for deleted running binaries.
Review URL: http://breakpad.appspot.com/228001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@733 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/minidump_writer/linux_dumper.h')
-rw-r--r--src/client/linux/minidump_writer/linux_dumper.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/client/linux/minidump_writer/linux_dumper.h b/src/client/linux/minidump_writer/linux_dumper.h
index 71d1188f..16b15f3c 100644
--- a/src/client/linux/minidump_writer/linux_dumper.h
+++ b/src/client/linux/minidump_writer/linux_dumper.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009, Google Inc.
+// Copyright (c) 2010, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -165,6 +165,17 @@ class LinuxDumper {
bool EnumerateMappings(wasteful_vector<MappingInfo*>* result) const;
bool EnumerateThreads(wasteful_vector<pid_t>* result) const;
+ // For the case where a running program has been deleted, it'll show up in
+ // /proc/pid/maps as "/path/to/program (deleted)". If this is the case, then
+ // see if '/path/to/program (deleted)' matches /proc/pid/exe and return
+ // /proc/pid/exe in |path| so ELF identifier generation works correctly. This
+ // also checks to see if '/path/to/program (deleted)' exists, so it does not
+ // get fooled by a poorly named binary.
+ // For programs that don't end with ' (deleted)', this is a no-op.
+ // This assumes |path| is a buffer with length NAME_MAX.
+ // Returns true if |path| is modified.
+ bool HandleDeletedFileInMapping(char* path);
+
const pid_t pid_;
mutable PageAllocator allocator_;