<commit_before>//===-- ThreadPlanStepOverBreakpoint.cpp ------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "lldb/Target/ThreadPlanStepOverBreakpoint.h"

// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private-log.h"
#include "lldb/Core/Log.h"
#include "lldb/Core/Stream.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"

using namespace lldb;
using namespace lldb_private;

//----------------------------------------------------------------------
// ThreadPlanStepOverBreakpoint: Single steps over a breakpoint bp_site_sp at the pc.
//----------------------------------------------------------------------

ThreadPlanStepOverBreakpoint::ThreadPlanStepOverBreakpoint (Thread &thread) :
    ThreadPlan (ThreadPlan::eKindStepOverBreakpoint, "Step over breakpoint trap",
                thread,
                eVoteNo,
                eVoteNoOpinion),  // We need to report the run since this happens
                            // first in the thread plan stack when stepping
                            // over a breakpoint
    m_breakpoint_addr (LLDB_INVALID_ADDRESS),
    m_auto_continue(false)

{
    m_breakpoint_addr = m_thread.GetRegisterContext()->GetPC();
    m_breakpoint_site_id =  m_thread.GetProcess()->GetBreakpointSiteList().FindIDByAddress (m_breakpoint_addr);
}

ThreadPlanStepOverBreakpoint::~ThreadPlanStepOverBreakpoint ()
{
}

void
ThreadPlanStepOverBreakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level)
{
    s->Printf("Single stepping past breakpoint site %llu at 0x%llx", m_breakpoint_site_id, (uint64_t)m_breakpoint_addr);
}

bool
ThreadPlanStepOverBreakpoint::ValidatePlan (Stream *error)
{
    return true;
}

bool
ThreadPlanStepOverBreakpoint::PlanExplainsStop ()
{
    return true;
}

bool
ThreadPlanStepOverBreakpoint::ShouldStop (Event *event_ptr)
{<commit_msg>The StepOverBreakpoint plan should only explain eStopReasonTrace.  It didn't cause any other exceptional stop reason.<commit_after>//===-- ThreadPlanStepOverBreakpoint.cpp ------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#include "lldb/Target/ThreadPlanStepOverBreakpoint.h"

// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private-log.h"
#include "lldb/Core/Log.h"
#include "lldb/Core/Stream.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"

using namespace lldb;
using namespace lldb_private;

//----------------------------------------------------------------------
// ThreadPlanStepOverBreakpoint: Single steps over a breakpoint bp_site_sp at the pc.
//----------------------------------------------------------------------

ThreadPlanStepOverBreakpoint::ThreadPlanStepOverBreakpoint (Thread &thread) :
    ThreadPlan (ThreadPlan::eKindStepOverBreakpoint, "Step over breakpoint trap",
                thread,
                eVoteNo,
                eVoteNoOpinion),  // We need to report the run since this happens
                            // first in the thread plan stack when stepping
                            // over a breakpoint
    m_breakpoint_addr (LLDB_INVALID_ADDRESS),
    m_auto_continue(false)

{
    m_breakpoint_addr = m_thread.GetRegisterContext()->GetPC();
    m_breakpoint_site_id =  m_thread.GetProcess()->GetBreakpointSiteList().FindIDByAddress (m_breakpoint_addr);
}

ThreadPlanStepOverBreakpoint::~ThreadPlanStepOverBreakpoint ()
{
}

void
ThreadPlanStepOverBreakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level)
{
    s->Printf("Single stepping past breakpoint site %llu at 0x%llx", m_breakpoint_site_id, (uint64_t)m_breakpoint_addr);
}

bool
ThreadPlanStepOverBreakpoint::ValidatePlan (Stream *error)
{
    return true;
}

bool
ThreadPlanStepOverBreakpoint::PlanExplainsStop ()
{
    StopInfoSP stop_info_sp = GetPrivateStopReason();
    if (stop_info_sp)
    {
        StopReason reason = stop_info_sp->GetStopReason();
        if (reason == eStopReasonTrace || reason == eStopReasonNone)
            return true;
        else
            return false;
    }
    return false;
}

bool
ThreadPlanStepOverBreakpoint::ShouldStop (Event *event_ptr)
{
{'fraction_non_alphanumeric': 0.19361022364217254, 'fraction_numerical': 0.0012779552715654952, 'mean_word_length': 2.3590844062947065, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2227283', 'n_tokens_mistral': 1298, 'n_tokens_neox': 1278, 'n_words': 298}