.cv_def_range information for symbol records in codeview debug info used to be represented as a serialized series of bytes in assembly format. This change will display the def_range info in human-readable format.
Please avoid using namespace in header files, since it will affect everyone who includes the header.
I suppose this can be factored out as well.
Please factor this repeated code into a helper method.
Ideally, registers should be printed textually as rbp, ebp, etc. Given time constraints, I think we can leave that as a future improvement, though.
I don't see a case for this enum... does it still work? I have to run to lunch, but I want to send these review comments now rather than later.
Will try to do this in the next patch before I leave.
This is a placeholder enum, like DK_NO_DIRECTIVE in DirectiveKind. If the defrange type is not found, it is set to this value, & its executed in the default case. I have only implemented the 4 types that are implemented in CodeViewDebug.cpp.
I saw that you left the asm printer method that prints the binary string version of .cv_defrange, so I thought maybe you wanted to keep support for that and handle it that way here. We can either completely remove support for the string variant of the directive, or add support for it here. Either way is fine.
I realize you should write tests for the error handling paths. You can add a cv-defrange-errors.s test file that exercises each of these corner cases, and then FileCheck for the errors.
- Removed the functionality for the unimplemented (in CodeView) flag CVDR_DEFRANGE in the MCAsmStreamer.
- Added new negative test cases for all errors reported for the current change
- Fixed test cases involving CodeView def_range in MC/COFF
- Changed two more test files for lld & lldb that used def_range directives
- Fixed the endianness bug that arose because of changing the structure format of frame pointer relative def range structure.