@@ -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 );
@@ -1475,81 +1476,81 @@ StopInfoSP StopInfo::CreateStopReasonWithBreakpointSiteID(Thread &thread,
1475
1476
break_id_t break_id) {
1476
1477
thread.SetThreadHitBreakpointSite ();
1477
1478
1478
- return StopInfoSP ( new StopInfoBreakpoint (thread, break_id) );
1479
+ return std::make_shared< StopInfoBreakpoint> (thread, break_id);
1479
1480
}
1480
1481
1481
1482
StopInfoSP StopInfo::CreateStopReasonWithBreakpointSiteID (Thread &thread,
1482
1483
break_id_t break_id,
1483
1484
bool should_stop) {
1484
- return StopInfoSP ( new StopInfoBreakpoint (thread, break_id, should_stop) );
1485
+ return std::make_shared< StopInfoBreakpoint> (thread, break_id, should_stop);
1485
1486
}
1486
1487
1487
1488
// LWP_TODO: We'll need a CreateStopReasonWithWatchpointResourceID akin
1488
1489
// to CreateStopReasonWithBreakpointSiteID
1489
1490
StopInfoSP StopInfo::CreateStopReasonWithWatchpointID (Thread &thread,
1490
1491
break_id_t watch_id,
1491
1492
bool silently_continue) {
1492
- return StopInfoSP (
1493
- new StopInfoWatchpoint (thread, watch_id, silently_continue) );
1493
+ return std::make_shared<StopInfoWatchpoint>(thread, watch_id,
1494
+ silently_continue);
1494
1495
}
1495
1496
1496
1497
StopInfoSP StopInfo::CreateStopReasonWithSignal (Thread &thread, int signo,
1497
1498
const char *description,
1498
1499
std::optional<int > code) {
1499
1500
thread.GetProcess ()->GetUnixSignals ()->IncrementSignalHitCount (signo);
1500
- return StopInfoSP ( new StopInfoUnixSignal (thread, signo, description, code) );
1501
+ return std::make_shared< StopInfoUnixSignal> (thread, signo, description, code);
1501
1502
}
1502
1503
1503
1504
StopInfoSP StopInfo::CreateStopReasonWithInterrupt (Thread &thread, int signo,
1504
1505
const char *description) {
1505
- return StopInfoSP ( new StopInfoInterrupt (thread, signo, description) );
1506
+ return std::make_shared< StopInfoInterrupt> (thread, signo, description);
1506
1507
}
1507
1508
1508
1509
StopInfoSP StopInfo::CreateStopReasonToTrace (Thread &thread) {
1509
- return StopInfoSP ( new StopInfoTrace (thread) );
1510
+ return std::make_shared< StopInfoTrace> (thread);
1510
1511
}
1511
1512
1512
1513
StopInfoSP StopInfo::CreateStopReasonWithPlan (
1513
1514
ThreadPlanSP &plan_sp, ValueObjectSP return_valobj_sp,
1514
1515
ExpressionVariableSP expression_variable_sp) {
1515
- return StopInfoSP ( new StopInfoThreadPlan (plan_sp, return_valobj_sp,
1516
- expression_variable_sp) );
1516
+ return std::make_shared< StopInfoThreadPlan> (plan_sp, return_valobj_sp,
1517
+ expression_variable_sp);
1517
1518
}
1518
1519
1519
1520
StopInfoSP StopInfo::CreateStopReasonWithException (Thread &thread,
1520
1521
const char *description) {
1521
- return StopInfoSP ( new StopInfoException (thread, description) );
1522
+ return std::make_shared< StopInfoException> (thread, description);
1522
1523
}
1523
1524
1524
1525
StopInfoSP StopInfo::CreateStopReasonProcessorTrace (Thread &thread,
1525
1526
const char *description) {
1526
- return StopInfoSP ( new StopInfoProcessorTrace (thread, description) );
1527
+ return std::make_shared< StopInfoProcessorTrace> (thread, description);
1527
1528
}
1528
1529
1529
1530
StopInfoSP StopInfo::CreateStopReasonHistoryBoundary (Thread &thread,
1530
1531
const char *description) {
1531
- return StopInfoSP ( new StopInfoHistoryBoundary (thread, description) );
1532
+ return std::make_shared< StopInfoHistoryBoundary> (thread, description);
1532
1533
}
1533
1534
1534
1535
StopInfoSP StopInfo::CreateStopReasonWithExec (Thread &thread) {
1535
- return StopInfoSP ( new StopInfoExec (thread) );
1536
+ return std::make_shared< StopInfoExec> (thread);
1536
1537
}
1537
1538
1538
1539
StopInfoSP StopInfo::CreateStopReasonFork (Thread &thread,
1539
1540
lldb::pid_t child_pid,
1540
1541
lldb::tid_t child_tid) {
1541
- return StopInfoSP ( new StopInfoFork (thread, child_pid, child_tid) );
1542
+ return std::make_shared< StopInfoFork> (thread, child_pid, child_tid);
1542
1543
}
1543
1544
1544
1545
1545
1546
StopInfoSP StopInfo::CreateStopReasonVFork (Thread &thread,
1546
1547
lldb::pid_t child_pid,
1547
1548
lldb::tid_t child_tid) {
1548
- return StopInfoSP ( new StopInfoVFork (thread, child_pid, child_tid) );
1549
+ return std::make_shared< StopInfoVFork> (thread, child_pid, child_tid);
1549
1550
}
1550
1551
1551
1552
StopInfoSP StopInfo::CreateStopReasonVForkDone (Thread &thread) {
1552
- return StopInfoSP ( new StopInfoVForkDone (thread) );
1553
+ return std::make_shared< StopInfoVForkDone> (thread);
1553
1554
}
1554
1555
1555
1556
ValueObjectSP StopInfo::GetReturnValueObject (StopInfoSP &stop_info_sp) {
0 commit comments