Linux kernel live debugging, how it's done and what tools are used? -


what common , why not uncommon methods , tools used live debugging on linux kernel? know linus eg. against kind of debugging linux kernel or least , nothing has been done in sense in years, lot of time has passed since 2000 , interested if mentality has changed regarding linux project , current methods used live debugging on linux kernel @ moment(either local or remote)?

references walkthroughs , tutorials on mentioned techniques , tools welcome.

another option use ice/jtag controler, , gdb. 'hardware' solution used embedded systems,

but instance qemu offers similar features:

  • start qemu gdb 'remote' stub listens on 'localhost:1234' : qemu -s ...,

  • then gdb open kernel file vmlinux compiled debug informations (you can take this mailing list thread discuss unoptimization of kernel).

  • connect gdb , qemu: target remote localhost:1234

  • see you're live kernel:

    (gdb) #0  cpu_v7_do_idle () @ arch/arm/mm/proc-v7.s:77 #1  0xc0029728 in arch_idle () atarm/mach-realview/include/mach/system.h:36 #2  default_idle () @ arm/kernel/process.c:166 #3  0xc00298a8 in cpu_idle () @ arch/arm/kernel/process.c:199 #4  0xc00089c0 in start_kernel () @ init/main.c:713 

unfortunately, user-space debugging not possible far gdb (no task list information, no mmu reprogramming see different process contexts, ...), if stay in kernel-space, that's quite conveniant.

  • info threads give list , states of different cpus

edit:

you can more details procedure in pdf:

debugging linux systems using gdb , qemu.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -