[PATCH V5 0/3] eBPF support

Simon Marchi simark@simark.ca
Sat Aug 1 23:16:03 GMT 2020


On 2020-07-13 8:24 a.m., Jose E. Marchesi via Gdb-patches wrote:
> [Changes from V4:
> - Rebased to today's master.
> - Remove bpf-tdep.h.
> - Clarify in bpf_frame_this_id why this_id is not set.
> - Make the GDB patch independent from the sim patch.
> - Indentation/style fixes.
> - Copyright year fixed in sim/bpf/Makefile.in
> - CGEN_MAIN -> CGEN_MAINT typo fixed in sim/bpf/Makefile.in
> - Removed XXX comments from sim/bpf/Makefile.in
> - Removed spurious comment from sim/bpf/sim-if.c]
> 
> Hi good peoples!
> 
> This patch series adds support for the eBPF virtual architecture to
> GDB [1].
> 
> The first patch contains the basic bits to GDB in order to support the
> bpf-unknown-none target.  Breakpointing and instruction
> single-stepping works, but the debugging support in eBPF is still very
> minimal.  This is mainly due to the many limitations imposed by the
> architecture (disjoint stack, maximum stack size, etc).  We are
> working to overcome these limitations, by introducing a variant called
> xbpf, already supported in GCC with the -mxbpf option, whose purpose
> is to ease debugging and to be used in other contexts different than
> the Linux kernel, less restrictive.
> 
> The second patch adds a basic CGEN-based instruction simulator for
> eBPF.  It can run many eBPF programs and works well with GDB.  A
> testsuite covering the supported instructions is also included.  We
> will be expanding it in order to emulate the several kernel contexts
> in which eBPF programs can run, so eBPF developers can use GDB to
> debug their programs without having to load them in a running kernel.
> Currently the only kernel helper implemented in the simulator is
> printk, which is used by the tests.
> 
> We of course commit to maintain and evolve this stuff :)
> 
> [1] Support for eBPF has been already added to both binutils and GCC.

While git-am'ing the patches, I got:

Applying: gdb: support for eBPF
Applying: sim: eBPF simulator
Using index info to reconstruct a base tree...
M       sim/testsuite/configure
.git/rebase-apply/patch:145: trailing whitespace.
@CGEN_MAINT@CGEN_MAINT =
.git/rebase-apply/patch:474: trailing whitespace.

.git/rebase-apply/patch:482: trailing whitespace.
{
.git/rebase-apply/patch:493: trailing whitespace.

.git/rebase-apply/patch:513: trailing whitespace.

warning: squelched 13 whitespace errors
warning: 18 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging sim/testsuite/configure
Applying: sim: generated files for the eBPF simulator

Can you please track and fix those?

Simon



More information about the Gdb-patches mailing list