gdbmacros; add a function to print free list from main mbuf pool.

Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/876af601
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/876af601
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/876af601

Branch: refs/heads/develop
Commit: 876af601df888dea81a3b91fa5099e18b2b14d49
Parents: 54b2804
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Sat Jan 28 17:32:44 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Sat Jan 28 17:32:44 2017 -0800

----------------------------------------------------------------------
 compiler/gdbmacros/mbuf.gdb | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/876af601/compiler/gdbmacros/mbuf.gdb
----------------------------------------------------------------------
diff --git a/compiler/gdbmacros/mbuf.gdb b/compiler/gdbmacros/mbuf.gdb
index 662cb52..3bb81ad 100644
--- a/compiler/gdbmacros/mbuf.gdb
+++ b/compiler/gdbmacros/mbuf.gdb
@@ -164,3 +164,12 @@ end
 define mn_msys1_print
     mn_mbuf_pool_print &os_msys_init_1_mbuf_pool 
 end
+
+define mn_msys1_free_print
+    set $om = os_msys_init_1_mempool.slh_first
+
+    while $om != 0
+        printf "Mbuf addr: %p\n", $om
+        set $om = $om->mb_next.sle_next
+    end
+end

Reply via email to