add printstate function
add print more info, but could not be run with gdbw