Skip to content

Commit

Permalink
[gdb] Fix px4_dmesg command
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaut committed Apr 26, 2024
1 parent cc2e6ec commit 54080fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 1.5.2

- Add erase command to JLink backend.
- Fix px4_dmesg command.

## 1.5.1

Expand Down
8 changes: 4 additions & 4 deletions src/emdbg/debug/px4/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ def to_string(self) -> str:
if used:
if (tail <= head):
# [tail, head]
memories = [self.read_memory(ptr + tail, used).tobytes()]
memories = [self.read_memory(ptr + tail, used)]
else:
# head], [tail
memories = [self.read_memory(ptr + tail, size - tail).tobytes(),
self.read_memory(ptr, head).tobytes()]
header += "".join(chr(v) if chr(v).isprintable() else f"\\{v:02x}"
memories = [self.read_memory(ptr + tail, size - tail),
self.read_memory(ptr, head)]
header += "".join(chr(v)
for memory in memories
for v in memory.tobytes())
return header

0 comments on commit 54080fa

Please sign in to comment.