This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Add addition debug info
Changes PlannedPublic

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

Details

Reviewers
int3
jdoerfert
gkm
Group Reviewers
Restricted Project

Diff Detail

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
64

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

68

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?

oontvoo updated this revision to Diff 348390.May 27 2021, 2:35 PM
oontvoo marked 2 inline comments as done.

rebase + addressed comments

oontvoo planned changes to this revision.May 27 2021, 2:36 PM

Wait, I've messed up the rebase ...

oontvoo updated this revision to Diff 349034.Jun 1 2021, 11:33 AM

move str literals into section_names

ormris removed a subscriber: ormris.Jun 3 2021, 10:18 AM
thakis added a subscriber: thakis.Jun 3 2021, 11:41 AM

Just for my understanding: This loads more dwarf data into memory (so that we can use it for diags), but it doesn't write it to the output, right?

Just for my understanding: This loads more dwarf data into memory (so that we can use it for diags), but it doesn't write it to the output, right?

Yes - that's correct

int3 added a comment.Jun 3 2021, 6:37 PM

I don't see any tests, so I'm assuming that you're still iterating on this?

int3 requested changes to this revision.Jul 17 2021, 1:49 PM

clearing my queue

This revision now requires changes to proceed.Jul 17 2021, 1:49 PM
oontvoo planned changes to this revision.Aug 31 2021, 12:57 PM