Is there some way to read the x86-64 model-specific registers, specifically IA32_FS_BASE and IA32_GS_BASE, while debugging a program using GDB?
Less preferable would
Since gdb 8 the registers $fs_base and $gs_base are also available. These work in code dumps too, not just live programs.
$fs_base
$gs_base