I'm trying to debug a canary related issue,
0x080493c2 <+157>: mov eax,DWORD PTR [ebp-0xc]
0x080493c5 <+160>: xor eax,DWORD PTR gs:0x14
Now I need to read gs:0x14
(gdb) info registers gs
gs 0x63 99
But how do I read gs:0x14? Clearly it is not 0x63 + 0x14, any ideas?
EDIT
Reading registers
(gdb) info registers fs_base
Invalid register `fs_base'
(gdb) info registers gs_base
Invalid register `gs_base'
(gdb) i r
eax 0x80493d8 134517720
ecx 0xffffd3a0 -11360
edx 0xffffd3c0 -11328
ebx 0x804c000 134529024
esp 0xffffd370 0xffffd370
ebp 0xffffd388 0xffffd388
esi 0x80494e0 134517984
edi 0xf7ffcb60 -134231200
eip 0x80493f9 0x80493f9 <main+33>
eflags 0x216 [ PF AF IF ]
cs 0x23 35
ss 0x2b 43
ds 0x2b 43
es 0x2b 43
fs 0x0 0
gs 0x63 99
k0 0x0 0
k1 0x0 0
k2 0x0 0
k3 0x0 0
k4 0x0 0
k5 0x0 0
k6 0x0 0
k7 0x0 0
show version
(gdb) show version
GNU gdb (Ubuntu 15.0.50.20240403-0ubuntu1) 15.0.50.20240403-git
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
show architecture
(gdb) show architecture
The target architecture is set to "auto" (currently "i386").
info registers fs_baseshow you what you need?gsregister you'd wantinfo reg gs_basethough given the failure to readfs_base, I guessgs_baseis not going to be available either. You should add output forshow version,show architecture.