nxgdb: fix remote-register regular expression match

The code clearly expects the output of the 'maint print
remote-registers' to be indented by white-space character but at least
in my case it is not. This changes the match to consume any number of
white-space characters before it encounteres the register name.

Signed-off-by: Karel Kočí <cynerd@email.cz>
This commit is contained in:
Karel Kočí
2025-10-15 17:04:00 +02:00
committed by Xiang Xiao
parent d6a169d6dd
commit 29d44e5227

View File

@@ -65,7 +65,7 @@ class Registers:
# Name Nr Rel Offset Size Type Rmt Nr g/G Offset
match = re.match(
r"\s(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\S+)(?:\s+(\d+)\s+(\d+))?",
r"\s*(\S+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\S+)(?:\s+(\d+)\s+(\d+))?",
line,
)
if not match: