From 734c924439e4450babe9c53461e4ed6ea93c6e5a Mon Sep 17 00:00:00 2001 From: Christian Walther Date: Tue, 23 Jun 2026 11:28:13 +0200 Subject: [PATCH] Fix exception when setting watchpoints with multi-location breakpoints Fix an uncaught exception occurring when trying to set a watchpoint while breakpoints with multiple locations exist. The reason is that `GDBDebugSessionBase.getWatchpointList()` expected a `type` field in the MI response to `-break-list`, but that is not present for the location lines that occur for multi-location breakpoints (their type is in their parent breakpoint line), at least with my GDB 9.2 and 11.2. --- src/gdb/GDBDebugSessionBase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gdb/GDBDebugSessionBase.ts b/src/gdb/GDBDebugSessionBase.ts index f413b24d..346533b1 100644 --- a/src/gdb/GDBDebugSessionBase.ts +++ b/src/gdb/GDBDebugSessionBase.ts @@ -926,7 +926,7 @@ export abstract class GDBDebugSessionBase extends LoggingDebugSession { // Filter out all watchpoints const existingWatchpointsList = fullBreakpointsList.BreakpointTable.body.filter((bp) => - bp['type'].includes('watchpoint') + bp['type']?.includes('watchpoint') ); return existingWatchpointsList; }