Mac dump_syms: Fix -a on arm64

- Resets `selected_object_file_` when a new file is read. This was a dangling pointer previously.
- When `-a` is provided, ensures that both parts of a split module use
the given architecture.

Bug: None
Change-Id: I581d41b0eee4ec2b0d598fb80b9065e7ebde0e0d
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3788222
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Leonard Grey 2022-07-26 14:23:54 -04:00 committed by Mark Mentovai
parent afc8daa2de
commit 86ea554601
2 changed files with 37 additions and 25 deletions

View file

@ -121,6 +121,7 @@ vector<string> list_directory(const string& directory) {
namespace google_breakpad {
bool DumpSymbols::Read(const string& filename) {
selected_object_file_ = nullptr;
struct stat st;
if (stat(filename.c_str(), &st) == -1) {
fprintf(stderr, "Could not access object file %s: %s\n",