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

* Re: [BPF] Maintenance status and breakpoint/register questions
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Sam James via Gdb @ 2025-08-03 10:39 UTC (permalink / raw)
  To: Qi Su via Gdb; +Cc: Qi Su, jose.marchesi

Qi Su via Gdb <gdb@sourceware.org> writes:

> 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?

Ports in gdb don't tend to require particularly high levels of
commits. I'm not saying there isn't stuff to be done, but I don't think
the activity level is alarming (at least to me). 

The only BPF specific file in gdb is gdb/bpf-tdep.c and that's not so
big by design. Is there something more specific you're concerned about?

(I'm not saying there is or isn't some problem with the bpf port, I'm
just curious as I hadn't seen anything as a problem.)

> [...]

sam

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

* Re: [BPF] Maintenance status and breakpoint/register questions
  2025-08-03 10:39 ` Sam James via Gdb
@ 2025-08-03 11:51   ` Qi Su via Gdb
  0 siblings, 0 replies; 3+ messages in thread
From: Qi Su via Gdb @ 2025-08-03 11:51 UTC (permalink / raw)
  To: Qi Su via Gdb; +Cc: jose.marchesi, Sam James


On 8/3/25 03:39, Sam James wrote:
> Qi Su via Gdb <gdb@sourceware.org> writes:
>
>> 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?
> Ports in gdb don't tend to require particularly high levels of
> commits. I'm not saying there isn't stuff to be done, but I don't think
> the activity level is alarming (at least to me).
>
> The only BPF specific file in gdb is gdb/bpf-tdep.c and that's not so
> big by design. Is there something more specific you're concerned about?


I understand low frequency is fine for ports in gdb. bpf-gdb had very 
little discussion. There's only one bug report #28565 in sourceware 
bugzilla in 2021 and it shows bpf-gdb's simulator was not functional 
(step/run/continue crashes). It's the most basic functionality and had 
not been fixed for a long time and that's why I was asking.

> [...]
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