* Xen domU module debugging using GDBSX
@ 2014-04-21 2:29 고영근
2014-04-22 18:30 ` Mukesh Rathor
0 siblings, 1 reply; 4+ messages in thread
From: 고영근 @ 2014-04-21 2:29 UTC (permalink / raw)
To: mukesh.rathor, xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 853 bytes --]
Hi.
I've tried to use the GDBSX for debugging a domU module, but there is a
problem loading module symbols.
I'm using
xen : 4.2
dom0 : fedora core 14 (linux kernel 2.6.32.57)
domU : ubuntu 10.04 (linux kernel 2.6.37.1)
This is what I've done
1. I created a PV domU.
2. On dom0 command line, I wrote "gdbsx -a 1 64 9999"
3. Using gdb, I connected to the gdbsx from dom0
dom0 > gdb vmlinux
gdb > target remote localhost:9999
4. In the domU, insmod mymodule.ko
5. On dom0 gdb, I added mymodule.ko using add-symbol-file command with
text, bss, data, rodata address found in the directory
/sys/module/mymodule/sections
After these steps, I could break 'some' functions like cleanup_module().
And I think it works well. But some functions are not working and most of
all, i can't see the codes. How can I add remote directories dynamically
using GDBSX?
[-- Attachment #1.2: Type: text/html, Size: 1155 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xen domU module debugging using GDBSX
2014-04-21 2:29 Xen domU module debugging using GDBSX 고영근
@ 2014-04-22 18:30 ` Mukesh Rathor
2014-05-19 7:40 ` 고영근
0 siblings, 1 reply; 4+ messages in thread
From: Mukesh Rathor @ 2014-04-22 18:30 UTC (permalink / raw)
To: 고영근; +Cc: xen-devel
On Mon, 21 Apr 2014 11:29:40 +0900
고영근 <kllaf28@gmail.com> wrote:
> Hi.
>
> I've tried to use the GDBSX for debugging a domU module, but there is
> a problem loading module symbols.
>
> I'm using
> xen : 4.2
> dom0 : fedora core 14 (linux kernel 2.6.32.57)
> domU : ubuntu 10.04 (linux kernel 2.6.37.1)
>
> This is what I've done
> 1. I created a PV domU.
> 2. On dom0 command line, I wrote "gdbsx -a 1 64 9999"
> 3. Using gdb, I connected to the gdbsx from dom0
> dom0 > gdb vmlinux
> gdb > target remote localhost:9999
>
> 4. In the domU, insmod mymodule.ko
>
> 5. On dom0 gdb, I added mymodule.ko using add-symbol-file command with
> text, bss, data, rodata address found in the directory
> /sys/module/mymodule/sections
>
> After these steps, I could break 'some' functions like
> cleanup_module(). And I think it works well. But some functions are
> not working and most of all, i can't see the codes. How can I add
> remote directories dynamically using GDBSX?
Could the functions be inlined? Have you tried adding "noinline" to
function declaration? I assume you are referring to functions in the
kernel and not loaded modules.
Mukesh
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xen domU module debugging using GDBSX
2014-04-22 18:30 ` Mukesh Rathor
@ 2014-05-19 7:40 ` 고영근
2014-05-19 19:17 ` Mukesh Rathor
0 siblings, 1 reply; 4+ messages in thread
From: 고영근 @ 2014-05-19 7:40 UTC (permalink / raw)
To: Mukesh Rathor; +Cc: xen-devel
[-- Attachment #1.1: Type: text/plain, Size: 257 bytes --]
I think the module symbols are not properly inserted although I added the
module.ko file using add-symbol-file command.
Can you explain the way to debug domU module in detail? The readMe file is
not sufficient. Any other references might be good too
[-- Attachment #1.2: Type: text/html, Size: 323 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Xen domU module debugging using GDBSX
2014-05-19 7:40 ` 고영근
@ 2014-05-19 19:17 ` Mukesh Rathor
0 siblings, 0 replies; 4+ messages in thread
From: Mukesh Rathor @ 2014-05-19 19:17 UTC (permalink / raw)
To: 고영근; +Cc: xen-devel
On Mon, 19 May 2014 16:40:59 +0900
고영근 <ykGo@os.korea.ac.kr> wrote:
> I think the module symbols are not properly inserted although I added
> the module.ko file using add-symbol-file command.
> Can you explain the way to debug domU module in detail? The readMe
> file is not sufficient. Any other references might be good too
gdbsx is the backend to gdb. The issues are on gdb front end. Most likely
you just need to clean the entire tree and rebuild, as addresses are not
matching. You can just build in the module too and not have to deal
with loading symbols then.
Mukesh
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-19 19:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-21 2:29 Xen domU module debugging using GDBSX 고영근
2014-04-22 18:30 ` Mukesh Rathor
2014-05-19 7:40 ` 고영근
2014-05-19 19:17 ` Mukesh Rathor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).