Revision
14314
Author
mrene
Date
2009-07-21 19:15:36 -0500 (Tue, 21 Jul 2009)

Log Message

Add some gdb helpers

Modified Paths

Diff

Modified: freeswitch/trunk/support-d/.gdbinit (14313 => 14314)


--- freeswitch/trunk/support-d/.gdbinit	2009-07-21 19:17:22 UTC (rev 14313)
+++ freeswitch/trunk/support-d/.gdbinit	2009-07-22 00:15:36 UTC (rev 14314)
@@ -73,3 +73,35 @@
 Usage print_list [symbol]
 Prints all the remaining elements of a linked list
 end
+
+define print_tags
+	dont-repeat
+	set $x = $arg0
+	while (*((int*)$x) != 0x0)
+		info sym $x->t_tag
+		printf "%p \"%s\"\n", $x->t_value, $x->t_value
+		set $x = $x + 1
+	end
+end
+document print_tags
+Usage print_tags [tags]
+List sofia tags and their values
+end
+
+define setup_session
+	set $session=(switch_core_session_t*)$arg0
+	set $channel = $session->channel
+	printf "UUID: %s\nName: %s\nState: %d\n", $session->uuid_str, $channel->name, $channel->state
+end
+document setup_session
+Usage setup_session [session address]
+Sets session and channel from the given address
+end
+
+define setup_sofia
+	set $tech_pvt = (private_object_t*)$session->private_info
+	set $nh = $tech_pvt->nh
+end
+document setup_sofia
+No arguments. Sets nh and tech_pvt from the current session
+end