KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
ubc_breakpoint_t Struct Reference

UBC breakpoint structure. More...

#include <ubc.h>

Data Fields

void * address
 Target address.
 
ubc_address_mask_t address_mask
 Address mask.
 
ubc_access_t access
 Access type.
 
struct { 
 
   bool   break_before 
 Break before instruction execution. More...
 
instruction 
 Instruction access type settings.
 
struct { 
 
   ubc_rw_t   rw 
 Read/write condition. More...
 
   ubc_size_t   size 
 Size condition. More...
 
   struct { 
 
      bool   enabled 
 Enables data value comparisons. More...
 
      uint32_t   value 
 Data value for operand accesses. More...
 
      uint32_t   mask 
 Exclusion mask for data value comparison. More...
 
   }   data 
 Optional operand data settings. More...
 
operand 
 Operand access type settings.
 
struct { 
 
   bool   enabled 
 Enables ASID value comparisons. More...
 
   uint8_t   value 
 ASID value. More...
 
asid 
 Optional ASID settings.
 
struct ubc_breakpoint * next
 Next breakpoint in the sequence.
 

Detailed Description

UBC breakpoint structure.

This structure contains all of the information needed to configure a breakpoint using the SH4's UBC. It is meant to be zero-initialized, with the most commonly preferred, general values being the defaults, so that the only member that must be initialized to a non-zero value is ubc_breakpoint_t::address.

Note
The default configuration (from zero initialization) will trigger a breakpoint with any access to ubc_breakpoint_t::address.
Warning
When using ubc_breakpoint_t::asid or ubc_breakpoint_t::data, do not forget to set their respective enable members!

Field Documentation

◆ access

ubc_access_t ubc_breakpoint_t::access

Access type.

Controls which type of access to the target address(es) to break on.

◆ address

void* ubc_breakpoint_t::address

Target address.

Address used as the target or base memory address of a breakpoint.

◆ address_mask

ubc_address_mask_t ubc_breakpoint_t::address_mask

Address mask.

Controls which of the low bits of ubc_breakpoint_t::address get excluded from the address comparison.

Note
This is used to create a breakpoint on a range of addresses.

◆ [struct]

struct { ... } ubc_breakpoint_t::asid

Optional ASID settings.

These settings are used used when the MMU is enabled to distinguish between memory pages with the same virtual address.

◆ break_before

bool ubc_breakpoint_t::break_before

Break before instruction execution.

Causes the breakpoint to be triggered just before the target instruction is actually executed.

Warning
Be careful when breaking before an instruction and returning "false" in your handler callback, as this can cause an infinite loop while the instruction gets repeatedly executed, repeatedly triggering your breakpoint handler.

◆ [struct]

struct { ... } ubc_breakpoint_t::data

Optional operand data settings.

These settings allow for triggering an operand-access breakpoint on a particular value or range of values.

Warning
Only a single breakpoint utilizing data comparison settings may be active at a time, due to UBC channel limitations.

◆ enabled

bool ubc_breakpoint_t::enabled

Enables data value comparisons.

Enables ASID value comparisons.

Must be enabled for data value comparisons to be used.

Must be enabled for ASID values to be used.

◆ [struct]

struct { ... } ubc_breakpoint_t::instruction

Instruction access type settings.

Contains settings which are specific to instruction (or either) type accesses.

◆ mask

uint32_t ubc_breakpoint_t::mask

Exclusion mask for data value comparison.

Controls which bits get masked off and excluded from operand-access value comparisons.

Note
This is used to break on a range of values.

◆ next

struct ubc_breakpoint* ubc_breakpoint_t::next

Next breakpoint in the sequence.

Allows you to chain up to two breakpoint conditions together, creating a sequential breakpoint.

Warning
You can only ever have a single sequential breakpoint active at a time, with no other regular breakpoints active, as it requires both UBC channels to be in-use simultaneously.
Data comparison can only be used in the second breakpoint of a sequence.
When using a sequential breakpoint, the instructions triggering the first and second conditions must be { at least } 4 instructions away.

◆ [struct]

struct { ... } ubc_breakpoint_t::operand

Operand access type settings.

Contains settings which are specific to operand (or either) type accesses.

◆ rw

ubc_rw_t ubc_breakpoint_t::rw

Read/write condition.

Controls read/write condition for operand-access breakpoints

◆ size

ubc_size_t ubc_breakpoint_t::size

Size condition.

Controls size condition for operand-access breakpoints

◆ value [1/2]

uint32_t ubc_breakpoint_t::value

Data value for operand accesses.

Value to use for data comparisons with operand-access breakpoints.

Note
Since this field and its mask are only 32 bits wide, it will be compared to both the high and low 32-bits when using 64-bit operand sizes.

◆ value [2/2]

uint8_t ubc_breakpoint_t::value

ASID value.

Sets the required ASID value for the virtual address given by ubc_breakpoint_t::address to match for a particular breakpoint.


The documentation for this struct was generated from the following file: