Commit f2273fe0 authored by Gabriel Marin's avatar Gabriel Marin Committed by Commit Bot

tcmalloc: add long form flag '--exe' to specify the binary

This change was originally made as part of CL
https://codereview.chromium.org/2730473002

BUG=724399,b:70905156

Change-Id: I33ee28eac4dab6077cf162358cf4c10b41c0f6a2
Reviewed-on: https://chromium-review.googlesource.com/1147667Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Reviewed-by: default avatarAlbert J. Wong <ajwong@chromium.org>
Commit-Queue: Gabriel Marin <gmx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#578087}
parent afa32f3e
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
#define WEBSYM "SRV*c:\\websymbols*http://msdl.microsoft.com/download/symbols" #define WEBSYM "SRV*c:\\websymbols*http://msdl.microsoft.com/download/symbols"
void usage() { void usage() {
fprintf(stderr, "usage: " fprintf(stderr, "usage: addr2line-pdb "
"addr2line-pdb [-f|--functions] [-C|--demangle] [-e filename]\n"); "[-f|--functions] [-C|--demangle] [-e|--exe filename]\n");
fprintf(stderr, "(Then list the hex addresses on stdin, one per line)\n"); fprintf(stderr, "(Then list the hex addresses on stdin, one per line)\n");
} }
...@@ -81,7 +81,8 @@ int main(int argc, char *argv[]) { ...@@ -81,7 +81,8 @@ int main(int argc, char *argv[]) {
} else if (strcmp(argv[i], "--demangle") == 0 || } else if (strcmp(argv[i], "--demangle") == 0 ||
strcmp(argv[i], "-C") == 0) { strcmp(argv[i], "-C") == 0) {
symopts |= SYMOPT_UNDNAME; symopts |= SYMOPT_UNDNAME;
} else if (strcmp(argv[i], "-e") == 0) { } else if (strcmp(argv[i], "--exe") == 0 ||
strcmp(argv[i], "-e") == 0) {
if (i + 1 >= argc) { if (i + 1 >= argc) {
fprintf(stderr, "FATAL ERROR: -e must be followed by a filename\n"); fprintf(stderr, "FATAL ERROR: -e must be followed by a filename\n");
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment