Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the dumping of .dwo files contents to show up when dumping an e… #66726

Merged
merged 5 commits into from
Jan 12, 2024

Commits on Jan 12, 2024

  1. Allow the dumping of .dwo files contents to show up when dumping an e…

    …xecutable with split DWARF.
    
    Currently if you run llvm-dwarfdump on a binary that has skeleton compile units, you only see the skeleton compile units. Since the main binary has the linked addresses it would be nice to be able to dump DWARF from the .dwo files and how the resolved addresses instead of showing the address index and "<unresolved>" in the output. This patch adds an option that can be specified to dump the non skeleton DIEs named --dwo.
    
    Added the ability to use the following options with split dwarf as well:
      --name <name>
      --lookup <addr>
      --debug-info <die-offset>
    clayborg committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    4ca787f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4d9429b View commit details
    Browse the repository at this point in the history
  3. Remove extra whitespace.

    clayborg committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    65aeee1 View commit details
    Browse the repository at this point in the history
  4. run clang format.

    clayborg committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    a5beb64 View commit details
    Browse the repository at this point in the history
  5. Fix review comments:

    - Revert changes to `DWARFUnit::getSubroutineForAddress(...)`
    - Add a "bool CheckDWO" argument to the `DIEsForAddress DWARFContext::getDIEsForAddress(uint64_t Address)` function to allow the DWO file to be searched first if needed since the DWO file usually has more information. The parameter is defaulted to `false`.
    - Fix the address lookup calls in llvm-dwarfdump to pass the DumpNonSkeleton bool value to `DIEsForAddress DWARFContext::getDIEsForAddress(uint64_t Address, bool CheckDWO)`
    - Add tests that verify --name lookups fail when --dwo is not specified, and succeeds when it is
    - Add tests that verify --lookup finds info in the skeleton compile unit when --dwo isn't specified and succeeds when it is in finding info from the split compile unit.
    clayborg committed Jan 12, 2024
    Configuration menu
    Copy the full SHA
    dfd5728 View commit details
    Browse the repository at this point in the history