You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2019/10/10 17:18:03 UTC
[mynewt-core] 01/04: mbuf.gdb: Print om_data as hexdump,
not int array
This is an automated email from the ASF dual-hosted git repository.
ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 34899eb5979e307b056678d9dbd8b7704c8349a9
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Oct 9 17:37:58 2019 -0700
mbuf.gdb: Print om_data as hexdump, not int array
E.g.,
BEFORE:
Mbuf data: $528 = {0x68, 0x5d, 0x0, 0x20, 0x0, 0x8, 0x7c, 0x0, 0xb0,
0x68, 0x0, 0x20, 0x38, 0x5c, 0x0, 0x20, 0xff, 0x0, 0x0, 0x0, 0xe8, 0x59,
0x0, 0x20, 0x0, 0xff, 0x4, 0x19, 0x72, 0x46, 0xdf, 0x9, 0x21, 0xe7,
[...]
AFTER:
Mbuf data:
0x200055b0 <os_msys_1_data+608>: 0x68 0x5d 0x00 0x20 0x00 0x08 0x7c 0x00
0x200055b8 <os_msys_1_data+616>: 0xb0 0x68 0x00 0x20 0x38 0x5c 0x00 0x20
[...]
---
compiler/gdbmacros/mbuf.gdb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/gdbmacros/mbuf.gdb b/compiler/gdbmacros/mbuf.gdb
index f9b469c..60c373b 100644
--- a/compiler/gdbmacros/mbuf.gdb
+++ b/compiler/gdbmacros/mbuf.gdb
@@ -100,9 +100,9 @@ define mn_mbuf_dump
set $om = (struct os_mbuf *)($arg0)
mn_mbuf_print $om
- printf "Mbuf data: "
+ printf "Mbuf data:\n"
set $len = ($om)->om_len
- p/x *$om->om_data@$len
+ eval "x/%db $om->om_data", $len
end
document mn_mbuf_dump