Skip to content

Commit

Permalink
Fix test alternate_thread_diversion with older lldb versions.
Browse files Browse the repository at this point in the history
In old versions of lldb the output format of the `print` command was
different, it shows a value history identifier.

Therefore the output of `print get_value()` is not recognized
in the alternate_thread_diversion test and the test times out.

lldb version 14.0.6
'print' is an abbreviation for 'expression --'
(rr) print get_value()
(int) $0 = 1

lldb version 18.1.3
'print' is an abbreviation for 'dwim-print --'
(rr) print get_value()
(int) 1
  • Loading branch information
bernhardu committed Jun 3, 2024
1 parent 07f3e96 commit ff788a3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/test/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,8 @@ def set_breakpoint_commands(number, commands):
expect_debugger('(rr)')

def expect_expression(expression, value):
send_debugger(f'print {expression}', f'print {expression}')
if debugger_type == 'GDB':
expect_debugger(f' = {value}')
else:
expect_debugger(fr'\) {value}')
send_debugger(f'print {expression}', f'expression -- {expression}')
expect_debugger(f' = {value}')

def expect_threads(num_threads, selected_thread):
send_debugger('info threads', 'thread list')
Expand Down

0 comments on commit ff788a3

Please sign in to comment.