aboutsummaryrefslogtreecommitdiff
path: root/src/processor
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/processor
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/processor')
-rw-r--r--src/processor/microdump_stackwalk.cc3
-rw-r--r--src/processor/minidump_stackwalk.cc3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/processor/microdump_stackwalk.cc b/src/processor/microdump_stackwalk.cc
index 46c4127e..220396ed 100644
--- a/src/processor/microdump_stackwalk.cc
+++ b/src/processor/microdump_stackwalk.cc
@@ -38,6 +38,7 @@
#include <string>
#include <vector>
+#include "common/path_helper.h"
#include "common/scoped_ptr.h"
#include "common/using_std_string.h"
#include "google_breakpad/processor/basic_source_line_resolver.h"
@@ -130,7 +131,7 @@ static void Usage(int argc, const char *argv[], bool error) {
"\n"
" -m Output in machine-readable format\n"
" -s Output stack contents\n",
- basename(argv[0]));
+ google_breakpad::BaseName(argv[0]).c_str());
}
static void SetupOptions(int argc, const char *argv[], Options* options) {
diff --git a/src/processor/minidump_stackwalk.cc b/src/processor/minidump_stackwalk.cc
index b127c882..acf80972 100644
--- a/src/processor/minidump_stackwalk.cc
+++ b/src/processor/minidump_stackwalk.cc
@@ -40,6 +40,7 @@
#include <string>
#include <vector>
+#include "common/path_helper.h"
#include "common/scoped_ptr.h"
#include "common/using_std_string.h"
#include "google_breakpad/processor/basic_source_line_resolver.h"
@@ -128,7 +129,7 @@ static void Usage(int argc, const char *argv[], bool error) {
"\n"
" -m Output in machine-readable format\n"
" -s Output stack contents\n",
- basename(argv[0]));
+ google_breakpad::BaseName(argv[0]).c_str());
}
static void SetupOptions(int argc, const char *argv[], Options* options) {