Question regarding the "Jdb::handle_user_request()' function
Adam Lackorzynski
adam at os.inf.tu-dresden.de
Fri Mar 22 00:18:19 CET 2013
On Tue Mar 19, 2013 at 23:59:22 +0100, Christian Prochaska wrote:
> On 18.03.2013 23:23, Adam Lackorzynski wrote:
> >Hi,
> >
> >On Tue Mar 12, 2013 at 00:19:58 +0100, Christian Prochaska wrote:
> >>the 'Jdb::enter_jdb()' function in file 'jdb.cpp' contains the following code:
> >>
> >>// check for int $3 user debugging interface
> >>if (foreach_cpu(&handle_user_request, true))
> >> {
> >> close_debug_console(cpu);
> >> leave_trap_handler(cpu);
> >> return 0;
> >> }
> >>
> >>I'm not sure why in this case the second argument of 'foreach_cpu()' is true. I understand that it causes the result to be true only
> >>if the 'handle_user_request()' function returned true for every currently running CPU. But I found that this can be a problem when
> >>using the '-jdb_cmd=JS' kernel argument: if only one CPU is currently running, the result of 'foreach_cpu()' is true, but when two
> >>CPUs are currently running, the 'handle_user_request()' function returns true only for one CPU, which makes the end result false and
> >>causes the kernel to stop with the JDB prompt shown. Can somebody please explain?
> >I think your observation is correct concerning the behaviour of
> >foreach_cpu. Are you seeing this on x86? I would like to see the same on
> >my setup.
>
> Yes, on x86. I'm running 'qemu-system-i386' with the '-smp 2' option
> and it happens only some of the times. The kernel output is
> attached.
Ah, thanks for the output and hint, I'll investigate.
Adam
--
Adam adam at os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
More information about the l4-hackers
mailing list