I am reading an example on a course about jump tables. They call gdb x/8g 0x123456
The resulting output looks like:
0x123456 0x000000000000134234 0x0000000000005f424
0x123487 0x0000000000001dd1ac 0x000000000000ef327
I thought a jump table maps an address to the address of the code it should execute. Why then are there 3 columns (shouldn't it be 2?).
You didn't paste the real GDB output, which looked something like:
(the first column is different). In programming, details matter.
If you make the terminal narrower, then you'll get 2 columns, like this:
As KerrekSB suggested, read the GDB manual to understand what
x
does. Hint: the first column doesn't really matter -- it's where the table itself is stored.