The tests are currently incomplete. There are also still some other things not implemented that are required here.
Details
- Reviewers
- None
- Group Reviewers
Restricted Project
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Nice see this being worked on!
I mainly looked at the code out of curiosity, I didn't do a review.
libcxx/include/__stacktrace/basic_stacktrace.h | ||
---|---|---|
24 | Since this function is in the dylib it needs an availability macro in <__availability>. | |
libcxx/src/stacktrace/stacktrace_entry.cpp | ||
41 | When line 45 throws the pointer leaks. // Unused; the returned pointer is used to test the conversion status. int __s; unique_ptr<char, void (*)(void*)> __demangled{abi::__cxa_demangle(__name, nullptr, 0, &__s), std::free}; (I wrote this for a libc++ formatting experiment.) |
libcxx/src/stacktrace/stacktrace_entry.cpp | ||
---|---|---|
41 | Thanks, good catch! |
libcxx/src/stacktrace/stacktrace_entry.cpp | ||
---|---|---|
36 | I do not know about the libcxx coding style, but LLVM prefers static over functions in anonymous namespaces. I believe there are quite a few functions that you could make static. |
What prevents this from a merge? I don't think, that you must implement / support all binary formats to merge this. For now, ELF + DWARF should be enough, right?
If that worked it would be a start, but this doesn't. I think we need some external library (maybe something from LLDB) to support a reasonable set of binaries, so I haven't continued working on this.
You could take a look at libbacktrace. The GNU stdlibc++ is using it to generate stacktraces.
Since this function is in the dylib it needs an availability macro in <__availability>.