Can't print in gdb

Olivia Nelson via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAJZVxRn6hwMKL73bOGY5N4UYFZO0csFyKBGhAvFTU0m0v4ZLAw@mail.gmail.com>
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 `'.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.