#set demangle-style none
set history save
set history filename ~/.gdb_history
define reconnect
target remote :3333
end
define reload
mon reset halt
make
load
mon reset init
continue
end
define recover
mon srst_config srst_only
mon kinetis mdm mass_erase
mon reset init
end
# gdb implementation of the linux lsmod
define lsmod
set $current = modules.next
set $offset = ((int)&((struct module *)0).list)
printf "Module\tAddress\n"
while($current.next != modules.next)
printf "%s\t%p\n", \
((struct module *) (((void *) ($current)) - $offset ) )->name ,\
((struct module *) (((void *) ($current)) - $offset ) )->module_core
set $current = $current.next
end
end