Skip to content

Commit

Permalink
properly skip leading spaces in Frame string
Browse files Browse the repository at this point in the history
On aarch64 gdb does not start each frame with an address since it
can just follow the link register. Skipping characters up to the
first '0' is obviously incorrect in this case.
  • Loading branch information
rnpnr committed Dec 28, 2024
1 parent ab47ef8 commit 6f3bd45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2902,7 +2902,9 @@ void ThreadWindowUpdate(const char *, UIElement *_table) {
memcpy(thread.name, position, end - position);
thread.name[end - position] = 0;

position = strchr(end + 1, '0');
position = end + 1;
while (*position == ' ') position++;

end = strchr(position, '\n');
if (end - position >= (ptrdiff_t) sizeof(thread.frame))
end = position + sizeof(thread.frame) - 1;
Expand Down

0 comments on commit 6f3bd45

Please sign in to comment.