Can't print in gdb

Olivia Nelson
Tue Dec 8 01:52:21 GMT 2020

I'm trying to print with a prefix, how can I do that? I've tried to
use + or printf, none of them works:

(gdb) ptype substr
type = struct string {
    uint8 *str;
    int len;
(gdb) p substr
$1 = 0x111111 "xxx=0"
(gdb) printf "%s\n", substr
Value can't be converted to integer.
(gdb) p "a" + substr
A syntax error in expression, near `'.

More information about the Gdb mailing list