源码堆栈信息保存 到此一游

kernel_thread

到此一游
内存初始化

#0 page_address_init () at mm/highmem.c:419
#1 0xc0bcd4d1 in start_kernel () at init/main.c:497
#2 0xc0bcd0a9 in i386_start_kernel () at arch/x86/kernel/head32.c:68
#3 0x00000000 in ?? ()

(gdb) pt page_address_maps
type = struct page_address_map {
struct page *page;
void *virtual;
struct list_head list;
} [1024]
(gdb) pt *(page_address_maps.page)
Type struct page_address_map [1024] is not a structure or union type.
(gdb) p page_address_maps->page
$2 = (struct page *) 0x0
(gdb) p *(page_address_maps->page)
$3 = {flags = 4026597203, mapping = 0xf000ff53, {{index = 4026589891, freelist = 0xf000e2c3}, {counters = 4026597203, {{_mapcount = {counter = -268370093}, {inuse = 65363,
objects = 28672, frozen = 1}}, _count = {counter = -268370093}}}}, {lru = {next = 0xf000ff53, prev = 0xf000ff53}, {next = 0xf000ff53, pages = -173,
pobjects = -4096}}, {private = 4026597203, ptl = {{rlock = {raw_lock = {{head_tail = 65363, tickets = {head = 83 'S', tail = 255 '377'}}}}}}, slab = 0xf000ff53,
first_page = 0xf000ff53}}
(gdb) p (*(page_address_maps->page)).slab
$4 = (struct kmem_cache *) 0xf000ff53
(gdb) p *((*(page_address_maps->page)).slab)

end
arch/x86/mm/init_32.c, line 372

 
start
#0 profile_init () at kernel/profile.c:106
#1 0xc0bcd64d in start_kernel () at init/main.c:558
#2 0xc0bcd0a9 in i386_start_kernel () at arch/x86/kernel/head32.c:68
#3 0x00000000 in ?? ()

(gdb) bt
#0 init () at drivers/char/virtio_console.c:1847
#1 0xc0401125 in do_one_initcall (fn=0xc0bfdd9c <init>) at init/main.c:688
#2 0xc0bcd841 in do_initcalls () at init/main.c:718
#3 do_basic_setup () at init/main.c:737
#4 kernel_init (unused=<optimized out>) at init/main.c:820
#5 0xc0947c3e in kernel_thread_helper () at arch/x86/kernel/entry_32.S:1010
#6 0x00000000 in ?? ()

原文地址:https://www.cnblogs.com/heling/p/3387943.html