Re: [PATCH] eppic.patch: Empty the customized functions and move to eppic
by lijiang
On Mon, Nov 10, 2025 at 8:01 AM <devel-request(a)lists.crash-utility.osci.io>
wrote:
> Date: Mon, 10 Nov 2025 12:59:34 +1300
> From: Tao Liu <ltao(a)redhat.com>
> Subject: [Crash-utility] [PATCH] eppic.patch: Empty the customized
> functions and move to eppic
> To: devel(a)lists.crash-utility.osci.io
> Cc: Tao Liu <ltao(a)redhat.com>
> Message-ID: <20251109235934.15673-1-ltao(a)redhat.com>
> Content-Type: text/plain; charset="US-ASCII"; x-default=true
>
> The customized functions will be moved to eppic side[1]. Let's keep
> an empty eppic.patch here for future use.
>
Do you mean to still keep the changes in the extensions/eppic.mk?
I would tend to make a cleanup, if this has already been moved to upstream
Eppic git repo. The code looks more friendly.
Thanks
Lianbo
>
> [1]: https://github.com/lucchouina/eppic/pull/30
>
> Signed-off-by: Tao Liu <ltao(a)redhat.com>
> ---
> extensions/eppic.patch | 210 -----------------------------------------
> 1 file changed, 210 deletions(-)
>
> diff --git a/extensions/eppic.patch b/extensions/eppic.patch
> index 6a08b09..e69de29 100644
> --- a/extensions/eppic.patch
> +++ b/extensions/eppic.patch
> @@ -1,210 +0,0 @@
> ---- eppic/applications/crash/eppic.c.orig
> -+++ eppic/applications/crash/eppic.c
> -@@ -20,6 +20,7 @@
> - #include "defs.h"
> -
> - #include <eppic_api.h>
> -+#include "eppic.h"
> -
> - /*
> - * Global data (global_data.c)
> -@@ -788,6 +789,39 @@ char *sclass_help[]={
> - NULL
> - };
> -
> -+char *eppic_help[]={
> -+ "eppic",
> -+ "Run eppic program(es).",
> -+ "<fileName1.c>[, <fileName2.c>]",
> -+ " Oneshot run eppic program(es) which with a main()
> entry each.",
> -+ NULL
> -+};
> -+
> -+void
> -+eppic_command(void)
> -+{
> -+ char *buf;
> -+ optind = 1;
> -+
> -+ if (!args[optind]) {
> -+ cmd_usage(crash_global_cmd(), SYNOPSIS);
> -+ return;
> -+ }
> -+
> -+ while(args[optind]) {
> -+ buf = eppic_filempath(args[optind]);
> -+ if (!buf) {
> -+ eppic_msg("eppic_filempath error on %s\n",
> args[optind]);
> -+ return;
> -+ }
> -+ eppic_load(buf);
> -+ if (eppic_findfile(buf, 0))
> -+ eppic_unload(buf);
> -+ eppic_free(buf);
> -+ optind++;
> -+ }
> -+}
> -+
> - #define NCMDS 200
> - static struct command_table_entry command_table[NCMDS] = {
> -
> -@@ -797,6 +831,7 @@ static struct command_table_entry
> command_table[NCMDS] = {
> - {"sdebug", sdebug_cmd, sdebug_help},
> - {"sname", sname_cmd, sname_help},
> - {"sclass", sclass_cmd, sclass_help},
> -+ {"eppic", eppic_command, eppic_help},
> - {(char *)0 }
> - };
> -
> -@@ -885,6 +920,13 @@ char **help=malloc(sizeof *help * 5);
> - }
> - }
> - free(help);
> -+
> -+ if (load && !strcmp(name, "main")) {
> -+ int optind_save = optind;
> -+ eppic_cmd(name, NULL, 0);
> -+ optind = optind_save;
> -+ }
> -+
> - return;
> - }
> -
> ---- eppic/libeppic/eppic_api.h.orig
> -+++ eppic/libeppic/eppic_api.h
> -@@ -16,6 +16,9 @@
> - /* minor and major version number
> - 4.0 switch to new Eppic name and use of fully typed symbols.
> - */
> -+#ifndef EPPIC_API_H
> -+#define EPPIC_API_H
> -+
> - #define S_MAJOR 5
> - #define S_MINOR 0
> -
> -@@ -298,3 +301,5 @@ void eppic_dbg_named(int class, char *name, int
> level, char *, ...);
> -
> - /* parsers debug flags */
> - extern int eppicdebug, eppicppdebug;
> -+
> -+#endif
> -\ No newline at end of file
> ---- eppic/libeppic/eppic_func.c.orig
> -+++ eppic/libeppic/eppic_func.c
> -@@ -22,6 +22,8 @@
> - #include <sys/types.h>
> - #include <time.h>
> - #include <sys/stat.h>
> -+#include <fcntl.h>
> -+#include <unistd.h>
> - #include "eppic.h"
> -
> - /*
> -@@ -793,6 +795,42 @@ char *ed=getenv("EDITOR");
> - if(!system(buf)) eppic_load(fname);
> - }
> -
> -+static const char *example[] = {
> -+"/*
> ",
> -+" * Example: Print all tasks' PID & command
> ",
> -+" *
> ",
> -+" * // Kernel's global variables and data structures can be used
> directly without",
> -+" * // pre-define it in kernel header. If any are within kernel modules,
> should",
> -+" * // preload the .ko first via \"mod -S/-s\" cmd in crash before
> invoke your",
> -+" * // eppic program.
> ",
> -+" * //
> ",
> -+" * // Eppic program's syntax is similar to C but with slight
> differences. ",
> -+" * // Code samples:
> ",
> -+" * //
> https://github.com/lucchouina/eppic/tree/master/applications/crash/code",
> -+" * // Available eppic functions:
> ",
> -+" * //
> https://github.com/lucchouina/eppic/blob/master/libeppic/eppic_builtin.c#...
> ",
> -+" *
> ",
> -+" * int main(void)
> ",
> -+" * {
> ",
> -+" * struct task_struct *p;
> ",
> -+" * unsigned long offset;
> ",
> -+" *
> ",
> -+" * p = (struct task_struct *)&init_task;
> ",
> -+" * offset = (unsigned long)&(p->tasks) - (unsigned long)p;
> ",
> -+" *
> ",
> -+" * do {
> ",
> -+" * printf(\"PID: %d Command: %s\\n\", (int)(p->pid),
> getstr((char *)&(p->comm[0])));",
> -+" * p = (struct task_struct *)((unsigned long)(p->tasks.next) -
> offset);",
> -+" * } while(p != &init_task);
> ",
> -+" *
> ",
> -+" * return 0;
> ",
> -+" * }
> ",
> -+" *
> ",
> -+" * crash> eppic program_file.c
> ",
> -+" */
> ",
> -+};
> -+
> -+char *eppic_get_func_file(char *);
> - /*
> - This funciton is called to start a vi session on a function
> - (file=0) or a file (file=1);
> -@@ -800,24 +838,31 @@ char *ed=getenv("EDITOR");
> - void
> - eppic_vi(char *fname, int file)
> - {
> --int line, freeit=0;
> -+int line=1, freeit=0, fd;
> - char *filename;
> -+char newline = '\n';
> -
> - if(file) {
> -
> - filename=eppic_filempath(fname);
> -
> - if(!filename) {
> --
> -- eppic_msg("File not found : %s\n", fname);
> -- return;
> --
> -- }
> --
> -- line=1;
> -- freeit=1;
> --
> --
> -+ fd = open(fname, O_WRONLY | O_CREAT | O_TRUNC, 0644);
> -+ if (fd < 0) {
> -+ eppic_msg("File not found : %s\n", fname);
> -+ return;
> -+ } else {
> -+ for (int i = 0; i < sizeof(example)/sizeof(char *); i++) {
> -+ write(fd, example[i], strlen(example[i]));
> -+ write(fd, &newline, sizeof(newline));
> -+ }
> -+ close(fd);
> -+ filename = fname;
> -+ freeit=0;
> -+ }
> -+ } else {
> -+ freeit=1;
> -+ }
> - } else {
> -
> - func *f=eppic_getfbyname(fname, 0);
> -@@ -837,6 +882,10 @@ char *filename;
> -
> - eppic_exevi(filename, line);
> -
> -+ char *fi_name = eppic_get_func_file("main");
> -+ if (fi_name)
> -+ eppic_deletefile(fi_name);
> -+
> - if(freeit) eppic_free(filename);
> -
> - }
> -@@ -1184,3 +1233,10 @@ eppic_runcmd(char *fname, var_t*args)
> - return 0;
> - }
> -
> -+char *eppic_get_func_file(char *funcname)
> -+{
> -+ func *fn = eppic_getfbyname(funcname, 0);
> -+ if (!fn)
> -+ return NULL;
> -+ return fn->file->fname;
> -+}
> --
> 2.47.0
>
1 month, 3 weeks
Bug report: "timer -r" option fails on 6.18-rc kernels
by HAGIO KAZUHITO(萩尾 一仁)
Hi Lianbo, Tao,
The following error is observed on 6.18-rc kernels.
crash> timer -r
timer: invalid structure member offset: hrtimer_clock_base_get_time
FILE: kernel.c LINE: 7953 FUNCTION: dump_hrtimer_clock_base()
...
This is due to [1].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
The "timer -r" option displays the base->get_time function, but now kernel
switches the function by base->clockid, which are CLOCK_* macro values.
We can copy the function names and macro values from the kernel, but if
they are modified, crash cannot follow the changes automatically.
How should we fix this? or in the first place, maybe we can change what
the "timer -r" displays there, instead of .get_time function name.
For example, if we show enum hrtimer_base_type values by base->index:
crash> timer -r
CPU: 0 HRTIMER_CPU_BASE: ffff8b7aefc20640
CLOCK: 0 HRTIMER_CLOCK_BASE: ffff8b7aefc20680 [HRTIMER_BASE_MONOTONIC]
...
CLOCK: 1 HRTIMER_CLOCK_BASE: ffff8b7aefc206c0 [HRTIMER_BASE_REALTIME]
...
What do you think?
Thanks,
Kazu
1 month, 3 weeks
[PATCH] Revert "eppic.patch: Add customized functions to eppic"
by Tao Liu
This reverts commit 3fc8d4023c0d5dfbf21ea7cdce96a24ece00d4f2 because
the customized functions will be moved to eppic side[1]. So the
eppic.patch is no longer needed. Let's revert those to make a
clean code.
[1]: https://github.com/lucchouina/eppic/pull/30
Signed-off-by: Tao Liu <ltao(a)redhat.com>
---
This patch is the follow-up of discussion [2].
[2]: https://www.mail-archive.com/devel@lists.crash-utility.osci.io/msg01816.html
---
extensions/eppic.mk | 9 +-
extensions/eppic.patch | 210 -----------------------------------------
2 files changed, 1 insertion(+), 218 deletions(-)
delete mode 100644 extensions/eppic.patch
diff --git a/extensions/eppic.mk b/extensions/eppic.mk
index bf80dd1..9435793 100644
--- a/extensions/eppic.mk
+++ b/extensions/eppic.mk
@@ -53,14 +53,7 @@ all:
fi; \
if [ -f $(APPFILE) ]; \
then \
- if patch --dry-run -N -p0 < eppic.patch >/dev/null ; then \
- patch -N -p0 < eppic.patch; \
- make -f eppic.mk eppic.so; \
- elif patch --dry-run -N -p0 -R < eppic.patch >/dev/null ; then \
- make -f eppic.mk eppic.so; \
- else \
- echo "eppic.so: apply eppic.patch error"; \
- fi; \
+ make -f eppic.mk eppic.so; \
else \
echo "eppic.so: failed to pull eppic code from git repo"; \
fi; \
diff --git a/extensions/eppic.patch b/extensions/eppic.patch
deleted file mode 100644
index 6a08b09..0000000
--- a/extensions/eppic.patch
+++ /dev/null
@@ -1,210 +0,0 @@
---- eppic/applications/crash/eppic.c.orig
-+++ eppic/applications/crash/eppic.c
-@@ -20,6 +20,7 @@
- #include "defs.h"
-
- #include <eppic_api.h>
-+#include "eppic.h"
-
- /*
- * Global data (global_data.c)
-@@ -788,6 +789,39 @@ char *sclass_help[]={
- NULL
- };
-
-+char *eppic_help[]={
-+ "eppic",
-+ "Run eppic program(es).",
-+ "<fileName1.c>[, <fileName2.c>]",
-+ " Oneshot run eppic program(es) which with a main() entry each.",
-+ NULL
-+};
-+
-+void
-+eppic_command(void)
-+{
-+ char *buf;
-+ optind = 1;
-+
-+ if (!args[optind]) {
-+ cmd_usage(crash_global_cmd(), SYNOPSIS);
-+ return;
-+ }
-+
-+ while(args[optind]) {
-+ buf = eppic_filempath(args[optind]);
-+ if (!buf) {
-+ eppic_msg("eppic_filempath error on %s\n", args[optind]);
-+ return;
-+ }
-+ eppic_load(buf);
-+ if (eppic_findfile(buf, 0))
-+ eppic_unload(buf);
-+ eppic_free(buf);
-+ optind++;
-+ }
-+}
-+
- #define NCMDS 200
- static struct command_table_entry command_table[NCMDS] = {
-
-@@ -797,6 +831,7 @@ static struct command_table_entry command_table[NCMDS] = {
- {"sdebug", sdebug_cmd, sdebug_help},
- {"sname", sname_cmd, sname_help},
- {"sclass", sclass_cmd, sclass_help},
-+ {"eppic", eppic_command, eppic_help},
- {(char *)0 }
- };
-
-@@ -885,6 +920,13 @@ char **help=malloc(sizeof *help * 5);
- }
- }
- free(help);
-+
-+ if (load && !strcmp(name, "main")) {
-+ int optind_save = optind;
-+ eppic_cmd(name, NULL, 0);
-+ optind = optind_save;
-+ }
-+
- return;
- }
-
---- eppic/libeppic/eppic_api.h.orig
-+++ eppic/libeppic/eppic_api.h
-@@ -16,6 +16,9 @@
- /* minor and major version number
- 4.0 switch to new Eppic name and use of fully typed symbols.
- */
-+#ifndef EPPIC_API_H
-+#define EPPIC_API_H
-+
- #define S_MAJOR 5
- #define S_MINOR 0
-
-@@ -298,3 +301,5 @@ void eppic_dbg_named(int class, char *name, int level, char *, ...);
-
- /* parsers debug flags */
- extern int eppicdebug, eppicppdebug;
-+
-+#endif
-\ No newline at end of file
---- eppic/libeppic/eppic_func.c.orig
-+++ eppic/libeppic/eppic_func.c
-@@ -22,6 +22,8 @@
- #include <sys/types.h>
- #include <time.h>
- #include <sys/stat.h>
-+#include <fcntl.h>
-+#include <unistd.h>
- #include "eppic.h"
-
- /*
-@@ -793,6 +795,42 @@ char *ed=getenv("EDITOR");
- if(!system(buf)) eppic_load(fname);
- }
-
-+static const char *example[] = {
-+"/* ",
-+" * Example: Print all tasks' PID & command ",
-+" * ",
-+" * // Kernel's global variables and data structures can be used directly without",
-+" * // pre-define it in kernel header. If any are within kernel modules, should",
-+" * // preload the .ko first via \"mod -S/-s\" cmd in crash before invoke your",
-+" * // eppic program. ",
-+" * // ",
-+" * // Eppic program's syntax is similar to C but with slight differences. ",
-+" * // Code samples: ",
-+" * // https://github.com/lucchouina/eppic/tree/master/applications/crash/code",
-+" * // Available eppic functions: ",
-+" * // https://github.com/lucchouina/eppic/blob/master/libeppic/eppic_builtin.c#...",
-+" * ",
-+" * int main(void) ",
-+" * { ",
-+" * struct task_struct *p; ",
-+" * unsigned long offset; ",
-+" * ",
-+" * p = (struct task_struct *)&init_task; ",
-+" * offset = (unsigned long)&(p->tasks) - (unsigned long)p; ",
-+" * ",
-+" * do { ",
-+" * printf(\"PID: %d Command: %s\\n\", (int)(p->pid), getstr((char *)&(p->comm[0])));",
-+" * p = (struct task_struct *)((unsigned long)(p->tasks.next) - offset);",
-+" * } while(p != &init_task); ",
-+" * ",
-+" * return 0; ",
-+" * } ",
-+" * ",
-+" * crash> eppic program_file.c ",
-+" */ ",
-+};
-+
-+char *eppic_get_func_file(char *);
- /*
- This funciton is called to start a vi session on a function
- (file=0) or a file (file=1);
-@@ -800,24 +838,31 @@ char *ed=getenv("EDITOR");
- void
- eppic_vi(char *fname, int file)
- {
--int line, freeit=0;
-+int line=1, freeit=0, fd;
- char *filename;
-+char newline = '\n';
-
- if(file) {
-
- filename=eppic_filempath(fname);
-
- if(!filename) {
--
-- eppic_msg("File not found : %s\n", fname);
-- return;
--
-- }
--
-- line=1;
-- freeit=1;
--
--
-+ fd = open(fname, O_WRONLY | O_CREAT | O_TRUNC, 0644);
-+ if (fd < 0) {
-+ eppic_msg("File not found : %s\n", fname);
-+ return;
-+ } else {
-+ for (int i = 0; i < sizeof(example)/sizeof(char *); i++) {
-+ write(fd, example[i], strlen(example[i]));
-+ write(fd, &newline, sizeof(newline));
-+ }
-+ close(fd);
-+ filename = fname;
-+ freeit=0;
-+ }
-+ } else {
-+ freeit=1;
-+ }
- } else {
-
- func *f=eppic_getfbyname(fname, 0);
-@@ -837,6 +882,10 @@ char *filename;
-
- eppic_exevi(filename, line);
-
-+ char *fi_name = eppic_get_func_file("main");
-+ if (fi_name)
-+ eppic_deletefile(fi_name);
-+
- if(freeit) eppic_free(filename);
-
- }
-@@ -1184,3 +1233,10 @@ eppic_runcmd(char *fname, var_t*args)
- return 0;
- }
-
-+char *eppic_get_func_file(char *funcname)
-+{
-+ func *fn = eppic_getfbyname(funcname, 0);
-+ if (!fn)
-+ return NULL;
-+ return fn->file->fname;
-+}
--
2.47.0
1 month, 3 weeks
Fresh Nursing Dissertation Topics to Explore in 2025
by kocac93560@etramay.com
Looking for ideas for your dissertation? Nursing is full of meaningful, real-world topics that can make a difference. You could explore patient safety, nurse burnout, digital health tools, or how leadership affects outcomes in hospitals. Even topics around ethics, end-of-life care, or mental health support for nurses are hugely relevant right now.
You can also think about the education side — simulation training, telehealth practices, or strategies for improving cultural competence in care. The best Nursing Dissertation Topics are the ones that connect with what you actually care about, because that curiosity is what makes research impactful and engaging. Know more: https://thedissertationhelp.co.uk/nursing-dissertation-topics/
1 month, 3 weeks
Fresh Nursing Dissertation Topics to Explore in 2025
by kocac93560@etramay.com
Looking for ideas for your dissertation? Nursing is full of meaningful, real-world topics that can make a difference. You could explore patient safety, nurse burnout, digital health tools, or how leadership affects outcomes in hospitals. Even topics around ethics, end-of-life care, or mental health support for nurses are hugely relevant right now.
You can also think about the education side — simulation training, telehealth practices, or strategies for improving cultural competence in care. The best Nursing Dissertation Topics are the ones that connect with what you actually care about, because that curiosity is what makes research impactful and engaging. Know more: https://thedissertationhelp.co.uk/nursing-dissertation-topics/
1 month, 3 weeks
[PATCH v2 0/2] Add basic 'bt -e' support for
by Mikhail Zaslonko
Expand s390x 'bt' output.
Add basic 'bt -e' support for s390x.
Mikhail Zaslonko (2):
s390x: Expand bt output with PSW mode and pt_regs address
s390x: Add basic 'bt -e' support for s390x
s390x.c | 44 ++++++++++++++++++++++++++++++++------------
1 file changed, 32 insertions(+), 12 deletions(-)
--
2.49.0
1 month, 3 weeks
REMINDER: *DO NOT* send the advertising messages to crash-utility mail list
by lijiang
Dear All,
Recently we have received a large number of advertising messages on this
crash-utility mailing list,
which has caused confusion among members. To maintain a clear and efficient
communication
environment, we kindly request that you *DO NOT* send any content unrelated
to crash-utility
debugging to this list.
Because the irrelevant messages not only create confusion but also make
everyone overlook important
information and disrupt in-depth discussions on debugging topics. Let's
work together to keep the mail
list focused on sharing knowledge, solving problems, and exchanging
experiences related to crash-utility
debugging.
Thank you for your understanding and cooperation.
Lianbo
1 month, 3 weeks
How I Managed My Busy Uni Life Without Falling Behind
by kennamorgan35@gmail.com
Hey everyone! Last semester, I found myself completely swamped between part-time work and group projects; I barely had time for my algebra class. I kept falling behind on assignments and felt stressed every day. That’s when a friend suggested I check out Take My Class Online. Honestly, I was skeptical at first, but they offered to take my online algebra class and help me catch up. I decided to give it a try, and it was a total lifesaver. Not only did I manage to stay on top of lectures, but I also learned key concepts without the usual stress. Thanks to them, I could focus on my other courses and personal life while staying on track in algebra. If anyone is struggling to balance university and personal commitments, I highly recommend checking out Take My Class Online.
https://takemyclassonline.us.com/take-my-online-algebra-class/
1 month, 3 weeks
How I Managed My Busy Uni Life Without Falling Behind
by kennamorgan35@gmail.com
Hey everyone! Last semester, I found myself completely swamped between part-time work and group projects; I barely had time for my algebra class. I kept falling behind on assignments and felt stressed every day. That’s when a friend suggested I check out Take My Class Online. Honestly, I was skeptical at first, but they offered to <a href="https://takemyclassonline.us.com/take-my-online-algebra-class/">take my online algebra class</a> and help me catch up. I decided to give it a try, and it was a total lifesaver. Not only did I manage to stay on top of lectures, but I also learned key concepts without the usual stress. Thanks to them, I could focus on my other courses and personal life while staying on track in algebra. If anyone is struggling to balance university and personal commitments, I highly recommend checking out Take My Class Online.
1 month, 3 weeks
Best Marketing Research Paper Topics for 2025
by yejower317@fergetic.com
Lately, I’ve been diving deep into some marketing research paper topics, and wow — there’s so much happening in this space! From the way AI is reshaping predictive marketing to how Gen Z connects more with influencers than traditional ads, the marketing world is evolving faster than ever. I’ve also been really curious about how sustainability and green branding are no longer just buzzwords but core parts of modern marketing strategies.
Another area that caught my attention is consumer psychology in the digital age — how small changes in algorithms or design can totally shift buyer behavior. If I were to pick a dissertation focus, I’d probably explore the mix of neuromarketing, data ethics, and brand trust — because understanding how people think, feel, and act is where great marketing really begins. Know more https://thedissertationhelp.co.uk/marketing-research-paper-topics/:
1 month, 3 weeks