Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [BPF] Maintenance status and breakpoint/register questions
@ 2025-08-03  7:16 Qi Su via Gdb
  2025-08-03 10:39 ` Sam James via Gdb
  0 siblings, 1 reply; 3+ messages in thread
From: Qi Su via Gdb @ 2025-08-03  7:16 UTC (permalink / raw)
  To: gdb; +Cc: jose.marchesi

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-03 11:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-03  7:16 [BPF] Maintenance status and breakpoint/register questions Qi Su via Gdb
2025-08-03 10:39 ` Sam James via Gdb
2025-08-03 11:51   ` Qi Su via Gdb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox