Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: src/client/linux/minidump_writer/linux_core_dumper.h

Issue 1761023002: Add an optional root prefix to Linux dumpers (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, Google Inc. 1 // Copyright (c) 2012, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 29 matching lines...) Expand all
40 40
41 namespace google_breakpad { 41 namespace google_breakpad {
42 42
43 class LinuxCoreDumper : public LinuxDumper { 43 class LinuxCoreDumper : public LinuxDumper {
44 public: 44 public:
45 // Constructs a dumper for extracting information of a given process 45 // Constructs a dumper for extracting information of a given process
46 // with a process ID of |pid| via its core dump file at |core_path| and 46 // with a process ID of |pid| via its core dump file at |core_path| and
47 // its proc files at |procfs_path|. If |procfs_path| is a copy of 47 // its proc files at |procfs_path|. If |procfs_path| is a copy of
48 // /proc/<pid>, it should contain the following files: 48 // /proc/<pid>, it should contain the following files:
49 // auxv, cmdline, environ, exe, maps, status 49 // auxv, cmdline, environ, exe, maps, status
50 LinuxCoreDumper(pid_t pid, const char* core_path, const char* procfs_path); 50 // See LinuxDumper for the purpose of |root_prefix|.
51 LinuxCoreDumper(pid_t pid, const char* core_path, const char* procfs_path,
52 const char* root_prefix = "");
51 53
52 // Implements LinuxDumper::BuildProcPath(). 54 // Implements LinuxDumper::BuildProcPath().
53 // Builds a proc path for a certain pid for a node (/proc/<pid>/<node>). 55 // Builds a proc path for a certain pid for a node (/proc/<pid>/<node>).
54 // |path| is a character array of at least NAME_MAX bytes to return the 56 // |path| is a character array of at least NAME_MAX bytes to return the
55 // result.|node| is the final node without any slashes. Return true on 57 // result.|node| is the final node without any slashes. Return true on
56 // success. 58 // success.
57 // 59 //
58 // As this dumper performs a post-mortem dump and makes use of a copy 60 // As this dumper performs a post-mortem dump and makes use of a copy
59 // of the proc files of the crashed process, this derived method does 61 // of the proc files of the crashed process, this derived method does
60 // not actually make use of |pid| and always returns a subpath of 62 // not actually make use of |pid| and always returns a subpath of
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // Content of the core dump file. 116 // Content of the core dump file.
115 ElfCoreDump core_; 117 ElfCoreDump core_;
116 118
117 // Thread info found in the core dump file. 119 // Thread info found in the core dump file.
118 wasteful_vector<ThreadInfo> thread_infos_; 120 wasteful_vector<ThreadInfo> thread_infos_;
119 }; 121 };
120 122
121 } // namespace google_breakpad 123 } // namespace google_breakpad
122 124
123 #endif // CLIENT_LINUX_HANDLER_LINUX_CORE_DUMPER_H_ 125 #endif // CLIENT_LINUX_HANDLER_LINUX_CORE_DUMPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698