[Crash-utility][PATCH 1/8] Add RISCV64 framework code support
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Thu Jul 21 01:57:10 PDT 2022
On 7/21/22 10:17, HAGIO KAZUHITO(萩尾 一仁) wrote:
> On 2022/07/18 11:53, Xianting Tian wrote:
>> This patch mainly added some environment configurations, macro definitions,
>> specific architecture structures and some function declarations supported
>> by the RISCV64 architecture.
>>
>> We can use the build command to get the simplest version crash tool:
>> make target=RISCV64 -j2
>>
>> Signed-off-by: Xianting Tian <xianting.tian at linux.alibaba.com>
>> ---
>> Makefile | 7 +-
>> README | 2 +-
>> configure.c | 39 ++++++++++-
>> defs.h | 155 +++++++++++++++++++++++++++++++++++++++++++-
>> diskdump.c | 11 +++-
>> help.c | 2 +-
>> lkcd_vmdump_v2_v3.h | 2 +-
>> netdump.c | 9 ++-
>> ramdump.c | 2 +
>> riscv64.c | 56 ++++++++++++++++
>> symbols.c | 10 +++
>> 11 files changed, 285 insertions(+), 10 deletions(-)
>> create mode 100644 riscv64.c
>>
>> diff --git a/Makefile b/Makefile
>> index 162c2ba..54ebb43 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -64,7 +64,7 @@ CFILES=main.c tools.c global_data.c memory.c filesys.c help.c task.c \
>> kernel.c test.c gdb_interface.c configure.c net.c dev.c bpf.c \
>> printk.c \
>> alpha.c x86.c ppc.c ia64.c s390.c s390x.c s390dbf.c ppc64.c x86_64.c \
>> - arm.c arm64.c mips.c mips64.c sparc64.c \
>> + arm.c arm64.c mips.c mips64.c riscv64.c sparc64.c \
>> extensions.c remote.c va_server.c va_server_v1.c symbols.c cmdline.c \
>> lkcd_common.c lkcd_v1.c lkcd_v2_v3.c lkcd_v5.c lkcd_v7.c lkcd_v8.c\
>> lkcd_fix_mem.c s390_dump.c lkcd_x86_trace.c \
>> @@ -84,7 +84,7 @@ OBJECT_FILES=main.o tools.o global_data.o memory.o filesys.o help.o task.o \
>> build_data.o kernel.o test.o gdb_interface.o net.o dev.o bpf.o \
>> printk.o \
>> alpha.o x86.o ppc.o ia64.o s390.o s390x.o s390dbf.o ppc64.o x86_64.o \
>> - arm.o arm64.o mips.o mips64.o sparc64.o \
>> + arm.o arm64.o mips.o mips64.o riscv64.o sparc64.o \
>> extensions.o remote.o va_server.o va_server_v1.o symbols.o cmdline.o \
>> lkcd_common.o lkcd_v1.o lkcd_v2_v3.o lkcd_v5.o lkcd_v7.o lkcd_v8.o \
>> lkcd_fix_mem.o s390_dump.o netdump.o diskdump.o makedumpfile.o xendump.o \
>> @@ -438,6 +438,9 @@ mips.o: ${GENERIC_HFILES} ${REDHAT_HFILES} mips.c
>> mips64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} mips64.c
>> ${CC} -c ${CRASH_CFLAGS} mips64.c ${WARNING_OPTIONS} ${WARNING_ERROR}
>>
>> +riscv64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} riscv64.c
>> + ${CC} -c ${CRASH_CFLAGS} riscv64.c ${WARNING_OPTIONS} ${WARNING_ERROR}
>> +
>> sparc64.o: ${GENERIC_HFILES} ${REDHAT_HFILES} sparc64.c
>> ${CC} -c ${CRASH_CFLAGS} sparc64.c ${WARNING_OPTIONS} ${WARNING_ERROR}
>>
>> diff --git a/README b/README
>> index 5abbce1..5ac5b60 100644
>> --- a/README
>> +++ b/README
>> @@ -37,7 +37,7 @@
>> These are the current prerequisites:
>>
>> o At this point, x86, ia64, x86_64, ppc64, ppc, arm, arm64, alpha, mips,
>> - mips64, s390 and s390x-based kernels are supported. Other architectures
>> + mips64, riscv64, s390 and s390x-based kernels are supported. Other architectures
>> may be addressed in the future.
>>
>> o One size fits all -- the utility can be run on any Linux kernel version
>
> For README, please append a description of x86_64 binary for riscv64
> dumpfiles here:
> ---
> o On an x86_64 host, an x86_64 binary that can be used to analyze
> ppc64le dumpfiles may be built by typing "make target=PPC64".
Shouldn't debugging of a riscv64 crash binary also be possible on riscv64?
Best regards
Heinrich
More information about the linux-riscv
mailing list