[all-commits] [llvm/llvm-project] 5e3f61: [lldb/NativePDB] Don't create parentless blocks (#...

Pavel Labath via All-commits all-commits at lists.llvm.org
Mon Nov 25 22:40:55 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5e3f6150b1d490090faf945777985b18db73ea3f
      https://github.com/llvm/llvm-project/commit/5e3f6150b1d490090faf945777985b18db73ea3f
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2024-11-26 (Tue, 26 Nov 2024)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
    M lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h

  Log Message:
  -----------
  [lldb/NativePDB] Don't create parentless blocks (#117581)

In case of an error GetBlock would return a reference to a Block without
adding it to a parent. This doesn't seem like a good idea, and none of
the other plugins do that.

This patch fixes that by propagating errors (well, null pointers...) up
the stack.

I don't know of any specific problem that this solves, but given that
this occurs only when something goes very wrong (e.g. a corrupted PDB
file), it's quite possible noone has run into this situation, so we
can't say the code is correct either. It also gets in the way of a
refactor I'm contemplating.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list