[all-commits] [llvm/llvm-project] 94a067: [LLDB] Support exception breakpoints for plugin-pr...

Walter Erquinigo via All-commits all-commits at lists.llvm.org
Thu Jul 4 07:05:22 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 94a067a306fecceac913cc6d9bfdcd49464358ec
      https://github.com/llvm/llvm-project/commit/94a067a306fecceac913cc6d9bfdcd49464358ec
  Author: Walter Erquinigo <a20012251 at gmail.com>
  Date:   2024-07-04 (Thu, 04 Jul 2024)

  Changed paths:
    M lldb/include/lldb/Target/Language.h
    M lldb/source/Commands/CommandObjectBreakpoint.cpp
    M lldb/source/Plugins/Language/ObjC/ObjCLanguage.h

  Log Message:
  -----------
  [LLDB] Support exception breakpoints for plugin-provided languages (#97675)

CommandObjectBreakpoint has a harcoded list of languages for which
exception breakpoints can be enabled. I'm making this a bit more generic
so that my Mojo plugin can get this feature.
Basically, I'm adding a new overridable method
`Language::SupportsExceptionBreakpoints` that can be used by language
plugins to determine whether they support this feature or not. This
method is used in addition to the hardcoded list and, as an example, I'm
using it for the ObjC language support.

Another route is simply to avoid doing the check that it's being done
right now and simply try to the create the exception breakpoint for
whatever language that is not in the hardcoded list. I'm happy to do
that if the reviewers think it's a good idea.

As a note, the other possible place for adding this
`SupportsExceptionBreakpoints` method is in `LanguageRuntime`. However,
accessing it requires having a process, which is not always the case
when invoking the `breakpoint set -E` command. The process might not be
alive yet, so `Language` is a good second place for this.

And as a final note, I don't want to make this
`SupportsExceptionBreakpoints` complicated. I'm keeping it as simple as
possible because it can easily evolve as it's not part of the public
API.



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