How to automatically refresh gdb in tui mode?

Had the exact same problem.
Have you tried GDB user-defined hooks or commands ?

In your ~/.gdbinit or in your session, you can do:

define hook-next
  refresh
end

This will call the refresh command each time you enter the next command or one of its aliases.

Or you can define:

define mynext
  next
  refresh
end

and call mynext instead of next.

Hooks are automatically called whenever a command C is entered and a hook-C exists, that’s so cool, I’ve just discovered that in the docs.

See https://sourceware.org/gdb/current/onlinedocs/gdb/Define.html
and https://sourceware.org/gdb/current/onlinedocs/gdb/Hooks.html#Hooks

You can add as many hooks/defines as you want.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)