From: Qi Su via Gdb <gdb@sourceware.org>
To: gdb@sourceware.org
Cc: jose.marchesi@oracle.com
Subject: [BPF] Maintenance status and breakpoint/register questions
Date: Sun, 3 Aug 2025 00:16:31 -0700 [thread overview]
Message-ID: <CAJTrxKCVJ4KJ0Jh_mi59nrV6cUtMxDLD7C0dp5WED2J8sKtkWA@mail.gmail.com> (raw)
Hi Jose and gdb folks,
Hope you're doing well. I've been digging into GDB's BPF target and wanted
to check a few things before I start cleaning up patches.
1. Maintenance status
The last commits touching `gdb/bpf` seem over a year old, and I haven’t
seen much recent activity. Is the port still actively maintained? Also, is
there any internal code at Oracle—docs, test cases, examples—that could be
upstreamed or shared?
2. Breakpoint decode issue (BPF_INSN_BRKPT)
BPF_INSN_BRKPT is used for breakpoint injection, but the version
requirement is BPF_XBPF, which isn’t valid in normal object files. That
causes gdb to fail decoding breakpoints. Would removing the version check
for BPF_INSN_BRKPT be acceptable, or are there side effects to be aware of?
3. gdbstub register description (r10, pc)
bpf_register_type() assigns builtin_data_ptr and builtin_func_ptr to r10
and pc without forcing width. That leads to gdb assuming 32-bit sizes,
breaking remote stub communication.
Two possible fixes:
+ Explicitly use builtin_int64 for both;
+ Enable xml register description for bpf so the stub can specify widths
directly.
Do you have a preference? I lean toward xml—it seems more future-proof—but
wasn’t sure if avoiding xml was intentional.
Let me know your thoughts. I’m happy to send patches depending on the
direction that makes sense.
Best,
Qi
next reply other threads:[~2025-08-03 7:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-03 7:16 Qi Su via Gdb [this message]
2025-08-03 10:39 ` Sam James via Gdb
2025-08-03 11:51 ` Qi Su 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=CAJTrxKCVJ4KJ0Jh_mi59nrV6cUtMxDLD7C0dp5WED2J8sKtkWA@mail.gmail.com \
--to=gdb@sourceware.org \
--cc=jose.marchesi@oracle.com \
--cc=qi@fuzz.land \
/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