2009-02-13 12:05:16 -05:00
|
|
|
# FreeSWITCH Custom GDB commands
|
|
|
|
define list_sessions
|
2009-02-24 17:01:10 -05:00
|
|
|
dont-repeat
|
2009-02-13 12:05:16 -05:00
|
|
|
printf "Listing sessions: \n"
|
|
|
|
set $i = 0
|
|
|
|
set $x=session_manager.session_table->table->first
|
|
|
|
while($x != 0x0)
|
|
|
|
printf "uuid %s is at %p\n", $x->pKey, $x->data
|
|
|
|
set $x = $x->next
|
|
|
|
set $i = $i + 1
|
|
|
|
end
|
|
|
|
printf "Found %d sessions.\n", $i
|
2009-02-24 17:01:10 -05:00
|
|
|
end
|
2009-02-24 17:07:38 -05:00
|
|
|
document list_sessions
|
|
|
|
Print a list of session uuid and pointers
|
|
|
|
end
|
2009-02-24 17:01:10 -05:00
|
|
|
|
|
|
|
define hash_it_str
|
|
|
|
dont-repeat
|
|
|
|
set $i = 0
|
|
|
|
set $x=$arg0->table->first
|
|
|
|
while($x != 0x0)
|
|
|
|
printf "key: %s valueptr: %p\n", $x->pKey, $x->data
|
|
|
|
set $x = $x->next
|
|
|
|
set $i = $i + 1
|
|
|
|
end
|
|
|
|
end
|
2009-02-24 17:07:38 -05:00
|
|
|
document hash_it_str
|
|
|
|
Usage: hash_it_str [hashtable]
|
|
|
|
Prints the content of a hashtable displaying the key as a string and the value as pointer
|
|
|
|
end
|
2009-02-24 17:01:10 -05:00
|
|
|
|
|
|
|
|
|
|
|
define hash_it_str_x
|
|
|
|
dont-repeat
|
|
|
|
set $i = 0
|
|
|
|
set $x=$arg0->table->first
|
|
|
|
while($x != 0x0)
|
|
|
|
printf "key: %s\n", $x->pKey
|
2009-02-24 17:07:38 -05:00
|
|
|
print (($arg1*)$x->data)->$arg2
|
2009-02-24 17:01:10 -05:00
|
|
|
printf "\n\n"
|
|
|
|
set $x = $x->next
|
|
|
|
set $i = $i + 1
|
|
|
|
end
|
|
|
|
end
|
2009-02-24 17:07:38 -05:00
|
|
|
document hash_it_str_x
|
|
|
|
Usage: hash_it_str_x [hashtable] [value_type] [member]
|
|
|
|
Prints the content of a hashtable displaying the key as a string and a specific member of the value struct. Args: hashtable value_type member
|
|
|
|
end
|
2009-02-24 17:01:10 -05:00
|
|
|
|
2009-03-02 11:11:42 -05:00
|
|
|
define event_dump
|
2009-03-02 11:12:36 -05:00
|
|
|
dont-repeat
|
2009-03-02 11:11:42 -05:00
|
|
|
set $x = $arg0->headers
|
2009-02-24 17:01:10 -05:00
|
|
|
while($x != 0x0)
|
2009-03-02 11:11:42 -05:00
|
|
|
printf "%s = %s\n", $x->name, $x->value
|
2009-02-24 17:01:10 -05:00
|
|
|
set $x = $x->next
|
2009-03-02 11:11:42 -05:00
|
|
|
end
|
2009-03-02 11:12:36 -05:00
|
|
|
end
|
|
|
|
document event_dump
|
|
|
|
Usage: event_dump [switch_event_t*]
|
2009-03-02 11:36:59 -05:00
|
|
|
Print an event's headers and values
|
2009-03-20 15:36:43 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
define print_list
|
|
|
|
dont-repeat
|
|
|
|
set $x = $arg0
|
|
|
|
while ($x != 0x0)
|
|
|
|
print *$x
|
|
|
|
set $x = $x->next
|
|
|
|
end
|
|
|
|
end
|
|
|
|
document print_list
|
|
|
|
Usage print_list [symbol]
|
|
|
|
Prints all the remaining elements of a linked list
|
|
|
|
end
|