[lldb] [gdb-remote server] Introduce new stop reasons for fork and vfork
Introduce three new stop reasons for fork, vfork and vforkdone events. This includes server support for serializing fork/vfork events into gdb-remote protocol. The stop infos for the two base events take a pair of PID and TID for the newly forked process. Differential Revision: https://reviews.llvm.org/D100196
This commit is contained in:
@@ -173,6 +173,7 @@ size_t SBThread::GetStopReasonDataCount() {
|
||||
case eStopReasonThreadExiting:
|
||||
case eStopReasonInstrumentation:
|
||||
case eStopReasonProcessorTrace:
|
||||
case eStopReasonVForkDone:
|
||||
// There is no data for these stop reasons.
|
||||
return 0;
|
||||
|
||||
@@ -195,6 +196,12 @@ size_t SBThread::GetStopReasonDataCount() {
|
||||
|
||||
case eStopReasonException:
|
||||
return 1;
|
||||
|
||||
case eStopReasonFork:
|
||||
return 1;
|
||||
|
||||
case eStopReasonVFork:
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -225,6 +232,7 @@ uint64_t SBThread::GetStopReasonDataAtIndex(uint32_t idx) {
|
||||
case eStopReasonThreadExiting:
|
||||
case eStopReasonInstrumentation:
|
||||
case eStopReasonProcessorTrace:
|
||||
case eStopReasonVForkDone:
|
||||
// There is no data for these stop reasons.
|
||||
return 0;
|
||||
|
||||
@@ -258,6 +266,12 @@ uint64_t SBThread::GetStopReasonDataAtIndex(uint32_t idx) {
|
||||
|
||||
case eStopReasonException:
|
||||
return stop_info_sp->GetValue();
|
||||
|
||||
case eStopReasonFork:
|
||||
return stop_info_sp->GetValue();
|
||||
|
||||
case eStopReasonVFork:
|
||||
return stop_info_sp->GetValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user