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

Christian Prochaska christian.prochaska at
Tue Mar 12 00:19:58 CET 2013


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))
    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?


More information about the l4-hackers mailing list