mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-16 14:18:27 +00:00
base: changes for GDB monitor
- add a new function 'binary_ready_hook_for_gdb()' in ldso. GDB can set a breakpoint at this function to know when ldso has loaded the binary into memory. - get the thread state from the NOVA kernel immediately on 'pause()' Fixes #1968
This commit is contained in:
committed by
Christian Helmuth
parent
30e57d4581
commit
2cde1d36c1
@ -215,8 +215,10 @@ Rpc_entrypoint::Rpc_entrypoint(Pd_session *pd_session, size_t stack_size,
|
||||
_pd_session(*pd_session)
|
||||
{
|
||||
/* set magic value evaluated by thread_nova.cc to start a local thread */
|
||||
if (native_thread().ec_sel == Native_thread::INVALID_INDEX)
|
||||
if (native_thread().ec_sel == Native_thread::INVALID_INDEX) {
|
||||
native_thread().ec_sel = Native_thread::INVALID_INDEX - 1;
|
||||
native_thread().initial_ip = (addr_t)&_activation_entry;
|
||||
}
|
||||
|
||||
/* required to create a 'local' EC */
|
||||
Thread::start();
|
||||
|
@ -29,7 +29,6 @@
|
||||
/* NOVA includes */
|
||||
#include <nova/syscalls.h>
|
||||
#include <nova/util.h>
|
||||
#include <nova_cpu_session/connection.h>
|
||||
|
||||
using namespace Genode;
|
||||
|
||||
@ -159,11 +158,12 @@ void Thread::start()
|
||||
|
||||
/* create EC at core */
|
||||
Thread_state state;
|
||||
state.sel_exc_base = native_thread().exc_pt_sel;
|
||||
state.vcpu = native_thread().vcpu;
|
||||
state.sel_exc_base = native_thread().exc_pt_sel;
|
||||
state.vcpu = native_thread().vcpu;
|
||||
state.global_thread = global;
|
||||
|
||||
/* local thread have no start instruction pointer - set via portal entry */
|
||||
addr_t thread_ip = global ? reinterpret_cast<addr_t>(_thread_start) : 0;
|
||||
addr_t thread_ip = global ? reinterpret_cast<addr_t>(_thread_start) : native_thread().initial_ip;
|
||||
|
||||
Cpu_thread_client cpu_thread(_thread_cap);
|
||||
try { cpu_thread.state(state); }
|
||||
|
Reference in New Issue
Block a user