Vector35 / binaryninja-api

Public API, examples, documentation and issues for Binary Ninja
https://binary.ninja/
MIT License
837 stars 192 forks source link

DWARF Debug Info Errors for Debug BinaryView #5647

Open fuzyll opened 1 week ago

fuzyll commented 1 week ago

Version and Platform (required):

Bug Description: At some point in the last week or so, DWARF debug info has regressed slightly in that all of these errors are being printed again:

[Analysis] Attempting to add function not backed by file: 0x1af5a
[Analysis] Attempting to add function not backed by file: 0x53c52
[Analysis] Attempting to add function not backed by file: 0x2b6c4
[Analysis] Attempting to add function not backed by file: 0x6b316
[Analysis] Attempting to add function not backed by file: 0xd00aa
[Analysis] Attempting to add function not backed by file: 0x727b6
[Analysis] Attempting to add function not backed by file: 0x2667c
[Analysis] Attempting to add function not backed by file: 0xbea1c
[Analysis] Attempting to add function not backed by file: 0x3e3d2
[Analysis] Attempting to add function not backed by file: 0xa8456
[Analysis] Attempting to add function not backed by file: 0x674fa
[Analysis] Attempting to add function not backed by file: 0x8aafa
[Analysis] Attempting to add function not backed by file: 0x668ac
[Analysis] Attempting to add function not backed by file: 0x6083a
[Analysis] Attempting to add function not backed by file: 0x2cd34

This is very similar to #5231, except that these errors are not from the BinaryView that we are applying the DWARF information to, but the one we are setting up to copy from. You won't see these in the log at all if you have Log Scope -> Current Tab on.

Steps To Reproduce: Please provide all steps required to reproduce the behavior:

  1. Open a file with Options
  2. Select an external debug info source that includes DWARF information
  3. Open the file and observe the error messages
  4. If you don't see them, make sure your Log Scope includes Global messages

Expected Behavior: There shouldn't be any error messages since, as near I can tell, we are actually applying all of the debug information correctly. (At least, I don't actually see anything missing that I expected.)

Binary: Available upon request, but I have many that exhibit this so I believe it should be fairly easy to reproduce.

Additional Information: From a cursory glance, both of these commits touched DWARF information after I did and may have inadvertently caused the issue:

ccarpenter04 commented 6 days ago

I only encounter this when enabling permissive linear sweep and was told that was expected but should probably be reduced to lower logger level. The dwarf parsing is showing me a LOT more information after the updates that were made to it this week.