[Lldb-commits] [PATCH] D120917: Make the breakpoint log channel more useful

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 3 10:06:34 PST 2022


jingham created this revision.
jingham added reviewers: labath, JDevlieghere.
Herald added a project: All.
jingham requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

I was trying to figure out a problem with how a client was seeing the breakpoint events, and was impeded by two things:

1. The BreakpointEventData::Dump did nothing
2. In order to see the breakpoint events you had to turn on the event log stream, and that's really noisy.

I fixed (1) straightforwardly by printing the breakpoint ID and event type.  More than that is probably overkill

I fixed (2) by adding a backstop in the "event" log channel printing where the EventData for the event can provide a Log channel.  Then I made the BreakpointEventData return the breakpoint log (if it's on of course), so you can see breakpoint event logging & break logging but not all the other event logging.

I didn't go through and make the other EventData subclasses implement this method.  It's not guaranteed that having the event data come out along with the regular log traffic is helpful rather than noisy.  For the breakpoints it is clearly helpful since there aren't that many events sent by the system.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D120917

Files:
  lldb/include/lldb/Breakpoint/Breakpoint.h
  lldb/include/lldb/Utility/Event.h
  lldb/source/Breakpoint/Breakpoint.cpp
  lldb/source/Utility/Broadcaster.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120917.412754.patch
Type: text/x-patch
Size: 4313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220303/0c584631/attachment.bin>


More information about the lldb-commits mailing list