mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-10 18:11:04 +09:00
Show PID when using debug attach flag with corerun (#53385)
This commit is contained in:
parent
83355e0112
commit
41466ffdf3
2 changed files with 12 additions and 1 deletions
|
@ -74,7 +74,8 @@ static void wait_for_debugger()
|
|||
}
|
||||
else if (state == pal::debugger_state_t::not_attached)
|
||||
{
|
||||
pal::fprintf(stdout, W("Waiting for the debugger to attach. Press any key to continue ...\n"));
|
||||
uint32_t pid = pal::get_process_id();
|
||||
pal::fprintf(stdout, W("Waiting for the debugger to attach (PID: %u). Press any key to continue ...\n"), pid);
|
||||
(void)getchar();
|
||||
state = pal::is_debugger_attached();
|
||||
}
|
||||
|
|
|
@ -106,6 +106,11 @@ namespace pal
|
|||
return { buffer.get() };
|
||||
}
|
||||
|
||||
uint32_t get_process_id()
|
||||
{
|
||||
return (uint32_t)::GetCurrentProcessId();
|
||||
}
|
||||
|
||||
debugger_state_t is_debugger_attached()
|
||||
{
|
||||
return (::IsDebuggerPresent() == TRUE) ? debugger_state_t::attached : debugger_state_t::not_attached;
|
||||
|
@ -367,6 +372,11 @@ namespace pal
|
|||
return abs_path;
|
||||
}
|
||||
|
||||
uint32_t get_process_id()
|
||||
{
|
||||
return (uint32_t)getpid();
|
||||
}
|
||||
|
||||
debugger_state_t is_debugger_attached()
|
||||
{
|
||||
#if defined(__APPLE__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue