@@ -851,8 +851,9 @@ class StopInfoWatchpoint : public StopInfo {
851
851
// We have to step over the watchpoint before we know what to do:
852
852
StopInfoWatchpointSP me_as_siwp_sp
853
853
= std::static_pointer_cast<StopInfoWatchpoint>(shared_from_this ());
854
- ThreadPlanSP step_over_wp_sp (new ThreadPlanStepOverWatchpoint (
855
- *(thread_sp.get ()), me_as_siwp_sp, wp_sp));
854
+ ThreadPlanSP step_over_wp_sp =
855
+ std::make_shared<ThreadPlanStepOverWatchpoint>(*(thread_sp.get ()),
856
+ me_as_siwp_sp, wp_sp);
856
857
// When this plan is done we want to stop, so set this as a Controlling
857
858
// plan.
858
859
step_over_wp_sp->SetIsControllingPlan (true );
@@ -1481,84 +1482,84 @@ StopInfoSP StopInfo::CreateStopReasonWithBreakpointSiteID(Thread &thread,
1481
1482
break_id_t break_id) {
1482
1483
thread.SetThreadHitBreakpointSite ();
1483
1484
1484
- return StopInfoSP ( new StopInfoBreakpoint (thread, break_id) );
1485
+ return std::make_shared< StopInfoBreakpoint> (thread, break_id);
1485
1486
}
1486
1487
1487
1488
StopInfoSP StopInfo::CreateStopReasonWithBreakpointSiteID (Thread &thread,
1488
1489
break_id_t break_id,
1489
1490
bool should_stop) {
1490
- return StopInfoSP ( new StopInfoBreakpoint (thread, break_id, should_stop) );
1491
+ return std::make_shared< StopInfoBreakpoint> (thread, break_id, should_stop);
1491
1492
}
1492
1493
1493
1494
// LWP_TODO: We'll need a CreateStopReasonWithWatchpointResourceID akin
1494
1495
// to CreateStopReasonWithBreakpointSiteID
1495
1496
StopInfoSP StopInfo::CreateStopReasonWithWatchpointID (Thread &thread,
1496
1497
break_id_t watch_id,
1497
1498
bool silently_continue) {
1498
- return StopInfoSP (
1499
- new StopInfoWatchpoint (thread, watch_id, silently_continue) );
1499
+ return std::make_shared<StopInfoWatchpoint>(thread, watch_id,
1500
+ silently_continue);
1500
1501
}
1501
1502
1502
1503
StopInfoSP StopInfo::CreateStopReasonWithSignal (Thread &thread, int signo,
1503
1504
const char *description,
1504
1505
std::optional<int > code) {
1505
1506
thread.GetProcess ()->GetUnixSignals ()->IncrementSignalHitCount (signo);
1506
- return StopInfoSP ( new StopInfoUnixSignal (thread, signo, description, code) );
1507
+ return std::make_shared< StopInfoUnixSignal> (thread, signo, description, code);
1507
1508
}
1508
1509
1509
1510
StopInfoSP StopInfo::CreateStopReasonWithInterrupt (Thread &thread, int signo,
1510
1511
const char *description) {
1511
- return StopInfoSP ( new StopInfoInterrupt (thread, signo, description) );
1512
+ return std::make_shared< StopInfoInterrupt> (thread, signo, description);
1512
1513
}
1513
1514
1514
1515
StopInfoSP StopInfo::CreateStopReasonToTrace (Thread &thread) {
1515
- return StopInfoSP ( new StopInfoTrace (thread) );
1516
+ return std::make_shared< StopInfoTrace> (thread);
1516
1517
}
1517
1518
1518
1519
StopInfoSP
1519
1520
StopInfo::CreateStopReasonWithPlan (ThreadPlanSP &plan_sp,
1520
1521
ValueObjectSP return_valobj_sp,
1521
1522
ExpressionVariableSP expression_variable_sp,
1522
1523
bool return_is_swift_error_value) {
1523
- return StopInfoSP ( new StopInfoThreadPlan (plan_sp, return_valobj_sp,
1524
- expression_variable_sp,
1525
- return_is_swift_error_value) );
1524
+ return std::make_shared< StopInfoThreadPlan> (plan_sp, return_valobj_sp,
1525
+ expression_variable_sp,
1526
+ return_is_swift_error_value);
1526
1527
}
1527
1528
1528
1529
StopInfoSP StopInfo::CreateStopReasonWithException (Thread &thread,
1529
1530
const char *description) {
1530
- return StopInfoSP ( new StopInfoException (thread, description) );
1531
+ return std::make_shared< StopInfoException> (thread, description);
1531
1532
}
1532
1533
1533
1534
StopInfoSP StopInfo::CreateStopReasonProcessorTrace (Thread &thread,
1534
1535
const char *description) {
1535
- return StopInfoSP ( new StopInfoProcessorTrace (thread, description) );
1536
+ return std::make_shared< StopInfoProcessorTrace> (thread, description);
1536
1537
}
1537
1538
1538
1539
StopInfoSP StopInfo::CreateStopReasonHistoryBoundary (Thread &thread,
1539
1540
const char *description) {
1540
- return StopInfoSP ( new StopInfoHistoryBoundary (thread, description) );
1541
+ return std::make_shared< StopInfoHistoryBoundary> (thread, description);
1541
1542
}
1542
1543
1543
1544
StopInfoSP StopInfo::CreateStopReasonWithExec (Thread &thread) {
1544
- return StopInfoSP ( new StopInfoExec (thread) );
1545
+ return std::make_shared< StopInfoExec> (thread);
1545
1546
}
1546
1547
1547
1548
StopInfoSP StopInfo::CreateStopReasonFork (Thread &thread,
1548
1549
lldb::pid_t child_pid,
1549
1550
lldb::tid_t child_tid) {
1550
- return StopInfoSP ( new StopInfoFork (thread, child_pid, child_tid) );
1551
+ return std::make_shared< StopInfoFork> (thread, child_pid, child_tid);
1551
1552
}
1552
1553
1553
1554
1554
1555
StopInfoSP StopInfo::CreateStopReasonVFork (Thread &thread,
1555
1556
lldb::pid_t child_pid,
1556
1557
lldb::tid_t child_tid) {
1557
- return StopInfoSP ( new StopInfoVFork (thread, child_pid, child_tid) );
1558
+ return std::make_shared< StopInfoVFork> (thread, child_pid, child_tid);
1558
1559
}
1559
1560
1560
1561
StopInfoSP StopInfo::CreateStopReasonVForkDone (Thread &thread) {
1561
- return StopInfoSP ( new StopInfoVForkDone (thread) );
1562
+ return std::make_shared< StopInfoVForkDone> (thread);
1562
1563
}
1563
1564
1564
1565
ValueObjectSP StopInfo::GetReturnValueObject (StopInfoSP &stop_info_sp,
0 commit comments