Display value found at given address gdb

You are correctly reading the value at memory address 0x8048f0b, but the line call 8048f0b <strings_not_equal> indicates that this address is the start of a function (called strings_not_equal()). You wouldn’t expect that to be ASCII – you’d expect it to be more machine code.

If you’re looking for the function arguments to strings_not_equal(), those are being pushed onto the stack. The first argument is being copied from 0x8(%ebp), which is the first argument of func1(). The second argument is $0x8049988, which is presumably the address of a string.

If you want to print the contents of the address as a string, you can do that with x/s:

x/s 0x8049988

Leave a Comment