This is an archive of the discontinued LLVM Phabricator instance.

[llvm-dwarfdump][test] Add tests for dumping the .debug_line_str section.
ClosedPublic

Authored by Higuoxing on Sep 1 2020, 12:57 AM.

Details

Summary

This patch adds tests for dumping the .debug_line_str section. The
dumper of the debug_line_str section is able to write nonprintable
strings as escaped chars while the dumper of the debug_str and
debug_str.dwo sections cannot. I will fix them and add tests for them
in a follow-up patch.

Diff Detail

Event Timeline

Higuoxing created this revision.Sep 1 2020, 12:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 1 2020, 12:57 AM
Higuoxing requested review of this revision.Sep 1 2020, 12:57 AM

It sounds to me like the .debug_line_str should be using the same dumper as the .debug_str and .debug_str.dwo dumpers. There's no difference in the section format as far as I'm aware.

llvm/test/tools/llvm-dwarfdump/debug-line-str.yaml
4

I'd put this comment above the RUN line. Same below.

23
26

It might be clearer if this comment was divided into individual characters. It took me several attempts to figure it out. (Maybe do '\t', '\0', '\001', '\\', '0', '0', '1')

Higuoxing updated this revision to Diff 289126.Sep 1 2020, 4:01 AM
Higuoxing marked 3 inline comments as done.

Address comments.

Thanks for reviewing!

This revision is now accepted and ready to land.Sep 1 2020, 4:41 AM