Also add a test suite.
Details
- Reviewers
EricWF dexonsmith ldionne thomasanderson rdhindsa tamur echristo - Commits
- rGd21a3e41a4cf: Add gdb pretty printers for a wide variety of libc++ data structures.
rCXX370551: Add gdb pretty printers for a wide variety of libc++ data structures.
rL370551: Add gdb pretty printers for a wide variety of libc++ data structures.
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 36180 Build 36179: arc lint + arc unit
Event Timeline
libcxx/utils/gdb/libcxx/printers.py | ||
---|---|---|
33 | (llvm uses pep8 style) |
Please also add installation, since pretty-printers should be shipped with libc++, same as GCC does with libstdc++ and its pretty-printers.
wow. This is a fantastic amount of work. Thank you. No longer will libc++ accidentally break the pretty printers!
I'm happy to handle the minutiae related to configuring the build and test suite. I check in some code to detect GDB and LLDB shortly.
More review to come shortly...
Thanks again!
libcxx/test/pretty_printers/gdb_pretty_printer_test.sh.cpp | ||
---|---|---|
3 | Please add the LLVM license header to all new files. |
I want to echo this. This is really cool. I _really_ hope we can get something similar for LLDB.
I'm happy to handle the minutiae related to configuring the build and test suite. I check in some code to detect GDB and LLDB shortly.
We could have a lit feature like has-gdb or something along those lines? And we can then put these pretty-printer tests directly in test/libcxx. WDYT?
Sorry, my point is that we don't have the pretty-printer tests checked into libc++ and part of its test suite, which has been a source of pain in the past. Changing that situation is what I was referring to when I said "I hope we can get something similar for LLDB".
Sorry for misunderstanding, but may be libc++ developers should run LLDB tests too? Or at least make sure that libc++ changes do force LLDB tests on BuildBot and tests results should be monitored by committer?
Did these pretty-printers exist for libc++ before this patch? If so, how were they shipped?
libcxx/test/pretty_printers/gdb_pretty_printer_test.py | ||
---|---|---|
100 | I assume this is a remnant of prior testing? |
There is separate project on GitHub. It was mentioned in libcxx/docs/UsingLibcxx.rst.
GCC ships libstdc++ pretty-printers in <install directory>/share/gcc-<version>/python/libstdcxx/.
I had missed that, thanks!
In that case, this patch should update the documentation.
GCC ships libstdc++ pretty-printers in <install directory>/share/gcc-<version>/python/libstdcxx/.
I guess we could start with doing the same for libc++'s pretty-printers.
tamur and rdhindsa (cc'd as reviewers) both deserve strong credit for this. It wasn't solely me by a long shot. I will include them in the final commit message.
I'm happy to handle the minutiae related to configuring the build and test suite. I check in some code to detect GDB and LLDB shortly.
Thank you--that will be very helpful.
I've updated the revision to address these comments.
I wanted to discuss how to do that, but I think ericwf is thankfully taking that hassle from me.
I'm unfamiliar with how lldb handles scripting, but the python script portion of the framework is fairly short and straightforward. The test program itself contains both its inputs and test cases, so lldb could be run against it no problem. Perhaps with an ifdef to use lldb-based comparison strings.
libcxx/test/pretty_printers/gdb_pretty_printer_test.py | ||
---|---|---|
100 | Rats. Fixed. |
Would someone please accept this patch, or let me know what else there is to be done?
We could check them in for now and then EricWF can do the moving and updating of documentation around when they're happy?
I'm pretty happy with this as is... any objections?
-eric
The concern that ldionne had has been addressed and I think anything else can be done in post - it'd be nice to have these available for people to use while EricWF works up some of the test harness.
I assume this is a remnant of prior testing?