crash icon indicating copy to clipboard operation
crash copied to clipboard

struct: invalid data structure reference: netmap_adapter

Open BBBc0927 opened this issue 2 years ago • 1 comments

Dear experts, I'm debugging an issue in Linux kernel module netmap using crash-arm64(7.2.9+). However, I failed to inspect the context of the struct netmap_adapter, the crash utility report this error: crash-arm64> struct netmap_adapter struct: invalid data structure reference: netmap_adapter

I tried to add that module's debug data: mod -s netmap netmap.ko. But It still failed with the same error. BTW, the module was built with CONFIG_KALLSYMS and with the -g CFLAG. +MY_CFLAGS += -g -DDEBUG +ccflags-y += ${MY_CFLAGS}

I raise this case to seek help on this issue, please kindly share your thoughts. Thanks!

BBBc0927 avatar Aug 31 '22 02:08 BBBc0927

crash's struct command is based on gdb's ptype command, what happens if you open the module with gdb? Does the module have its debuginfo certainly?

$ gdb netmap.ko
...
(gdb) ptype struct netmap_adapter

k-hagio avatar Sep 01 '22 05:09 k-hagio