Skip to content

Commit

Permalink
hilda_client: Add thread setter
Browse files Browse the repository at this point in the history
  • Loading branch information
netanelc305 committed Jun 6, 2024
1 parent 2127284 commit 5d2103f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hilda/hilda_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ def callback(hilda, frame, bp_loc, options):
if options.get('name', False):
name = options['name']

log_message = f'🚨 #{bp.id} 0x{symbol:x} {name}'
log_message = f'🚨 #{bp.id} 0x{symbol:x} {name} - Thread #{self.thread.idx}:{hex(self.thread.id)}'

if 'regs' in options:
log_message += '\nregs:'
Expand Down Expand Up @@ -895,6 +895,10 @@ def thread(self):
return self._bp_frame.GetThread()
return self.process.GetSelectedThread()

@thread.setter
def thread(self, idx: int):
self.process.SetSelectedThread(self.process.threads[idx - 1])

@property
def frame(self):
""" Current active frame. """
Expand Down

0 comments on commit 5d2103f

Please sign in to comment.