summaryrefslogtreecommitdiffstats
path: root/lldb/source/Breakpoint/Breakpoint.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Breakpoint/Breakpoint.cpp')
-rw-r--r--lldb/source/Breakpoint/Breakpoint.cpp45
1 files changed, 39 insertions, 6 deletions
diff --git a/lldb/source/Breakpoint/Breakpoint.cpp b/lldb/source/Breakpoint/Breakpoint.cpp
index e1582585078..e90a827fdba 100644
--- a/lldb/source/Breakpoint/Breakpoint.cpp
+++ b/lldb/source/Breakpoint/Breakpoint.cpp
@@ -511,14 +511,22 @@ Breakpoint::GetNumLocations() const
void
Breakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_locations)
{
- assert (s != NULL);
- s->Printf("%i: ", GetID());
- GetResolverDescription (s);
- GetFilterDescription (s);
-
const size_t num_locations = GetNumLocations ();
const size_t num_resolved_locations = GetNumResolvedLocations ();
+ assert (s != NULL);
+
+
+
+ // They just made the breakpoint, they don't need to be told HOW they made it...
+ // Also, we'll print the breakpoint number differently depending on whether there is 1 or more locations.
+ if (level != eDescriptionLevelInitial)
+ {
+ s->Printf("%i: ", GetID());
+ GetResolverDescription (s);
+ GetFilterDescription (s);
+ }
+
switch (level)
{
case lldb::eDescriptionLevelBrief:
@@ -545,7 +553,32 @@ Breakpoint::GetDescription (Stream *s, lldb::DescriptionLevel level, bool show_l
s->EOL();
}
break;
-
+
+ case lldb::eDescriptionLevelInitial:
+ s->Printf ("Breakpoint %i: ", GetID());
+ if (num_locations == 0)
+ {
+ s->Printf ("no locations (pending).");
+ }
+ else if (num_locations == 1)
+ {
+ // If there is one location only, we'll just print that location information. But don't do this if
+ // show locations is true, then that will be handled below.
+ if (show_locations == false)
+ {
+ GetLocationAtIndex(0)->GetDescription(s, level);
+ }
+ else
+ {
+ s->Printf ("%zd locations.", num_locations);
+ }
+ }
+ else
+ {
+ s->Printf ("%zd locations.", num_locations);
+ }
+ s->EOL();
+ break;
case lldb::eDescriptionLevelVerbose:
// Verbose mode does a debug dump of the breakpoint
Dump (s);
OpenPOWER on IntegriCloud