qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-discuss] Debugging linux modules with gdb under qemu


From: sdrb
Subject: [Qemu-discuss] Debugging linux modules with gdb under qemu
Date: Sun, 21 Aug 2016 08:30:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hello everyone,

I need to debug Linux modules for ARM architecture.
I've compiled Yocto Linux distribution and run it under qemu.
Qemu is run with "-s" option so I can connect with gdb to qemu.

Here is what I'm trying to do:
Under Yocto Linux I'm loading bonding module:

# insmod bonding.ko

Then I run gdb and type following commands:

file vmlinux
target remote 0:1234
add-symbol-file bonding.ko 0xbf000000 -s .bss 0xbf016420 -s .data 0xbf015e58 -s .gnu.linkonce.this_module 0xbf016240


From gdb I'm trying to access some area of memory:

(gdb) p modules
$24 = {next = 0xbf016244, prev = 0xbf016244}
(gdb) x/x 0xbf016244
0xbf016244: Cannot access memory at address 0xbf016244

but I got error that this memory address is not accessible.

My question is - why I got this error? Is that mean that the memory region 0xbf016244 is not readable?

How can I make it accessible? By changing Linux kernel somehow or is it possible from the gdb or qemu point of view?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]