You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2017/11/16 19:13:37 UTC

[GitHub] mkiiskila closed pull request #659: gdb macro os_wakeups, which lists scheduled os_callouts and sleeping tasks

mkiiskila closed pull request #659: gdb macro os_wakeups, which lists scheduled os_callouts and sleeping tasks
URL: https://github.com/apache/mynewt-core/pull/659
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/compiler/gdbmacros/os.gdb b/compiler/gdbmacros/os.gdb
index 3bf572b56..d761c6545 100644
--- a/compiler/gdbmacros/os.gdb
+++ b/compiler/gdbmacros/os.gdb
@@ -34,5 +34,40 @@ end
 
 document os_tasks
 usage: os_tasks
-
 Displays os tasks
+end
+
+define os_callouts
+	printf "Callouts:\n"
+	printf " %8s %10s %10s\n", "tick", "callout", "func"
+	while $c != 0
+		printf " %8d %10p %10p\n", $c->c_ticks, $c, $c->c_ev.ev_cb
+		set $c = $c->c_next.tqe_next
+	end
+end
+
+define os_sleep_list
+	printf "Tasks:\n"
+	printf " %8s %10s %10s\n", "tick", "task", "taskname"
+	set $t = g_os_sleep_list.tqh_first
+	while $t != 0
+		set $no_timo = $t->t_flags & 0x1
+		if $no_timo == 0
+			printf " %8d %10p ", $t->t_next_wakeup, $t
+			printf "%10s\n", $t->t_name
+		end
+		set $t = $t->t_os_list.tqe_next
+	end
+end
+
+define os_wakeups
+	set $c = g_callout_list.tqh_first
+	printf " Now is %d\n", g_os_time
+	os_callouts
+	os_sleep_list
+end
+
+document os_wakeups
+usage: os_wakeups
+Displays scheduled OS callouts, and next scheduled task wakeups
+end


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services