본문 바로가기

유용한 디버깅 팁

(23)
[crash-utility] crash-utilty 실행 시 디버깅 옵션(-d 6) 디버깅 옵션(-d 6)을 적용해 crash-utilty를 실행하면 vmcore를 로딩하면서 다양한 디버깅 정보를 출력합니다. $ ./crash vmcore vmlinux -d 6 crash 7.3.0++ Copyright (C) 2002-2021 Red Hat, Inc. Copyright (C) 2004, 2005, 2006, 2010 IBM Corporation Copyright (C) 1999-2006 Hewlett-Packard Co Copyright (C) 2005, 2006, 2011, 2012 Fujitsu Limited Copyright (C) 2006, 2007 VA Linux Systems Japan K.K. Copyright (C) 2005, 2011, 2020-2021 NEC Corp..
[T32] 현재 레지스터 정보를 cmm 포멧으로 저장하기 - Linux kernel ;**************************************************************************** ;** save_current_registers.cmm ;** This script is designed to save current a set of registers. ;** ;** ;** ;** when who what, where, why ;** -------------- ------------ ------------------------------------------------------ ;** 04/21/2018 austindh.kim@gmail.com First version ;*******************************************..
[Linux][Kernel][Debug] T32 - container_of 매크로 리눅스 커널 코드를 분석하다 보면 아래 container_of 매크로를 자주 볼수 있어요. void t21142_media_task(struct work_struct *work) { struct tulip_private *tp = container_of(work, struct tulip_private, media_work); struct net_device *dev = tp->dev; 그럼 T32으로 코어 덤프를 분석 할 때 위 매크로를 그대로 가져다 쓸 수 있는 방법을 소개하고자 합니다. 아주 간단해요. T32로 아래 명령어를 치면 되죠. sYmbol.NEW.MACRO offsetof(type,member) ((int)(&((type*)0)->member)) sYmbol.NEW.MACRO contain..
[TRACE32] 폰트(FONT) 사이트 변경 아래와 같이 t32 파일을 수정하면 폰트 사이즈를 LARGE로 변경할 수 있습니다. index d07418b..db9c6c9 100644 --- a/config-sim.t32 +++ b/config-sim.t32 @@ -16,7 +16,7 @@ ID=T32 SYS=${2} ; make system directory the same as the executable directory SCREEN= -FONT=SMALL +FONT=LARGE HEADER=iTSP - HANCOM MDS GUI ${4} ; Ethernet on Host information @@ -26,4 +26,4 @@ CORE=${4} ; CORE=1 indicates the primary core that has the trace wind..
유용한 TRACE32(T32) 명령어 1. linked list를 표현하고자 할 경우 아래와 같은 명령어를 입력하면 dcc_tcb의 linked list를 표현한다. v.chain %l %m %all dcc_tcb dcc_tcb.link.next_ptr 2. 특정 변수의 데이터를 dump하고 싶은 경우 var.dump %BIN err_f3_trace_buffer /orient 3. 소스 코드의 패스를 지정 y.spath.srd "Y:\f3_main_src\non_HLOS\modem_proc" 4. 소스 코드에서 스트링을 검색 data.grep "err_init" err.c 4.1 모든 소스에서 아래 스트링을 검색 data.grep "err_f3_trace_buffer" 5. 현재 심볼의 상태(소스 수, 라인 수)를 표현 -------- go..
[라즈베리파이] crash-utility 설치(Arm64) 소스 내려 받기 $ git clone https://github.com/crash-utility/crash.git 빌드 시작 $ make target=ARM64 빌드 도중 아래 에러 발생 checking for zlib.h... yes checking for library containing dlgetmodinfo... no checking for iconv... yes checking for iconv declaration... install-shextern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); checking for library containing wadds..
[Trace32] 폰트 색상 변경 - setup.color config.t32 파일에 다음 명령어를 입력하면 Trace32 폰트 색상이 바뀝니다. PALETTE 0 = 56 56 56 PALETTE 1 = 221 221 221 PALETTE 4 = 128 0 255 PALETTE 11 = 255 0 0 PALETTE 18 = 255 128 64 PALETTE 27 = 255 128 64 PALETTE 48 = 128 128 0 PALETTE 50 = 255 128 64. Trace32를 열고 setup.color을 입력해서 폰트나 텍스트 상자 색상을 바꿀 수도 있습니다. cmm 스크립트로는 다음과 같은 명령어를 입력하면 됩니다. //PALETTE 0 = 56 56 56 SETUP.COLOR 0. 56. 56. 56. //PALETTE 1 = 221 221 221..