aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac/dump_syms.cc
diff options
context:
space:
mode:
authorTobias Sargeant <tobiasjs@google.com>2017-10-18 16:39:09 +0100
committerTobias Sargeant <tobiasjs@chromium.org>2017-10-18 15:44:59 +0000
commit072f86ca83bb7138fe33f10b6380badd9ef7f065 (patch)
treec092b3f9e8788143d50211fa2e96a62148054d32 /src/common/mac/dump_syms.cc
parentMove main executable handling out of procmaps parser loop. (diff)
downloadbreakpad-072f86ca83bb7138fe33f10b6380badd9ef7f065.tar.xz
Provide helper wrappers for basename(3) and dirname(3)
This hides the need to provide mutable C strings, and unifies existing basename calls and variations in a single location. Change-Id: Idfb449c47b1421f1a751efc3d7404f15f8b369ca Reviewed-on: https://chromium-review.googlesource.com/725731 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'src/common/mac/dump_syms.cc')
-rw-r--r--src/common/mac/dump_syms.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/mac/dump_syms.cc b/src/common/mac/dump_syms.cc
index eb927292..66757cda 100644
--- a/src/common/mac/dump_syms.cc
+++ b/src/common/mac/dump_syms.cc
@@ -38,7 +38,6 @@
#include <assert.h>
#include <dirent.h>
#include <errno.h>
-#include <libgen.h>
#include <mach-o/arch.h>
#include <mach-o/fat.h>
#include <stdint.h>
@@ -60,6 +59,7 @@
#include "common/mac/arch_utilities.h"
#include "common/mac/macho_reader.h"
#include "common/module.h"
+#include "common/path_helper.h"
#include "common/scoped_ptr.h"
#include "common/stabs_reader.h"
#include "common/stabs_to_module.h"
@@ -370,8 +370,7 @@ bool DumpSymbols::CreateEmptyModule(scoped_ptr<Module>& module) {
}
// Compute a module name, to appear in the MODULE record.
- string module_name = object_filename_;
- module_name = basename(&module_name[0]);
+ string module_name = google_breakpad::BaseName(object_filename_);
// Choose an identifier string, to appear in the MODULE record.
string identifier = Identifier();