[PATCH] D101340: Allows for dsymutil crashes to generate reproduceable information
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 24 14:13:02 PDT 2021
JDevlieghere added inline comments.
================
Comment at: llvm/tools/dsymutil/Reproducer.cpp:54-55
FC->writeMapping(Mapping.str());
- outs() << "reproducer written to " << Root << '\n';
+ if (!IsCrash)
+ outs() << "reproducer written to " << Root << '\n';
}
----------------
If we split this into a separate class, this can remain here, and have the crash variant print the "PLEASE ATTACH THE FILES IN THE FOLLOWING DIRECTORY TO THE BUG REPORT" in the generate crash class.
================
Comment at: llvm/tools/dsymutil/Reproducer.h:68
+ // For crash generation we want to suppress printing of debug map
+ bool IsCrash = false;
};
----------------
I think we probably want a separate class that corresponds to `GenerateForCrash`.
================
Comment at: llvm/tools/dsymutil/dsymutil.cpp:489
+static int dsymutilMain(int Argc, char **Argv) {
+ std::string ProgName{Argv[0]};
----------------
Spurious newline
================
Comment at: llvm/tools/dsymutil/dsymutil.cpp:704-728
+static void generateDiagnosticFiles(DsymutilOptions &Options) {
+ dbgs() << "\n********************\n\n"
+ "PLEASE ATTACH THE FILES IN THE FOLLOWING DIRECTORY TO THE BUG "
+ "REPORT:\nBinar(ies|y), object file(s) and associated debug map "
+ "are located at:\n";
+ auto Repro = Reproducer::createReproducer(ReproducerMode::GenerateForCrash,
+ StringRef{});
----------------
This seems like it should be part of the reproducers class.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101340/new/
https://reviews.llvm.org/D101340
More information about the llvm-commits
mailing list