st_record.py: Fix signal detection and stdin read for TUI mode
This commit is contained in:
parent
93c6d6cdd2
commit
1d6b1c31fc
14
st_record.py
14
st_record.py
@ -149,11 +149,11 @@ def fastlz_decompress_lv1(datain, doutlen):
|
||||
return bytes(dataout[:dataout_idx])
|
||||
|
||||
def scan_for_signals(directory, predefined_signals):
|
||||
library_files = ['pet.c', 'pet.h']
|
||||
rx_events = re.compile(r'pet_evtrace\(\"([^\"]+)\"')
|
||||
rx_scalars = re.compile(r'pet_([usf])(8|16|32)trace\(\"([^\"]+)\"')
|
||||
rx_arrays = re.compile(r'pet_a([us])(8|16|32)trace\(\"([^\"]+)\"\,\s*[^,]+,\s*((?:0x)?[a-zA-Z0-9]+)')
|
||||
rx_strings = re.compile(r'pet_strtrace\(\"([^\"]+)\"')
|
||||
library_files = ['st.c', 'st.h']
|
||||
rx_events = re.compile(r'st_evtrace\(\"([^\"]+)\"')
|
||||
rx_scalars = re.compile(r'st_([usf])(8|16|32)trace\(\"([^\"]+)\"')
|
||||
rx_arrays = re.compile(r'st_a([us])(8|16|32)trace\(\"([^\"]+)\"\,\s*[^,]+,\s*((?:0x)?[a-zA-Z0-9]+)')
|
||||
rx_strings = re.compile(r'st_strtrace\(\"([^\"]+)\"')
|
||||
signals = {}
|
||||
valid = True
|
||||
|
||||
@ -657,8 +657,8 @@ def tui_record(packet_filter, vcd_sink, enable_verbose_trace):
|
||||
packet_filter.onnoise(noise_buffer.add)
|
||||
|
||||
try:
|
||||
while True:
|
||||
for b in sys.stdin.buffer.read(1):
|
||||
for bstr in sys.stdin.buffer:
|
||||
for b in bstr:
|
||||
packet_filter.process(b)
|
||||
live_status.update(diag_progress)
|
||||
except KeyboardInterrupt:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user