This is an archive of the discontinued LLVM Phabricator instance.

[llvm/DebugInfo] Emit DW_OP_implicit_value when tuning for LLDB
ClosedPublic

Authored by mib on Oct 22 2020, 7:26 PM.

Details

Summary

This patch enables emitting DWARF DW_OP_implicit_value opcode when
tuning debug information for LLDB (-debugger-tune=lldb).

This will also propagate to Darwin platforms, since they use LLDB tuning
as a default.

rdar://67406059

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>

Diff Detail

Event Timeline

mib created this revision.Oct 22 2020, 7:26 PM
mib requested review of this revision.Oct 22 2020, 7:26 PM
mib updated this revision to Diff 300428.Oct 23 2020, 4:07 PM
aprantl added inline comments.Oct 23 2020, 4:36 PM
llvm/test/DebugInfo/X86/implicit_value-double.ll
15

You probably don't need to duplicate the CHECK lines — also I'm surprised this even works.

Anyway, this LGTM with the tests fixed.

mib updated this revision to Diff 300439.Oct 23 2020, 5:12 PM
mib marked an inline comment as done.

Fix pre-check test failures

aprantl accepted this revision.Oct 23 2020, 5:27 PM
This revision is now accepted and ready to land.Oct 23 2020, 5:27 PM
JDevlieghere accepted this revision.Oct 23 2020, 8:54 PM

LGTM with a few nits.

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
2483–2485
llvm/test/DebugInfo/X86/implicit_value-float.ll
13

Maybe add a negative test for sce?

mib added a comment.EditedOct 23 2020, 9:11 PM

It seems that the HWASAN pre-check test is also failing in D89844 (https://buildkite.com/llvm-project/premerge-checks/builds/14519) ... I also tested on Linux and the test passes so I guess this is an issue with the bot.

$ /usr/bin/python3.7 /Users/docker_user/Developer/open-source/llvm.org/build/Modular/./bin/llvm-lit -svv --filter=TestCases/sizes.cpp -- /Users/docker_user/Developer/open-source/llvm.org/build/Modular/projects/compiler-rt/test/hwasan/X86_64
Testing Time: 5.52s
  Excluded: 50
  Passed  :  1

$ uname -s 
Linux
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
2483–2485

I'm not 100% sure GDB || LLDB <-> !SCE, this is why I put it this way ... What if the -debugger-tune option is not set all ?

mib updated this revision to Diff 300457.Oct 23 2020, 9:44 PM

Add negative test for -debugger-tune=sce.