MCPcopy Create free account
hub / github.com/Marus/cortex-debug / handleWatchpoint

Method handleWatchpoint

src/gdb.ts:1704–1739  ·  view source on GitHub ↗
(type: string, info: MINode)

Source from the content-addressed store, hash-verified

1702 }
1703
1704 protected handleWatchpoint(type: string, info: MINode) {
1705 this.continuing = false;
1706 this.stopped = true;
1707 this.stoppedReason = (type === 'hit') ? 'data breakpoint' : 'watchpoint-scope-end';
1708 this.findPausedThread(info);
1709 this.notifyStoppedConditional();
1710
1711 // console.log(info);
1712 if (type !== 'hit') {
1713 if (info.outOfBandRecord && info.outOfBandRecord[0] && info.outOfBandRecord[0].output) {
1714 for (const item of info.outOfBandRecord[0].output) {
1715 if (item[0].endsWith('wpnum')) {
1716 const id = parseInt(item[1]);
1717 if (!this.dataBreakpointMap.get(id)) {
1718 break; // Not a watchpoint we set
1719 }
1720 const ev: DebugProtocol.BreakpointEvent = {
1721 body: {
1722 reason: 'removed',
1723 breakpoint: {
1724 id: id,
1725 verified: false
1726 }
1727 },
1728 type: 'event',
1729 event: 'breakpoint',
1730 seq: 0
1731 };
1732 this.dataBreakpointMap.delete(id);
1733 this.sendEvent(ev);
1734 break;
1735 }
1736 }
1737 }
1738 }
1739 }
1740
1741 protected handleBreak(info: MINode) {
1742 this.continuing = false;

Callers

nothing calls this directly

Calls 3

findPausedThreadMethod · 0.95
sendEventMethod · 0.95

Tested by

no test coverage detected