Skip to content

Commit

Permalink
[lldb/Breakpoint] Include whether or not a breakpoint is a HW BP
Browse files Browse the repository at this point in the history
Include whether or not a breakpoint is a hardware breakpoint in the
breakpoint location. This will show up in things like the breakpoint
list.

Differential revision: https://reviews.llvm.org/D73389

(cherry picked from commit d8e0f4f)
  • Loading branch information
JDevlieghere committed Jan 27, 2020
1 parent d28d7ea commit 192002a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Expand Up @@ -101,6 +101,10 @@ def break_multi_thread(self, removal_type):
# Continue the loop and test that we are stopped 4 times.
count += 1

# Check the breakpoint list.
self.expect("breakpoint list", substrs=['hw_break_function', 'hardware'])
self.expect("breakpoint list -v", substrs=['function = hw_break_function', 'hardware = true'])

if removal_type == 'delete':
self.runCmd("settings set auto-confirm true")

Expand Down
7 changes: 4 additions & 3 deletions lldb/source/Breakpoint/BreakpointLocation.cpp
Expand Up @@ -597,7 +597,8 @@ void BreakpointLocation::GetDescription(Stream *s,
s->EOL();
s->Indent();
s->Printf("resolved = %s\n", IsResolved() ? "true" : "false");

s->Indent();
s->Printf("hardware = %s\n", IsHardware() ? "true" : "false");
s->Indent();
s->Printf("hit count = %-4u\n", GetHitCount());

Expand All @@ -608,8 +609,8 @@ void BreakpointLocation::GetDescription(Stream *s,
}
s->IndentLess();
} else if (level != eDescriptionLevelInitial) {
s->Printf(", %sresolved, hit count = %u ", (IsResolved() ? "" : "un"),
GetHitCount());
s->Printf(", %sresolved, %shit count = %u ", (IsResolved() ? "" : "un"),
(IsHardware() ? "hardware, " : ""), GetHitCount());
if (m_options_up) {
m_options_up->GetDescription(s, level);
}
Expand Down

0 comments on commit 192002a

Please sign in to comment.