From: Tom Tromey <tom@tromey.com>
To: Konstantin Kharlamov via Gdb <gdb@sourceware.org>
Cc: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Subject: Re: How to write to stderr/stdout of debuggee
Date: Mon, 13 Nov 2023 10:47:27 -0700 [thread overview]
Message-ID: <877cmlsfyo.fsf@tromey.com> (raw)
In-Reply-To: <9c035c4b1eeca774df605fda412570a9bb151a59.camel@yandex.ru> (Konstantin Kharlamov via Gdb's message of "Fri, 10 Nov 2023 18:06:31 +0300")
>>>>> Konstantin Kharlamov via Gdb <gdb@sourceware.org> writes:
> My usecase is I'm debugging some plugin written in Go, and I don't have
> anything language related in the visibility scope to be able to write
> to stderr/stdout. Though apparently gdb does see a `write` function
> (which I presume is a C write function, not Go), but executing a
> p (int) write(2, "Hello", 6)
> gives me a `syntax error in expression`. So anyway, I'm just wondering
> if there's some built-in way to do that. I don't see a built-in $_write
> function in gdb :(
It's possible you have gdb in 'go' language mode.
Try 'set language c' before that print. It might help.
Tom
next prev parent reply other threads:[~2023-11-13 17:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 15:06 Konstantin Kharlamov via Gdb
2023-11-13 17:47 ` Tom Tromey [this message]
2023-11-13 18:10 ` Konstantin Kharlamov via Gdb
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=877cmlsfyo.fsf@tromey.com \
--to=tom@tromey.com \
--cc=Hi-Angel@yandex.ru \
--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