[all-commits] [llvm/llvm-project] dc04b1: [lldb][NFC] Factor out code from SymbolFileDWARF::...

Felipe de Azevedo Piovezan via All-commits all-commits at lists.llvm.org
Fri Jul 7 05:45:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dc04b18ad7e45c67df4b8b3a756257eb62447970
      https://github.com/llvm/llvm-project/commit/dc04b18ad7e45c67df4b8b3a756257eb62447970
  Author: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
  Date:   2023-07-07 (Fri, 07 Jul 2023)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

  Log Message:
  -----------
  [lldb][NFC] Factor out code from SymbolFileDWARF::ParseVariableDIE

This function does a _lot_ of different things:

1. Parses a DIE,
2. Builds an ExpressionList
3. Figures out lifetime of variable
4. Remaps addresses for debug maps
5. Handles external variables
6. Figures out scope of variables

A lot of this functionality is coded in a complex nest of conditions, variables
that are declared and then initialized much later, variables that are updated in
multiple code paths. All of this makes the code really hard to follow.

This commit attempts to improve the state of things by factoring out (3), adding
documentation on how the expression list is built, and by reducing the scope of
variables.

Differential Revision: https://reviews.llvm.org/D154513




More information about the All-commits mailing list