유용한 디버깅 팁 (23) 썸네일형 리스트형 [Linux kernel] vmcore enabled kernel configuration We need to turn on the following kernel configs: +CONFIG_CRASH_DUMP=y +CONFIG_KEXEC=y +CONFIG_KEXEC_FILE=y +CONFIG_DEBUG_INFO=y 08/23/2024 [crash-utility] How to pull and build crash-utility with ARM64 option 1. Please install utility to run crash-utility $ sudo apt-get install texinfo git build-essential bison zlib1g-dev libncurses5-dev libncursesw5-dev pkg-config flex swig -y 2. Pull crash-utility source code with below command. $ git clone https://github.com/crash-utility/crash.git3. Build crash-utility Source code $ cd crash $ make target=ARM64 -j3 (Warninig) You may see error messages compil.. [Install] crash utility with Aarch32 for troubleshooting When compiling crash utility in the Raspbian with Aarch32, do not use 'j' option like (make -j5). apt update apt-get install git build-essential bison zlib1g-dev libncurses5-dev libncursesw5-dev pkg-config flex swig -y apt-get install -y texinfo cd crash make target=ARM [Debugging] crash-utility (11/10/2023) # good command to start 'crash utility' 1. 1st verified command ./crash dump1@0x80000000,dump2@0x880000000 -p 4096 -m vabits_actual=39 -m kimage_voffset=0xffffffbf70000000 --no_panic --smp $1 2. Under progress ./crash1 -d -6 SYS_COREDUMP -m --kaslr=0x1d43c00000 -m vabits_actual=39 -m kimage_voffset=0xffffffa611c00000 -m --smp vmlinux diff --git a/arm64.c b/arm64.c index bdb2a0a..7c3a8ea 100644 -.. [T32] gitlab link for 'awesome-trace32' gitlab link for 'awesome-trace32' https://gitlab.com/lauterbach/awesome-trace32 do_save_current_register_arm64.cmm ;**************************************************************************** ;** do_save_current_register_arm64.cmm ;** This script is designed to save current a set of registers(Arm64). ;** ;** ;** ;** when who what, where, why ;** -------------- ------------ ------------------------------------------------------ ;** 07/12/2023 austindh.kim@gmail.com First version ;****************************.. [crash-utility] 컴파일 에러: curses.h: No such file or directory! 'crash-utility' 소스를 빌드하면 아래와 같은 에러를 만난다. gcc -c -g -DARM -D_FILE_OFFSET_BITS=64 -DGDB_10_2 -g -O2 build_data.c gcc -c -g -DARM -D_FILE_OFFSET_BITS=64 -DGDB_10_2 -g -O2 main.c main.c:20:10: fatal error: curses.h: No such file or directory #include ^~~~~~~~~~ compilation terminated. make[5]: *** [Makefile:336: main.o] Error 1 curses 라이브러리가 설치되지 않았을 때 이런 에러가 발생한다. 다음 커맨드를 사.. [리눅스커널][디버깅] Red Hat Crash-Utility(크래시 유틸리티) 설치! 리눅스 커널 동네에서 전 세계적으로 쓰고 있는 디버깅 툴을 소개하고자 합니다. https://people.redhat.com/anderson/ 레드헷의 앤더슨이란 형님이 만든 오픈 소스로 배포한 리눅스 크래시(커널 패닉)을 분석할 수 있는 툴인데요, 리눅스 커널 커뮤니티에서도 이 툴을 활발히 쓰고 있죠. 소스를 좀 받아 볼까요? 리눅스 머신에서 아래 커맨드로 소스를 땡겨옵니다. git clone https://github.com/crash-utility/crash.git 소스를 받고 나서 아래 명령어로 빌드를 해요. ARM machine인 경우 make target=ARM make target=ARM extensions X86인 경우 make target=X86_64 make target=X86_64 e.. 이전 1 2 3 다음