From 4d690507171bff0f29dcf382b6909888d2f3bd17 Mon Sep 17 00:00:00 2001 From: Dominik Laskowski Date: Thu, 3 Mar 2016 16:14:00 -0500 Subject: Add an optional root prefix to Linux dumpers The Linux dumpers use absolute paths for shared libraries referenced by dumps, so they fail to locate them if the crash originated in a chroot. This CL enables callers to specify a root prefix, which is prepended to mapping paths before opening them. BUG=chromium:591792 TEST=make check Review URL: https://codereview.chromium.org/1761023002/ --- src/client/linux/minidump_writer/linux_core_dumper.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/client/linux/minidump_writer/linux_core_dumper.cc') diff --git a/src/client/linux/minidump_writer/linux_core_dumper.cc b/src/client/linux/minidump_writer/linux_core_dumper.cc index d7328245..622f0506 100644 --- a/src/client/linux/minidump_writer/linux_core_dumper.cc +++ b/src/client/linux/minidump_writer/linux_core_dumper.cc @@ -49,8 +49,9 @@ namespace google_breakpad { LinuxCoreDumper::LinuxCoreDumper(pid_t pid, const char* core_path, - const char* procfs_path) - : LinuxDumper(pid), + const char* procfs_path, + const char* root_prefix) + : LinuxDumper(pid, root_prefix), core_path_(core_path), procfs_path_(procfs_path), thread_infos_(&allocator_, 8) { -- cgit v1.2.1