llvm-project/lldb/source/Plugins/Process/Utility/NativeProcessSoftwareSingleStep.h
dlav-sc d7e23bef6a
[lldb][RISCV] fix LR/SC atomic sequence handling in lldb-server (#146072)
lldb-server had limited support for single-stepping through the lr/sc
atomic sequence. This patch enhances that support for all possible
atomic sequences.

The previous version contained an incorrect regex pattern in the test,
causing the riscv-specific test to run on other platforms. This reland
fixes the regex (see lldb/test/API/riscv/step/TestSoftwareStep.py)
2025-06-30 16:27:44 +03:00

33 lines
1021 B
C++

//===-- NativeProcessSoftwareSingleStep.h -----------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef lldb_NativeProcessSoftwareSingleStep_h
#define lldb_NativeProcessSoftwareSingleStep_h
#include "lldb/Host/common/NativeProcessProtocol.h"
#include "lldb/Host/common/NativeThreadProtocol.h"
#include <map>
namespace lldb_private {
class NativeProcessSoftwareSingleStep {
public:
Status SetupSoftwareSingleStepping(NativeThreadProtocol &thread);
protected:
// List of thread ids stepping with a breakpoint with the address of
// the relevan breakpoint
std::map<lldb::tid_t, std::vector<lldb::addr_t>>
m_threads_stepping_with_breakpoint;
};
} // namespace lldb_private
#endif // #ifndef lldb_NativeProcessSoftwareSingleStep_h