[Lldb-commits] [lldb] Add a unit test for SBBreakpoint::SetCallback (PR #96001)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 21 16:39:45 PDT 2024
================
@@ -0,0 +1,89 @@
+//===-- TestBreakpointSetCallback.cpp
+//--------------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "Plugins/Platform/MacOSX/PlatformMacOSX.h"
+#include "Plugins/Platform/MacOSX/PlatformRemoteMacOSX.h"
+#include "TestingSupport/SubsystemRAII.h"
+#include "TestingSupport/TestUtilities.h"
+#include "lldb/Breakpoint/StoppointCallbackContext.h"
+#include "lldb/Core/Debugger.h"
+#include "lldb/Core/Progress.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Target/ExecutionContext.h"
+#include "lldb/lldb-private-enumerations.h"
+#include "lldb/lldb-types.h"
+#include "gtest/gtest.h"
+#include <iostream>
+#include <memory>
+#include <mutex>
+
+using namespace lldb_private;
+using namespace lldb;
+
+static constexpr lldb::user_id_t expected_breakpoint_id = 1;
+static constexpr lldb::user_id_t expected_breakpoint_location_id = 0;
+
+class BreakpointSetCallbackTest : public ::testing::Test {
+public:
+ static void CheckCallbackArgs(void *baton, StoppointCallbackContext *context,
+ lldb::user_id_t break_id,
+ lldb::user_id_t break_loc_id,
+ lldb::user_id_t expected_breakpoint_id,
+ lldb::user_id_t expected_breakpoint_loc_id,
----------------
medismailben wrote:
no need to pass them here, since they're static
https://github.com/llvm/llvm-project/pull/96001
More information about the lldb-commits
mailing list