The cpu_session interface fails to be virtualized by gdb_monitor because platform-nova uses an extended nova_cpu_session interface. The problem was that threads have been created directly at core without knowledge of gdb_monitor. This lead to the situation that gdb_monitor didn't know of all threads to be debugged. Tunnel the additional parameters required on base-nova through the state() call of the cpu_session interface before the thread actual is started.
41 lines
996 B
C++
41 lines
996 B
C++
/**
|
|
* \brief Core implementation of the CPU session interface extension
|
|
* \author Alexander Boettcher
|
|
* \date 2012-07-27
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2012-2012 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
/* Genode includes */
|
|
#include <base/stdint.h>
|
|
|
|
/* Core includes */
|
|
#include <cpu_session_component.h>
|
|
|
|
using namespace Genode;
|
|
|
|
Native_capability
|
|
Cpu_session_component::native_cap(Thread_capability thread_cap)
|
|
{
|
|
Cpu_thread_component *thread = _lookup_thread(thread_cap);
|
|
if (!thread)
|
|
return Native_capability::invalid_cap();
|
|
|
|
return thread->platform_thread()->native_cap();
|
|
}
|
|
|
|
Native_capability
|
|
Cpu_session_component::pause_sync(Thread_capability target_thread_cap)
|
|
{
|
|
Cpu_thread_component *thread = _lookup_thread(target_thread_cap);
|
|
if (!thread || !thread->platform_thread())
|
|
return Native_capability::invalid_cap();
|
|
|
|
return thread->platform_thread()->pause();
|
|
}
|