Skip to content

Commit 80f5910

Browse files
authored
Update breakpoints.py - Fix issue with unresolved breakpoints
1 parent 6f8a19b commit 80f5910

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

pybag/dbgeng/breakpoints.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,11 @@ def find_expr(self, expr):
124124
except exception.E_NOINTERFACE_Error:
125125
self._remove_stale(bpid)
126126
continue
127+
try:
128+
bpexpr = bp.GetOffsetExpression()
129+
except:
130+
continue
127131

128-
bpexpr = bp.GetOffsetExpression()
129-
print(bpexpr)
130-
#expr = self.get_name_by_offset(bp.GetOffset())
131132
if bpexpr == expr:
132133
return bpid
133134
return -1
@@ -141,12 +142,15 @@ def find_offset(self, offset):
141142
self._remove_stale(bpid)
142143
continue
143144

144-
bpoff = bp.GetOffset()
145+
try:
146+
bpoff = bp.GetOffset()
147+
except:
148+
continue
149+
145150
if bpoff == offset:
146151
return bpid
147152
return -1
148153

149-
150154
def find(self, expr):
151155
bpid = self.find_expr(expr)
152156
if bpid == -1:

0 commit comments

Comments
 (0)