Question regarding the "Jdb::handle_user_request()' function

Adam Lackorzynski adam at os.inf.tu-dresden.de
Mon Mar 18 23:23:20 CET 2013


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.



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