mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
Add DAP support for C++ exceptions
This adds DAP support for the various C++ exception-catching operations. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30682
This commit is contained in:
@ -353,10 +353,8 @@ def set_insn_breakpoints(
|
||||
|
||||
@in_gdb_thread
|
||||
def _catch_exception(filterId, **args):
|
||||
if filterId == "assert":
|
||||
cmd = "-catch-assert"
|
||||
elif filterId == "exception":
|
||||
cmd = "-catch-exception"
|
||||
if filterId in ("assert", "exception", "throw", "rethrow", "catch"):
|
||||
cmd = "-catch-" + filterId
|
||||
else:
|
||||
raise Exception(f"Invalid exception filterID: {filterId}")
|
||||
result = gdb.execute_mi(cmd)
|
||||
@ -404,6 +402,21 @@ def _rewrite_exception_breakpoint(
|
||||
"label": "Ada exceptions",
|
||||
"supportsCondition": True,
|
||||
},
|
||||
{
|
||||
"filter": "throw",
|
||||
"label": "C++ exceptions, when thrown",
|
||||
"supportsCondition": True,
|
||||
},
|
||||
{
|
||||
"filter": "rethrow",
|
||||
"label": "C++ exceptions, when re-thrown",
|
||||
"supportsCondition": True,
|
||||
},
|
||||
{
|
||||
"filter": "catch",
|
||||
"label": "C++ exceptions, when caught",
|
||||
"supportsCondition": True,
|
||||
},
|
||||
),
|
||||
)
|
||||
def set_exception_breakpoints(
|
||||
|
Reference in New Issue
Block a user