Go to the documentation of this file.
22 const BreakpointLocationSP &owner,
27 m_saved_opcode(), m_trap_opcode(),
35 BreakpointLocationSP bp_loc_sp;
37 for (
size_t i = 0; i < owner_count; i++) {
67 for (
size_t i = 0; i < owner_count; i++) {
78 s->
Printf(
"BreakpointSite %u: addr = 0x%8.8" PRIx64
79 " type = %s breakpoint hw_index = %i hit_count = %-4u",
87 s->
Printf(
"breakpoint site: %d at 0x%8.8" PRIx64,
GetID(),
106 if (trap_opcode_size > 0 && trap_opcode_size <=
sizeof(
m_trap_opcode)) {
155 loc_sp->BumpHitCount();
161 size_t *intersect_size,
162 size_t *opcode_offset)
const {
172 if (bp_end_addr <= addr)
179 if (intersect_addr || intersect_size || opcode_offset) {
182 *intersect_addr = addr;
185 std::min<lldb::addr_t>(bp_end_addr, end_addr) - addr;
187 *opcode_offset = addr -
m_addr;
193 std::min<lldb::addr_t>(bp_end_addr, end_addr) -
m_addr;
205 out_collection.
Add(loc_sp);
207 return out_collection.
GetSize();
MATCHES FreeBSD list(APPEND FBSDKERNEL_LIBS kvm) endif() if(NOT FBSDKERNEL_LIBS) message(STATUS "Skipping FreeBSDKernel plugin due to missing libfbsdvmcore") return() endif() add_lldb_library(lldbPluginProcessFreeBSDKernel PLUGIN ProcessFreeBSDKernel.cpp RegisterContextFreeBSDKernel_arm64.cpp RegisterContextFreeBSDKernel_i386.cpp RegisterContextFreeBSDKernel_x86_64.cpp ThreadFreeBSDKernel.cpp LINK_LIBS lldbCore lldbTarget $
lldb::BreakpointLocationSP GetByIndex(size_t i)
Returns a shared pointer to the breakpoint location with index i.
bool IsBreakpointAtThisSite(lldb::break_id_t bp_id)
Tell whether a breakpoint has a location at this site.
virtual lldb::addr_t GetLoadAddress() const
uint8_t * GetSavedOpcodeBytes()
Gets the original instruction bytes that were overwritten by the trap.
bool IsInternal() const
Tell whether ALL the breakpoints in the location collection are internal.
bool IsInternal() const
Tell whether ALL the breakpoints in the location collection are internal.
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
size_t CopyOwnersList(BreakpointLocationCollection &out_collection)
This method copies the breakpoint site's owners into a new collection.
void AddOwner(const lldb::BreakpointLocationSP &owner)
The "Owners" are the breakpoint locations that share this breakpoint site.
lldb::BreakpointLocationSP GetOwnerAtIndex(size_t idx)
This method returns the breakpoint location at index index located at this breakpoint site.
BreakpointSite::Type GetType() const
BreakpointLocationCollectionIterable BreakpointLocations()
bool m_enabled
Boolean indicating if this breakpoint site enabled or not.
bool ValidForThisThread(Thread &thread)
Check whether this collection of breakpoint locations have any thread specifiers, and if yes,...
lldb::break_id_t GetID() const
uint32_t GetHitCount() const
bool ValidForThisThread(Thread &thread)
Check whether the owners of this breakpoint site have any thread specifiers, and if yes,...
uint8_t m_trap_opcode[8]
The opcode that was used to create the breakpoint if it is a software breakpoint site.
void Increment(uint32_t difference=1)
size_t GetTrapOpcodeMaxByteSize() const
Get the size of the trap opcode for this address.
std::recursive_mutex m_owners_mutex
This mutex protects the owners collection.
bool ShouldStop(StoppointCallbackContext *context)
Enquires of all the breakpoint locations in this list whether we should stop at a hit at breakID.
void SetEnabled(bool enabled)
Sets whether the current breakpoint site is enabled or not.
bool IsHardware() const override
void GetDescription(Stream *s, lldb::DescriptionLevel level)
Print a description of the breakpoint locations in this list to the stream s.
BreakpointLocationCollection m_owners
This has the BreakpointLocations that share this breakpoint site.
uint32_t m_byte_size
The size in bytes of stoppoint, e.g.
~BreakpointSite() override
bool IntersectsRange(lldb::addr_t addr, size_t size, lldb::addr_t *intersect_addr, size_t *intersect_size, size_t *opcode_offset) const
Says whether addr and size size intersects with the address intersect_addr.
uint32_t GetHardwareIndex() const
uint8_t m_saved_opcode[8]
The saved opcode bytes if this breakpoint site uses trap opcodes.
uint8_t * GetTrapOpcodeBytes()
Returns the Opcode Bytes for this breakpoint.
size_t RemoveOwner(lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
The method removes the owner at break_loc_id from this breakpoint list.
void GetDescription(Stream *s, lldb::DescriptionLevel level)
Print a description of this breakpoint site to the stream s.
static lldb::break_id_t GetNextID()
bool ShouldStop(StoppointCallbackContext *context) override
Enquires of the breakpoint locations that produced this breakpoint site whether we should stop at thi...
bool IsEnabled() const
Tells whether the current breakpoint site is enabled or not.
StoppointHitCounter m_hit_counter
Number of times this breakpoint/watchpoint has been hit.
void Add(const lldb::BreakpointLocationSP &bp_loc_sp)
Add the breakpoint bp_loc_sp to the list.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
lldb::addr_t m_addr
The load address of this stop point.
A class that represents a running process on the host machine.
size_t GetSize() const
Returns the number of elements in this breakpoint location list.
bool SetTrapOpcode(const uint8_t *trap_opcode, uint32_t trap_opcode_size)
Sets the trap opcode.
size_t GetNumberOfOwners()
This method returns the number of breakpoint locations currently located at this breakpoint site.
bool Remove(lldb::break_id_t break_id, lldb::break_id_t break_loc_id)
Removes the breakpoint location given by breakID from this list.
void Dump(Stream *s) const override
Standard Dump method.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.