----- Original Message ----- > Hello Lei, > > Thanks for making patch. I'll check your patch this week, but I have > two things to ask you. > > 1. I don't know arm architecture at all and I don't have arm > machine. What I can do is only testing common part and regression test > on x86 architecture. Please maintain arm part yourself. > > 2. Could you tell me specific kernel versions you have tested this > patch in? I myself have yet to do this, but now I think it necessary > to make such a list. I imagine just like makedumpfile's SUPPORTED > KERNELS described in its README. I'll put them in gcore's README and > then ask Dave to add them into description in distribution page. Hello Daisuke, Please also note that I have changed the downloadable file on the crash extension modules web page to crash-gcore-command-1.0.tar.gz from the older gcore.tar.bz2. Keeping a versioned package will make our maintenance chores a bit easier. Also, when the package is compiled from within an rpmbuild framework using $(RPM_OPT_FLAGS), the gcore_get_regs_from_bt_output() function generates a compiler warning. I've attached a patch for that. Thanks, Dave > HATAYAMA, Daisuke > > From: Lei Wen <adrian.wenl@xxxxxxxxx> > Subject: [PATCH] add arm support for libgcore > Date: Mon, 13 Feb 2012 09:32:34 +0800 > > > Hi, > > > > Current the crash utility has the support for extracting core dump > > image from original kdump file: > > http://people.redhat.com/anderson/extensions/gcore_help_gcore.html > > > > But it only supports x86 and x86_64 now. > > I add one supporting patch to port it to ARM and another fix a minor > > bug in original implementation. > > > > Best regards, > > Lei
--- crash-gcore-command-1.0/gcore.mk.orig +++ crash-gcore-command-1.0/gcore.mk @@ -66,11 +66,11 @@ gcore.so: gcore.c $(INCDIR)/defs.h echo "gcore: architecture not supported"; \ else \ make -f gcore.mk $(GCORE_OFILES) && \ - gcc $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) -nostartfiles -shared -rdynamic $(GCORE_OFILES) -o $@ $< ; \ + gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) -nostartfiles -shared -rdynamic $(GCORE_OFILES) -o $@ $< ; \ fi; %.o: %.c $(INCDIR)/defs.h - gcc $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) -c -o $@ $< + gcc $(RPM_OPT_FLAGS) $(CFLAGS) $(TARGET_CFLAGS) $(COMMON_CFLAGS) -c -o $@ $< clean: find ./libgcore -regex ".+\(o\|so\)" -exec rm -f {} \; --- crash-gcore-command-1.0/libgcore/gcore_x86.c.orig +++ crash-gcore-command-1.0/libgcore/gcore_x86.c @@ -1434,23 +1434,24 @@ static int gcore_get_regs_from_bt_output(FILE *output, struct user_regs_struct *regs) { char buf[BUFSIZE]; + int items __attribute__ ((__unused__)); if (gcore_find_regs_from_bt_output(output, buf, BUFSIZE) == FALSE) return FALSE; - sscanf(buf, " RIP: %016lx RSP: %016lx RFLAGS: %08lx\n", + items = sscanf(buf, " RIP: %016lx RSP: %016lx RFLAGS: %08lx\n", ®s->ip, ®s->sp, ®s->flags); - fscanf(output, " RAX: %016lx RBX: %016lx RCX: %016lx\n", + items = fscanf(output, " RAX: %016lx RBX: %016lx RCX: %016lx\n", ®s->ax, ®s->bx, ®s->cx); - fscanf(output, " RDX: %016lx RSI: %016lx RDI: %016lx\n", + items = fscanf(output, " RDX: %016lx RSI: %016lx RDI: %016lx\n", ®s->dx, ®s->si, ®s->di); - fscanf(output, " RBP: %016lx R8: %016lx R9: %016lx\n", + items = fscanf(output, " RBP: %016lx R8: %016lx R9: %016lx\n", ®s->bp, ®s->r8, ®s->r9); - fscanf(output, " R10: %016lx R11: %016lx R12: %016lx\n", + items = fscanf(output, " R10: %016lx R11: %016lx R12: %016lx\n", ®s->r10, ®s->r11, ®s->r12); - fscanf(output, " R13: %016lx R14: %016lx R15: %016lx\n", + items = fscanf(output, " R13: %016lx R14: %016lx R15: %016lx\n", ®s->r13, ®s->r14, ®s->r15); - fscanf(output, " ORIG_RAX: %016lx CS: %04lx SS: %04lx\n", + items = fscanf(output, " ORIG_RAX: %016lx CS: %04lx SS: %04lx\n", ®s->orig_ax, ®s->cs, ®s->ss); return TRUE;
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility