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:02 UTC

[mynewt-core] branch master updated (e809e7a -> 43671ff)

This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git.


    from e809e7a  hw/mcu/dialog: Improve lpclk notifications
     new 34899eb  mbuf.gdb: Print om_data as hexdump, not int array
     new ccdfb67  mbuf.gdb: Remove "total length" line
     new 0d9bea2  mbuf.gdb: Print packet header before mbuf header
     new 43671ff  mbuf.gdb: Print mbuf header with p/x

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 compiler/gdbmacros/mbuf.gdb | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)


[mynewt-core] 03/04: mbuf.gdb: Print packet header before mbuf header

Posted by cc...@apache.org.
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 0d9bea2447f30f511dbdd61208fa22b3118c407b
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Oct 9 17:40:26 2019 -0700

    mbuf.gdb: Print packet header before mbuf header
    
    Since the packet header describes the entire chain, it makes sense to
    print it before any mbuf headers.  Before this change, the packet header was
    printed after the first mbuf header.
---
 compiler/gdbmacros/mbuf.gdb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/gdbmacros/mbuf.gdb b/compiler/gdbmacros/mbuf.gdb
index 523de2e..369c84d 100644
--- a/compiler/gdbmacros/mbuf.gdb
+++ b/compiler/gdbmacros/mbuf.gdb
@@ -74,14 +74,14 @@ end
 define mn_mbuf_print
     set $om = (struct os_mbuf *)($arg0)
 
-    printf "Mbuf header: "
-    p *$om
-
     if ($om)->om_pkthdr_len > 0
         printf "Packet header: "
         mn_mbuf_pkthdr_print $om
     end
 
+    printf "Mbuf header: "
+    p *$om
+
     if ($om)->om_pkthdr_len > sizeof (struct os_mbuf_pkthdr)
         printf "User header: "
         mn_mbuf_usrhdr_print $om


[mynewt-core] 04/04: mbuf.gdb: Print mbuf header with p/x

Posted by cc...@apache.org.
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 43671ff810e94e6b0f175661748f4b07d9d122f5
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Oct 9 17:40:36 2019 -0700

    mbuf.gdb: Print mbuf header with p/x
    
    Before this change, these macros used `p` to print the mbuf header.
    This produced a lot of garbage for the `om_databuf` member (it is a
    `uint8_t*`, so gdb tried to print it as a string).
    
    e.g.,
    
    BEFORE:
        Mbuf header: $527 = {
          om_data = 0x200055b0 <os_msys_1_data+608> "h]",
          om_flags = 0 '\000',
          om_pkthdr_len = 0 '\000',
          om_len = 131,
          om_omp = 0x200068b0 <os_msys_1_mbuf_pool>,
          om_next = {
            sle_next = 0x0
          },
          om_databuf = 0x20005c48 <os_msys_1_data+2296> "Uc\365\271@\362\354\065u\020\354m[\237\320\020\036<bI\235 x$1\252g\221Z\227\071\226e5\344\177\300\374\263\362`t\203\262{\255\343r\370\366\354\352\212S\237Q\355\"b\241\006\253uJ\264\246\334n\366\203\036\\\204\066.Zy\237\t\264\313\066\276\257\347\226\r\017\363=vK0\037\321\217\262\371\257\307\070\320\062\212` 4c\327\273^tA\177\313\362\002\063\033Pu\272\307\226\327\315.\257Ht\205O\006\234\234\253\200T"
        }
    
    AFTER:
        Mbuf header: $534 = {
          om_data = 0x200055b0,
          om_flags = 0x0,
          om_pkthdr_len = 0x0,
          om_len = 0x83,
          om_omp = 0x200068b0,
          om_next = {
            sle_next = 0x0
          },
          om_databuf = 0x20005c48 <os_msys_1_data+2296>
        }
---
 compiler/gdbmacros/mbuf.gdb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/gdbmacros/mbuf.gdb b/compiler/gdbmacros/mbuf.gdb
index 369c84d..9ece3b8 100644
--- a/compiler/gdbmacros/mbuf.gdb
+++ b/compiler/gdbmacros/mbuf.gdb
@@ -80,7 +80,7 @@ define mn_mbuf_print
     end
 
     printf "Mbuf header: "
-    p *$om
+    p/r *$om
 
     if ($om)->om_pkthdr_len > sizeof (struct os_mbuf_pkthdr)
         printf "User header: "


[mynewt-core] 02/04: mbuf.gdb: Remove "total length" line

Posted by cc...@apache.org.
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 ccdfb6758503052214868a83008c1a97aa0d5f0c
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Oct 9 17:39:47 2019 -0700

    mbuf.gdb: Remove "total length" line
    
    The output of om_mbuf_chain_print included a "total length" line at the
    end.  This line is unnecessary since its value is just a copy of the
    `omp_len` field printed earlier.
---
 compiler/gdbmacros/mbuf.gdb | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/compiler/gdbmacros/mbuf.gdb b/compiler/gdbmacros/mbuf.gdb
index 60c373b..523de2e 100644
--- a/compiler/gdbmacros/mbuf.gdb
+++ b/compiler/gdbmacros/mbuf.gdb
@@ -120,11 +120,14 @@ define mn_mbuf_chain_print
     while $om != 0
         printf "Mbuf addr: %p\n", $om
         mn_mbuf_print $om
+
         set $totlen += $om->om_len
         set $om = $om->om_next.sle_next
-    end
 
-    printf "total length: %d\n", $totlen
+        if $om != 0
+            printf "\n"
+        end
+    end
 end
 
 document mn_mbuf_chain_print
@@ -142,11 +145,14 @@ define mn_mbuf_chain_dump
     while $om != 0
         printf "Mbuf addr: %p\n", $om
         mn_mbuf_dump $om
+
         set $totlen += $om->om_len
         set $om = $om->om_next.sle_next
-    end
 
-    printf "total length: %d\n", $totlen
+        if $om != 0
+            printf "\n"
+        end
+    end
 end
 
 document mn_mbuf_chain_dump


[mynewt-core] 01/04: mbuf.gdb: Print om_data as hexdump, not int array

Posted by cc...@apache.org.
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