T32 (2) 썸네일형 리스트형 [LinuxKernel] Trace32(T32) How to use offsetof/container_of macro? OverviewWhen debugging ramdump with stability issues, I have been spending most of time casting various data structure as belows.v.v %s (struct task_struct*)0xC1917FCCFor this matter, I made several macros to minimize the debugging time.The definition of the macro is below.sYmbol.NEW.MACRO offsetof(type,member) ((int)(&((type*)0)->member))sYmbol.NEW.MACRO container_of(ptr,type,member) ((type *)(.. [리눅스커널][Trace32] T32로 wakelock 디버깅 - container_of 함수 분석 임베디드 개발에서 T32-Trace32 장비를 많이 써서 소스 코드 디버깅을 합니다. 이번 시간에는 리눅스 커널에서 웨이크락(wake lock)을 잡는 모듈이 누구인지 파악하는 디버깅(Debugging) 방법을 소개합니다. 리눅스 커널는 wakeup_sources이란 연결 리스트를 통해 wakelock 정보를 확인할 수 있습니다. 리눅스 커널 개발자 중에 crash-utility을 잘 쓰는 분이 있습니다.하지만 임베디드 개발에선 Trace32도 더 많이 활용하는 것 같습니다.개발자는 다양한 툴을 써야 한 가지 툴에 종속된 노예 개발자가 되는 것을 피할 수 있습니다.또한 각 툴의 장점을 잘 활용할 수도 있습니다. 먼저, 다음 T32 명령어를 입력해서 offsetof와 container_of 매크로를 생성합.. 이전 1 다음