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

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

Issue 1761023002: Add an optional root prefix to Linux dumpers (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Remove assertions 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // To get register definitions. 42 // To get register definitions.
43 #include <asm/reg.h> 43 #include <asm/reg.h>
44 #endif 44 #endif
45 45
46 #include "common/linux/linux_libc_support.h" 46 #include "common/linux/linux_libc_support.h"
47 47
48 namespace google_breakpad { 48 namespace google_breakpad {
49 49
50 LinuxCoreDumper::LinuxCoreDumper(pid_t pid, 50 LinuxCoreDumper::LinuxCoreDumper(pid_t pid,
51 const char* core_path, 51 const char* core_path,
52 const char* procfs_path) 52 const char* procfs_path,
53 : LinuxDumper(pid), 53 const char* root_prefix)
54 : LinuxDumper(pid, root_prefix),
54 core_path_(core_path), 55 core_path_(core_path),
55 procfs_path_(procfs_path), 56 procfs_path_(procfs_path),
56 thread_infos_(&allocator_, 8) { 57 thread_infos_(&allocator_, 8) {
57 assert(core_path_); 58 assert(core_path_);
58 } 59 }
59 60
60 bool LinuxCoreDumper::BuildProcPath(char* path, pid_t pid, 61 bool LinuxCoreDumper::BuildProcPath(char* path, pid_t pid,
61 const char* node) const { 62 const char* node) const {
62 if (!path || !node) 63 if (!path || !node)
63 return false; 64 return false;
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 } 249 }
249 #endif 250 #endif
250 } 251 }
251 note = note.GetNextNote(); 252 note = note.GetNextNote();
252 } while (note.IsValid()); 253 } while (note.IsValid());
253 254
254 return true; 255 return true;
255 } 256 }
256 257
257 } // namespace google_breakpad 258 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « src/client/linux/minidump_writer/linux_core_dumper.h ('k') | src/client/linux/minidump_writer/linux_core_dumper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698