Skip to content

Commit adf9526

Browse files
author
git apple-llvm automerger
committed
Merge commit '1d3f1eb855fc' from llvm.org/master into apple/main
2 parents d7fb9c5 + 1d3f1eb commit adf9526

File tree

4 files changed

+10
-81
lines changed

4 files changed

+10
-81
lines changed

lldb/bindings/interface/SBTarget.i

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -579,12 +579,6 @@ public:
579579
uint32_t column, lldb::addr_t offset,
580580
SBFileSpecList &module_list);
581581

582-
lldb::SBBreakpoint
583-
BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line,
584-
uint32_t column, lldb::addr_t offset,
585-
SBFileSpecList &module_list,
586-
bool move_to_nearest_code);
587-
588582
lldb::SBBreakpoint
589583
BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL);
590584

lldb/include/lldb/API/SBTarget.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#ifndef LLDB_API_SBTARGET_H
1010
#define LLDB_API_SBTARGET_H
1111

12-
#include "lldb/lldb-private-enumerations.h"
13-
1412
#include "lldb/API/SBAddress.h"
1513
#include "lldb/API/SBAttachInfo.h"
1614
#include "lldb/API/SBBreakpoint.h"
@@ -562,12 +560,6 @@ class LLDB_API SBTarget {
562560
uint32_t column, lldb::addr_t offset,
563561
SBFileSpecList &module_list);
564562

565-
lldb::SBBreakpoint
566-
BreakpointCreateByLocation(const lldb::SBFileSpec &file_spec, uint32_t line,
567-
uint32_t column, lldb::addr_t offset,
568-
SBFileSpecList &module_list,
569-
bool move_to_nearest_code);
570-
571563
lldb::SBBreakpoint BreakpointCreateByName(const char *symbol_name,
572564
const char *module_name = nullptr);
573565

@@ -866,11 +858,6 @@ class LLDB_API SBTarget {
866858
void SetSP(const lldb::TargetSP &target_sp);
867859

868860
private:
869-
lldb::SBBreakpoint BreakpointCreateByLocationImpl(
870-
const lldb::SBFileSpec &file_spec, uint32_t line, uint32_t column,
871-
lldb::addr_t offset, SBFileSpecList &module_list,
872-
const lldb_private::LazyBool move_to_nearest_code);
873-
874861
lldb::TargetSP m_opaque_sp;
875862
};
876863

lldb/source/API/SBTarget.cpp

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -757,10 +757,14 @@ SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec,
757757
offset, sb_module_list));
758758
}
759759

760-
SBBreakpoint SBTarget::BreakpointCreateByLocationImpl(
761-
const lldb::SBFileSpec &sb_file_spec, uint32_t line, uint32_t column,
762-
lldb::addr_t offset, SBFileSpecList &sb_module_list,
763-
const LazyBool move_to_nearest_code) {
760+
SBBreakpoint SBTarget::BreakpointCreateByLocation(
761+
const SBFileSpec &sb_file_spec, uint32_t line, uint32_t column,
762+
lldb::addr_t offset, SBFileSpecList &sb_module_list) {
763+
LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation,
764+
(const lldb::SBFileSpec &, uint32_t, uint32_t,
765+
lldb::addr_t, lldb::SBFileSpecList &),
766+
sb_file_spec, line, column, offset, sb_module_list);
767+
764768
SBBreakpoint sb_bp;
765769
TargetSP target_sp(GetSP());
766770
if (target_sp && line != 0) {
@@ -770,6 +774,7 @@ SBBreakpoint SBTarget::BreakpointCreateByLocationImpl(
770774
const LazyBool skip_prologue = eLazyBoolCalculate;
771775
const bool internal = false;
772776
const bool hardware = false;
777+
const LazyBool move_to_nearest_code = eLazyBoolCalculate;
773778
const FileSpecList *module_list = nullptr;
774779
if (sb_module_list.GetSize() > 0) {
775780
module_list = sb_module_list.get();
@@ -779,34 +784,7 @@ SBBreakpoint SBTarget::BreakpointCreateByLocationImpl(
779784
skip_prologue, internal, hardware, move_to_nearest_code);
780785
}
781786

782-
return sb_bp;
783-
}
784-
785-
SBBreakpoint SBTarget::BreakpointCreateByLocation(
786-
const SBFileSpec &sb_file_spec, uint32_t line, uint32_t column,
787-
lldb::addr_t offset, SBFileSpecList &sb_module_list) {
788-
LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation,
789-
(const lldb::SBFileSpec &, uint32_t, uint32_t,
790-
lldb::addr_t, lldb::SBFileSpecList &),
791-
sb_file_spec, line, column, offset, sb_module_list);
792-
793-
return LLDB_RECORD_RESULT(BreakpointCreateByLocationImpl(
794-
sb_file_spec, line, column, offset, sb_module_list, eLazyBoolCalculate));
795-
}
796-
797-
SBBreakpoint SBTarget::BreakpointCreateByLocation(
798-
const SBFileSpec &sb_file_spec, uint32_t line, uint32_t column,
799-
lldb::addr_t offset, SBFileSpecList &sb_module_list,
800-
bool move_to_nearest_code) {
801-
LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation,
802-
(const lldb::SBFileSpec &, uint32_t, uint32_t,
803-
lldb::addr_t, lldb::SBFileSpecList &, bool),
804-
sb_file_spec, line, column, offset, sb_module_list,
805-
move_to_nearest_code);
806-
807-
return LLDB_RECORD_RESULT(BreakpointCreateByLocationImpl(
808-
sb_file_spec, line, column, offset, sb_module_list,
809-
move_to_nearest_code ? eLazyBoolYes : eLazyBoolNo));
787+
return LLDB_RECORD_RESULT(sb_bp);
810788
}
811789

812790
SBBreakpoint SBTarget::BreakpointCreateByName(const char *symbol_name,
@@ -2511,9 +2489,6 @@ void RegisterMethods<SBTarget>(Registry &R) {
25112489
BreakpointCreateByLocation,
25122490
(const lldb::SBFileSpec &, uint32_t, uint32_t,
25132491
lldb::addr_t, lldb::SBFileSpecList &));
2514-
LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByLocation,
2515-
(const lldb::SBFileSpec &, uint32_t, uint32_t,
2516-
lldb::addr_t, lldb::SBFileSpecList &, bool));
25172492
LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName,
25182493
(const char *, const char *));
25192494
LLDB_REGISTER_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName,

lldb/test/API/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -42,30 +42,3 @@ def testBreakpointByLine(self):
4242
self.assertEqual(b_loc.GetLine(), 11)
4343
in_condition |= b_loc.GetColumn() < 30
4444
self.assertTrue(in_condition)
45-
46-
## Skip gcc version less 7.1 since it doesn't support -gcolumn-info
47-
@skipIf(compiler="gcc", compiler_version=['<', '7.1'])
48-
def testBreakpointByLineAndColumnNearestCode(self):
49-
self.build()
50-
exe = self.getBuildArtifact("a.out")
51-
52-
main_c = lldb.SBFileSpec("main.c")
53-
line = line_number("main.c", "// Line 20.")
54-
column = len("// Line 20") # should stop at the period.
55-
indent = 2
56-
module_list = lldb.SBFileSpecList()
57-
58-
# Create a target from the debugger.
59-
target = self.dbg.CreateTarget(exe)
60-
self.assertTrue(target, VALID_TARGET)
61-
62-
valid_bpt = target.BreakpointCreateByLocation(main_c, line, column,
63-
indent, module_list, True)
64-
self.assertTrue(valid_bpt, VALID_BREAKPOINT)
65-
self.assertEqual(valid_bpt.GetNumLocations(), 1)
66-
67-
invalid_bpt = target.BreakpointCreateByLocation(main_c, line, column,
68-
indent, module_list, False)
69-
self.assertTrue(invalid_bpt, VALID_BREAKPOINT)
70-
self.assertEqual(invalid_bpt.GetNumLocations(), 0)
71-

0 commit comments

Comments
 (0)