Convenience variables on my macos are not expanded when using arm-gdb-none-eabi
:
(gdb) set $foo = "bar"
(gdb) p $foo
$11 = "b"
However – this seems to be a print issue, as the value is correctly stored:
(gdb) set $foo = "bar"
(gdb) p/x $foo
$12 = {0x62, 0x61, 0x72, 0x0}
(gdb) ptype $foo
type = char [4]
New contributor
Catalin Moraru is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.