User Details
- User Since
- Sep 17 2021, 12:30 PM (78 w, 3 d)
Dec 10 2021
Just as a heads up, Dec 10th is the last day of my internship so unfortunately after that I won't be able to work on this change as actively as before. If there is still feedback to address a member of my team may be able to pick this up from where I left off. And thank you for taking the time to review all of my code changes these past months!
Fix up file-summary test.
Add param comments.
Update pretty-print tests.
Dec 8 2021
Update docs formatting.
Update file-summary and pretty print tests.
Fix DelimitedScopeCtor test.
Add verifyAll method to test fixture.
Allow JSONScopedPrinter to be constructed with DelimitedScope.
Add DelimitedScope and pretty-print unit tests.
Add W.flush() to verifyScopedPrinter() method.
Dec 7 2021
Update docs.
Clean up tests.
Dec 6 2021
Use JSONScopedPrinter ctor to initialize outer-most [].
Update test fixture to hold ScopedPrinter as member.
Update missing enum to enum class
Update test fixture to handle printing outer {} and handle nothing printed at top level.
Dec 5 2021
Add pretty-print test.
Add JSON FileSummary tests.
Add pretty-print option to llvm-readelf.
Dec 3 2021
Add missing comma in error message.
Update ScopeHistory SmallVector size to 8
Yes, they should be added, but I'd be inclined to say that they should be in a separate patch, allowing us to focus this on the ScopedPrinter class specifically.
I can add these in a separate patch then.
Update enum naming.
Add APSInt implementation and test.
Add classof and kindOf test.
Add APSInt test.
Add printList implementation for APSInt.
Dec 2 2021
Update JSONScopedPrinter::printBinaryImpl to print initial offset rather than including a byte index in each byte entry.
Small comment change.
Renamed lambda and expected output variables
Remove unneeded explicit cast in printList(...).
Update error messaging.
Misc formatting.
Dec 1 2021
Remove Character block from JSONScopedPrinter::printBinaryImpl(...)
Add JSON implementation for new printList(...) overloads.
Update comment wording.
Add more printList(...) tests.
Update printList for uint8_t and int8_t and remove ArrayRef from printListImpl(...)
Add printList overloads (to handle future JSONScopedPrinter number and boolean printing).
Nov 30 2021
Update printEnum test
Add missing tests and update existing ones.
Address patch comments.
Nov 29 2021
Updated printRawFlagsImpl to be overloaded printFlagsImpl method.
Updated formatting.
Nov 28 2021
Misc formatting.
Add JSONScopedPrinter specific tests.
Update printBinaryImpl structure to include index.
Add hexNumberToInt method.
Revert JSONScopedPrinter::printListImpl to only print strings.
Add printRawFlagsImpl method to JSONScopedPrinter.
Clean up lambda naming.
Make printFlags and printObject virtual.
Nov 26 2021
Update formatting.
Update --elf-output-style error messaging.
Add printFileSummary method to ObjDumper.
Misc formatting.
Nov 23 2021
Add JSONScopedPrinter tests.
Update some ScopedPrinter methods.
Fix some formatting.
Nov 22 2021
Nov 21 2021
Add printBinaryImpl implementation.
Remove duplicated logic for json scope logic.
Update printHex to print numbers.
Clean up formatting.
Nov 19 2021
Add abstraction to object/array begin/end.
Misc formatting and function renaming.
Nov 18 2021
I think JSONScopedPrinter (and possibly ScopedPrinter too, if it doesn't already have them) could do with gtest unit tests. It should be fairly straightforward to write them, and would help give confidence in the methods, especially as we may not use all of them up-front. The tests would also help with documenting what the code actually does, which will aid in future reviewing.
Will do! Do we want to test each method in isolation? or possibly in conjunction with each other to test things like the history stack? or possibly both?
We need to consider what will happen when dumping archives containing non-ELF objects. In such a case, it won't be possible to dump JSON output (for now) for them. Should we emit an error/warning in this case?
I think emitting a warning to the error stream seems reasonable in this case. Since it may still be desirable to output the information for remaining ELF objects inside those archives.
For the *Internal functions, I think *Impl tends to be a more common naming pattern I've seen (the non-impl versions do the common work, and then call the virtual impl versions, as you've done).
Thanks for the insight! Addressed in D114223.
Nov 17 2021
Nov 16 2021
Nov 10 2021
Nov 8 2021
@jhenderson I was wondering if you had any more thoughts on the design on ScopedPrinter/ ScopedPrinterBase/JSONScopedPrinter? As I see it right now, it's not very feasible to treat ScopedPrinter and JSONScopedPrinter uniformly due to the usage of methods like startLine(). So a parent-child structure between ScopedPrinter and JSONScopedPrinter might not be suitable.
Nov 5 2021
Update readelf and readobj docs wording
Misc formatting and renaming changes
Nov 4 2021
- Change JSONScopedPrinter to derive from ReadobjScopedPrinter and implement the additional functions (and move it into the llvm-readobj code).