I compiled an assembly program with the following variables:
.data
x: .long 1337
str: .string "Hallo Welt\n"
In gdb I wanted to use the examine command with the str address.
(gdb) x str
0x6c6c6148: Cannot access memory at address 0x6c6c6148
I don’t understand why it doesn’t work.
0x6c6c6148 is ‘Hall’ so gdb is trying to interpret the string contents as an address. From the manual:
Try
x/s &str, it might work better.