public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Olivia Nelson <the.warl0ck.1989@gmail.com>
To: gdb@sourceware.org
Subject: Can't print in gdb
Date: Tue, 8 Dec 2020 09:52:21 +0800	[thread overview]
Message-ID: <CAJZVxRn6hwMKL73bOGY5N4UYFZO0csFyKBGhAvFTU0m0v4ZLAw@mail.gmail.com> (raw)

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 `'.

             reply	other threads:[~2020-12-08  1:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08  1:52 Olivia Nelson [this message]
2020-12-08  8:58 ` Andreas Schwab
2020-12-08 11:25 ` Shahab Vahedi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJZVxRn6hwMKL73bOGY5N4UYFZO0csFyKBGhAvFTU0m0v4ZLAw@mail.gmail.com \
    --to=the.warl0ck.1989@gmail.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).