Page MenuHomePhabricator

[lld-macho] Add addition debug info
Needs ReviewPublic

Authored by oontvoo on Mar 25 2021, 3:10 PM.

Details

Reviewers
int3
jdoerfert
Group Reviewers
Restricted Project

Diff Detail

Unit TestsFailed

TimeTest
90 msx64 debian > lld.MachO::stabs.s
Script: -- : 'RUN: at line 3'; rm -rf /mnt/disks/ssd0/agent/llvm-project/build/tools/lld/test/MachO/Output/stabs.s.tmp; split-file /mnt/disks/ssd0/agent/llvm-project/lld/test/MachO/stabs.s /mnt/disks/ssd0/agent/llvm-project/build/tools/lld/test/MachO/Output/stabs.s.tmp
60 msx64 debian > lld.MachO::undef.s
Script: -- : 'RUN: at line 2'; rm -rf /mnt/disks/ssd0/agent/llvm-project/build/tools/lld/test/MachO/Output/undef.s.tmp; split-file /mnt/disks/ssd0/agent/llvm-project/lld/test/MachO/undef.s /mnt/disks/ssd0/agent/llvm-project/build/tools/lld/test/MachO/Output/undef.s.tmp
220 msx64 windows > lld.MachO::undef.s
Script: -- : 'RUN: at line 2'; rm -rf C:\ws\w16-1\llvm-project\premerge-checks\build\tools\lld\test\MachO\Output\undef.s.tmp; split-file C:\ws\w16-1\llvm-project\premerge-checks\lld\test\MachO\undef.s C:\ws\w16-1\llvm-project\premerge-checks\build\tools\lld\test\MachO\Output\undef.s.tmp

Event Timeline

oontvoo created this revision.Mar 25 2021, 3:10 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a reviewer: Restricted Project. · View Herald Transcript
oontvoo requested review of this revision.Mar 25 2021, 3:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2021, 3:10 PM

@int3: not sure how to write a good test for this ?

int3 added a comment.Mar 25 2021, 3:37 PM

This is for https://bugs.llvm.org/show_bug.cgi?id=49282 right? For testing you could create a file with an undefined symbol. See e.g. test/ELF/undef.s.

Btw, I think you didn't upload all your local changes, since DwarfObject::find doesn't exist in my local repo :)

oontvoo updated this revision to Diff 333445.Mar 25 2021, 3:50 PM

updated diff to include the whole patch

This is for https://bugs.llvm.org/show_bug.cgi?id=49282 right? For testing you could create a file with an undefined symbol. See e.g. test/ELF/undef.s.

Yeah. Thanks

Btw, I think you didn't upload all your local changes, since DwarfObject::find doesn't exist in my local repo :)

Updated. Sorry about that!

int3 added a comment.Mar 29 2021, 9:55 AM

will do the rest of the review when the diff is ready :)

lld/MachO/Dwarf.cpp
65

apparently the convention (not my personal favorite) is to do nullchecks this way

69

I don't think the Mach-O format guarantees they're sorted

oontvoo planned changes to this revision.Apr 1 2021, 10:10 AM
oontvoo updated this revision to Diff 335093.Apr 3 2021, 11:13 AM

updated diff:

  • stop excluding debug sessions from reloc-parsing (cos we need the info)
  • added some test

pending issue: test didn't pass :-( ... it seems the reloc offset is wrong (and we coulnd't find it ...) Or I'm mis-interpretting it. Thoughts?

int3 added a comment.Apr 3 2021, 4:43 PM

hmm how is find() getting called?