aarch64-elf-gdb Linux dump 反编译操作

dump

    1|console:/ $ [ 433.207304] kernel BUG at lib/genalloc.c:254!
[ 433.211712] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[ 433.217260] Modules linked in: xrp_hw_semidrive bcmdhd pvrsrvkm
[ 433.221966] sd,rpmsg-ipcc soc:ipcc@4: confirm link up
[ 433.223247] CPU: 1 PID: 72 Comm: rpmsg-stream-ma Tainted: G U 5.10.66-01980-gd20ef12da7eb-dirty #139
[ 433.238866] Hardware name: Semidrive thang X9SP AP1 MS Board (DT)
[ 433.245017] pstate: 80c00005 (Nzcv daif +PAN +UAO -TCO BTYPE=--)
[ 433.251084] pc : gen_pool_destroy+0xc0/0xc4
[ 433.255307] lr : gen_pool_destroy+0x7c/0xc4
[ 433.259528] sp : ffff80001271bd30
[ 433.262874] x29: ffff80001271bd30 x28: 0000000052504d34
[ 433.268236] x27: ffff0000e65bf4f8 x26: ffff0000e65bf010
[ 433.273598] x25: ffff0000e5b2d008 x24: dead000000000100
[ 433.278960] x23: 000000000000000c x22: ffff0000e5b2d008
[ 433.284323] x21: 0000000000000400 x20: ffff80001205d000
[ 433.289684] x19: ffff0000e5b2d000 x18: 0000000000000000
[ 433.295046] x17: 000000119d429354 x16: 00000000fa83b2da
[ 433.300409] x15: 0000000000000238 x14: ffff800010feb358
[ 433.305771] x13: 0000000000030778 x12: 0000000000000001
[ 433.311133] x11: ffff0001f9720090 x10: dead000000000122
[ 433.316496] x9 : 0000000000000000 x8 : 0000000000000000
[ 433.321858] x7 : 0000000000000001 x6 : fffffdffbf92e110
[ 433.327219] x5 : ffff0001f9731ef0 x4 : 0000000000000001
[ 433.332582] x3 : 0000000000000000 x2 : 0000000000000000
[ 433.337944] x1 : 0000000000000000 x0 : 0000000000000000
[ 433.343308]
[ 433.343308] PC: 0xffff800010617b7c: 

aarch64-elf-gdb  vmlinux  命令导入

GNU gdb (Linaro_GDB-2018.05) 8.1.0.20180612-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-unknown-linux-gnu --target=aarch64-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from vmlinux...done.
(gdb)  p &gen_pool_destroy
$1 = (void (*)(struct gen_pool *)) 0xffff800010617b3c <gen_pool_destroy>
(gdb) l *0xffffffc000234620
(gdb)
(gdb) l *0xffffffc000234620l *0xffffffc000234620^CQuit
(gdb)
(gdb) p &rpmsg_stream_main_thread
$2 = (int (*)(void *)) 0xffff800010b912dc <rpmsg_stream_main_thread>
(gdb) l * 0xffff800010b912dc+0x438
0xffff800010b91714 is in rpmsg_stream_main_thread (/kernel/drivers/rpmsg/sdrv_rpmsg_stream.c:1221).
warning: Source file is more recent than executable.
1216            /* no user now, we can discard everything */
1217            if (rs->pool) {
1218                    gen_pool_free(rs->pool, (unsigned long)addr,
1219                                  desc->cnt << rs->size_order);
1220                    gen_pool_destroy(rs->pool);
1221                    rs->pool = NULL;
1222            }
1223
1224            /* free shm in case buffer size or count may change */
1225            rpmsg_stream_free_buffer_shm(rs);
(gdb)
1226
1227            /* clear stat */
1228            rs->tx_wait_us = 0;
1229
1230            /* debug override */
1231            if (rs->buf_size_override >= CONFIG_RS_ALIGN &&
1232                is_power_of_2(rs->buf_size_override)) {
1233                    rs->buf_size = rs->buf_size_override;
1234                    dev_warn(dev, "override buffer size to %u\n", rs->buf_size);
1235            }
(gdb) p &gen_pool_destroy
$3 = (void (*)(struct gen_pool *)) 0xffff800010617b3c <gen_pool_destroy>
(gdb) l *  0xffff800010617b3c +0xc0
0xffff800010617bfc is in gen_pool_destroy (/android12/kernel/lib/genalloc.c:254).
249                     chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk);
250                     list_del(&chunk->next_chunk);
251
252                     end_bit = chunk_size(chunk) >> order;
253                     bit = find_next_bit(chunk->bits, end_bit, 0);
254                     BUG_ON(bit < end_bit);
255
256                     vfree(chunk);
257             }
258             kfree_const(pool->name);
(gdb)
259             kfree(pool);
260     }
261     EXPORT_SYMBOL(gen_pool_destroy);
262
263     /**
264      * gen_pool_alloc_algo_owner - allocate special memory from the pool
265      * @pool: pool to allocate from
266      * @size: number of bytes to allocate from the pool
267      * @algo: algorithm passed from caller
268      * @data: data passed to algorithm
(gdb) l * 0xffff80001271bcb0
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值