* [Xenomai-core] Debugging Xenomai kernel
@ 2011-07-26 11:54 zenati
2011-07-27 9:23 ` Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: zenati @ 2011-07-26 11:54 UTC (permalink / raw)
To: Xenomai core
Dear,
I'm trying to debug Xenomai kernel with GDB and Qemu. So, I launch
Xenomai in Qemu and make it waiting for GDB. Then I start GDB and
connect them to Qemu, make breakpoint at the desired function to debug
and start Xenomai. If the function belongs to the linux kernel, the
execution stop at the breakpoint. But, if the function belongs to the
Xenomai nucleus, GDB recognize the breakpoint at the execution but don't
stop.
Is it possible to debug Xenomai with GDB and Qemu?
Is it the good way to debug?
Thank you for your attention and your help.
Sincerely,
Omar ZENATI
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Debugging Xenomai kernel
2011-07-26 11:54 [Xenomai-core] Debugging Xenomai kernel zenati
@ 2011-07-27 9:23 ` Jan Kiszka
2011-07-27 12:01 ` zenati
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2011-07-27 9:23 UTC (permalink / raw)
To: zenati; +Cc: Xenomai core
On 2011-07-26 13:54, zenati wrote:
> Dear,
>
> I'm trying to debug Xenomai kernel with GDB and Qemu.
QEMU in emulation or KVM mode?
> So, I launch
> Xenomai in Qemu and make it waiting for GDB. Then I start GDB and
> connect them to Qemu, make breakpoint at the desired function to debug
> and start Xenomai. If the function belongs to the linux kernel, the
> execution stop at the breakpoint. But, if the function belongs to the
> Xenomai nucleus, GDB recognize the breakpoint at the execution but don't
> stop.
Is Xenomai built as module or part of the main kernel image? The latter
is simpler to handle as you don't have to deal with modules as symbol
sources, find out their addresses, and load them at the right location.
>
> Is it possible to debug Xenomai with GDB and Qemu?
Definitely.
> Is it the good way to debug?
>
> Thank you for your attention and your help.
> Sincerely,
>
> Omar ZENATI
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Debugging Xenomai kernel
2011-07-27 9:23 ` Jan Kiszka
@ 2011-07-27 12:01 ` zenati
2011-07-27 12:12 ` Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: zenati @ 2011-07-27 12:01 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai core
On 07/27/2011 11:23 AM, Jan Kiszka wrote:
> On 2011-07-26 13:54, zenati wrote:
>> Dear,
>>
>> I'm trying to debug Xenomai kernel with GDB and Qemu.
> QEMU in emulation or KVM mode?
>
I'm using Qemu in emulation mode.
>> So, I launch
>> Xenomai in Qemu and make it waiting for GDB. Then I start GDB and
>> connect them to Qemu, make breakpoint at the desired function to debug
>> and start Xenomai. If the function belongs to the linux kernel, the
>> execution stop at the breakpoint. But, if the function belongs to the
>> Xenomai nucleus, GDB recognize the breakpoint at the execution but don't
>> stop.
> Is Xenomai built as module or part of the main kernel image? The latter
> is simpler to handle as you don't have to deal with modules as symbol
> sources, find out their addresses, and load them at the right location.
>
Xenomai is built as a part of the main kernel.
>> Is it possible to debug Xenomai with GDB and Qemu?
> Definitely.
>
>> Is it the good way to debug?
>>
>> Thank you for your attention and your help.
>> Sincerely,
>>
>> Omar ZENATI
> Jan
>
Omar ZENATI
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Debugging Xenomai kernel
2011-07-27 12:01 ` zenati
@ 2011-07-27 12:12 ` Jan Kiszka
2011-07-27 16:13 ` zenati
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2011-07-27 12:12 UTC (permalink / raw)
To: zenati; +Cc: Xenomai core
On 2011-07-27 14:01, zenati wrote:
> On 07/27/2011 11:23 AM, Jan Kiszka wrote:
>> On 2011-07-26 13:54, zenati wrote:
>>> Dear,
>>>
>>> I'm trying to debug Xenomai kernel with GDB and Qemu.
>> QEMU in emulation or KVM mode?
>>
> I'm using Qemu in emulation mode.
What's your target arch? x84-64, x86-32, or some ARM or PPC etc.?
>>> So, I launch
>>> Xenomai in Qemu and make it waiting for GDB. Then I start GDB and
>>> connect them to Qemu, make breakpoint at the desired function to debug
>>> and start Xenomai. If the function belongs to the linux kernel, the
>>> execution stop at the breakpoint. But, if the function belongs to the
>>> Xenomai nucleus, GDB recognize the breakpoint at the execution but don't
>>> stop.
>> Is Xenomai built as module or part of the main kernel image? The latter
>> is simpler to handle as you don't have to deal with modules as symbol
>> sources, find out their addresses, and load them at the right location.
>>
> Xenomai is built as a part of the main kernel.
OK. Check during runtime of the guest if the disassembly at the desired
breakpoint address matches the compiled code. Maybe there is some
accidental discrepancy.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Debugging Xenomai kernel
2011-07-27 12:12 ` Jan Kiszka
@ 2011-07-27 16:13 ` zenati
2011-07-27 16:16 ` Jan Kiszka
0 siblings, 1 reply; 7+ messages in thread
From: zenati @ 2011-07-27 16:13 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai core
On 07/27/2011 02:12 PM, Jan Kiszka wrote:
> On 2011-07-27 14:01, zenati wrote:
>> On 07/27/2011 11:23 AM, Jan Kiszka wrote:
>>> On 2011-07-26 13:54, zenati wrote:
>>>> Dear,
>>>>
>>>> I'm trying to debug Xenomai kernel with GDB and Qemu.
>>> QEMU in emulation or KVM mode?
>>>
>> I'm using Qemu in emulation mode.
> What's your target arch? x84-64, x86-32, or some ARM or PPC etc.
x86-32
>>>> So, I launch
>>>> Xenomai in Qemu and make it waiting for GDB. Then I start GDB and
>>>> connect them to Qemu, make breakpoint at the desired function to debug
>>>> and start Xenomai. If the function belongs to the linux kernel, the
>>>> execution stop at the breakpoint. But, if the function belongs to the
>>>> Xenomai nucleus, GDB recognize the breakpoint at the execution but don't
>>>> stop.
>>> Is Xenomai built as module or part of the main kernel image? The latter
>>> is simpler to handle as you don't have to deal with modules as symbol
>>> sources, find out their addresses, and load them at the right location.
>>>
>> Xenomai is built as a part of the main kernel.
> OK. Check during runtime of the guest if the disassembly at the desired
> breakpoint address matches the compiled code. Maybe there is some
> accidental discrepancy.
The breakpoints match correctly the compiled code. Anyway, it must stop
at the breakpoint. No?
> Jan
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Debugging Xenomai kernel
2011-07-27 16:13 ` zenati
@ 2011-07-27 16:16 ` Jan Kiszka
2011-07-27 16:53 ` zenati
0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2011-07-27 16:16 UTC (permalink / raw)
To: zenati; +Cc: Xenomai core
On 2011-07-27 18:13, zenati wrote:
> On 07/27/2011 02:12 PM, Jan Kiszka wrote:
>> On 2011-07-27 14:01, zenati wrote:
>>> On 07/27/2011 11:23 AM, Jan Kiszka wrote:
>>>> On 2011-07-26 13:54, zenati wrote:
>>>>> Dear,
>>>>>
>>>>> I'm trying to debug Xenomai kernel with GDB and Qemu.
>>>> QEMU in emulation or KVM mode?
>>>>
>>> I'm using Qemu in emulation mode.
>> What's your target arch? x84-64, x86-32, or some ARM or PPC etc.
> x86-32
>>>>> So, I launch
>>>>> Xenomai in Qemu and make it waiting for GDB. Then I start GDB and
>>>>> connect them to Qemu, make breakpoint at the desired function to debug
>>>>> and start Xenomai. If the function belongs to the linux kernel, the
>>>>> execution stop at the breakpoint. But, if the function belongs to the
>>>>> Xenomai nucleus, GDB recognize the breakpoint at the execution but don't
>>>>> stop.
>>>> Is Xenomai built as module or part of the main kernel image? The latter
>>>> is simpler to handle as you don't have to deal with modules as symbol
>>>> sources, find out their addresses, and load them at the right location.
>>>>
>>> Xenomai is built as a part of the main kernel.
>> OK. Check during runtime of the guest if the disassembly at the desired
>> breakpoint address matches the compiled code. Maybe there is some
>> accidental discrepancy.
> The breakpoints match correctly the compiled code. Anyway, it must stop
> at the breakpoint. No?
...if the guest actually executes that address.
I haven't used x86 QEMU in emulation mode for quite a while to debug
something. Maybe we have a regression there. What's your QEMU version?
Do you have a chance to test with a KVM host? It's faster anyway.
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Xenomai-core] Debugging Xenomai kernel
2011-07-27 16:16 ` Jan Kiszka
@ 2011-07-27 16:53 ` zenati
0 siblings, 0 replies; 7+ messages in thread
From: zenati @ 2011-07-27 16:53 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai core
On 07/27/2011 06:16 PM, Jan Kiszka wrote:
> On 2011-07-27 18:13, zenati wrote:
>> On 07/27/2011 02:12 PM, Jan Kiszka wrote:
>>> On 2011-07-27 14:01, zenati wrote:
>>>> On 07/27/2011 11:23 AM, Jan Kiszka wrote:
>>>>> On 2011-07-26 13:54, zenati wrote:
>>>>>> Dear,
>>>>>>
>>>>>> I'm trying to debug Xenomai kernel with GDB and Qemu.
>>>>> QEMU in emulation or KVM mode?
>>>>>
>>>> I'm using Qemu in emulation mode.
>>> What's your target arch? x84-64, x86-32, or some ARM or PPC etc.
>> x86-32
>>>>>> So, I launch
>>>>>> Xenomai in Qemu and make it waiting for GDB. Then I start GDB and
>>>>>> connect them to Qemu, make breakpoint at the desired function to debug
>>>>>> and start Xenomai. If the function belongs to the linux kernel, the
>>>>>> execution stop at the breakpoint. But, if the function belongs to the
>>>>>> Xenomai nucleus, GDB recognize the breakpoint at the execution but don't
>>>>>> stop.
>>>>> Is Xenomai built as module or part of the main kernel image? The latter
>>>>> is simpler to handle as you don't have to deal with modules as symbol
>>>>> sources, find out their addresses, and load them at the right location.
>>>>>
>>>> Xenomai is built as a part of the main kernel.
>>> OK. Check during runtime of the guest if the disassembly at the desired
>>> breakpoint address matches the compiled code. Maybe there is some
>>> accidental discrepancy.
>> The breakpoints match correctly the compiled code. Anyway, it must stop
>> at the breakpoint. No?
> ...if the guest actually executes that address.
>
> I haven't used x86 QEMU in emulation mode for quite a while to debug
> something. Maybe we have a regression there. What's your QEMU version?
QEMU PC emulator version 0.12.3 (qemu-kvm-0.12.3), Copyright (c)
2003-2008 Fabrice Bellard
> Do you have a chance to test with a KVM host? It's faster anyway.
I never used it before... But I'm ready to test it if there is no others
ways to debug.
> Jan
>
Omar ZENATi
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-07-27 16:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-26 11:54 [Xenomai-core] Debugging Xenomai kernel zenati
2011-07-27 9:23 ` Jan Kiszka
2011-07-27 12:01 ` zenati
2011-07-27 12:12 ` Jan Kiszka
2011-07-27 16:13 ` zenati
2011-07-27 16:16 ` Jan Kiszka
2011-07-27 16:53 ` zenati
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.