This is a regression from 8.3. When assigning an inferior address to a convenience variable, GDB is unable to print it correctly. It's possible to reproduce this bug by doing: $ echo -e 'int main(){const char a[]="test";return 0;}' | gcc -x c - -O0-g3 $ ./gdb/gdb --data-directory ./gdb/data-directory -q ./a.out -ex 'start' -ex 'set $x = (const char *) (&a[0] + 2)' -ex 'printf "%s\n", $x' This has been fixed upstream; I'm creating this bug to backport the fix to the 9.1 branch.
Fixed by https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=141e490226a99e0359393ddaca5628c68de036dc