Hi, Tao

On Thu, Aug 21, 2025 at 6:58 AM <devel-request@lists.crash-utility.osci.io> wrote:
Date: Thu, 21 Aug 2025 10:55:24 +1200
From: Tao Liu <ltao@redhat.com>
Subject: [Crash-utility] [PATCH v1 0/5] extension: Several
        improvements on eppic extension
To: devel@lists.crash-utility.osci.io
Cc: Tao Liu <ltao@redhat.com>
Message-ID: <20250820225529.6369-1-ltao@redhat.com>
Content-Type: text/plain; charset="US-ASCII"; x-default=true

Eppic works as a crash extension for a long time, and it is a very convenient
tool to extend crash's function:

1) People don't need to write an actual crash extension, which requires
   knowledge of crash APIs, such as readmem(), gdb_interface() etc.
   Implementing such an crash extension is hard for normal users.
2) Eppic programs are C-syntax-like scripting, no compile needed, so friendly
   to kernel developers who are already familiar with C. It's a good alternative
   for people who are unfamiliar with python (comparing to drgn/pykdump).
3) Writing eppic programs is similar to do kernel programming, people can use
   kernel data structures/global variables directly, again, friendly to kernel
   developers.

Personally I think eppic is a good tool and would like to push it forward to
make it used more widely, improved consistently. However I hardly heard anyone
who are using it, I guess it is due to it's extension position and unknown to
others.

In this patchset, I will make several improvements on eppic, although it is
still a crash extension, but I think it is made more easily for
compile/run/scripting.
 
Thank you for your efforts and working on this.

Think it over, I have several comments about this:
[1] In this patchset, the patch[1] and patch[4] are fine to me, although I haven't looked at the code details and tested them yet(plan to do it in v2)
[2] Currently the patch[2] and patch[3] seem to be unnecessary, the eppic is an extension module, no need to load it by default, furthermore, this should be good enough to compile extension modules with the "make extensions" command, and it is also convenient to load the eppic module with "extend eppic.so", not very complicated.
[3] The patch[5] is for alias, I do not recommend changing the user interface(or user habits), and also there is a crash internal command 'alias' to do the same thing.
[4] Can you also add a doc(or description) to give some simple examples, Eg: how to use it quickly? That can help other people understand the usage.


Thanks
Lianbo


To-do:

Some crash functions should be exposed to eppic, such as
maple_tree/rbtree etc, so people can iterate these kernel structures
with no problem, e.g. vma iteration. The exposure isn't hard and can be
implemented later.

Tao Liu (5):
  extensions: modify search path and extension preload
  Makefile: allow "make eppic" to create the eppic extension
  configure: Add EPPIC to Cflags
  eppic.patch: Add customized functions to eppic
  alias: create "eppic" alias to run eppic programs

 Makefile               |  12 ++-
 configure.c            |  14 ++-
 defs.h                 |   2 +-
 extensions.c           |  83 +++++++++++-------
 extensions/Makefile    |   2 +-
 extensions/eppic.mk    |  13 ++-
 extensions/eppic.patch | 195 +++++++++++++++++++++++++++++++++++++++++
 main.c                 |  16 +++-
 8 files changed, 295 insertions(+), 42 deletions(-)
 create mode 100644 extensions/eppic.patch

--
2.47.0