Rename sanitizer_symbolizer_fuchsia.cc to
sanitizer_symbolizer_markup.cc, and use it for both Fuchsia and RTEMS.
Details
Diff Detail
- Repository
- rCRT Compiler Runtime
Event Timeline
I'd prefer to keep all the markup string constants together. Moving them all to a header would be fine, but I think it should be a separate sanitizer_symbolizer_fuchsia.h so that non-Fuchsia builds aren't using symbolizer_fuchsia.h, which is about OS-specific stuff distinct from the symbolizer markup format. But nothing in this patch actually needs the constant to be visible outside sanitizer_symbolizer_fuchsia.cc, so I'd like to see some explanation of the need for that.
I'd be very glad to see a more thorough refactoring to make the symbolizer markup an option independent of OS. I think renaming symbolizer_fuchsia* to symbolizer_markup* probably makes sense. Ideally we'd nicely support both the Fuchsia/RTEMS configs where we want to support only markup and not have OS dependencies for things like files and subprocesses the other symbolizer code has; and also make markup a runtime selectable option for symbolizer style for the other OS builds that today have several runtime selectable choices.
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_fuchsia.cc | ||
---|---|---|
115 ↗ | (On Diff #145279) | Let's make this something like SANITIZER_USE_UNWIND, i.e. more generic to what it's doing. Then you can define that to 1/0 depending on the OS defines in one of the headers. |
@jakehehrlich is working on an open-source tool at https://fuchsia.googlesource.com/tools that handles this output format as specified in https://fuchsia.googlesource.com/zircon/+/master/docs/symbolizer_markup.md
LGTM assuming the Fuchsia build still works (I don't see any problems in the source off hand).
@jakehehrlich will verify the Fuchsia Build.
Thanks for the review. I will go ahead and submit -- let me know if there is a problem.