RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
rtems-debugger-microblaze.c File Reference

MicroBlaze libdebugger implementation. More...

#include <errno.h>
#include <inttypes.h>
#include <stdlib.h>
#include <rtems.h>
#include <rtems/score/cpu.h>
#include <rtems/score/threadimpl.h>
#include <rtems/score/userextimpl.h>
#include <rtems/debugger/rtems-debugger-bsp.h>
#include "rtems-debugger-target.h"
#include "rtems-debugger-threads.h"

Data Structures

struct  microblaze_soft_step
 

Macros

#define TARGET_DEBUG   0
 
#define RTEMS_DEBUGGER_NUMREGS   57
 
#define RTEMS_DEBUGGER_REG_BYTES   4
 
#define REG_R0   0
 
#define REG_R1   1
 
#define REG_R2   2
 
#define REG_R3   3
 
#define REG_R4   4
 
#define REG_R5   5
 
#define REG_R6   6
 
#define REG_R7   7
 
#define REG_R8   8
 
#define REG_R9   9
 
#define REG_R10   10
 
#define REG_R11   11
 
#define REG_R12   12
 
#define REG_R13   13
 
#define REG_R14   14
 
#define REG_R15   15
 
#define REG_R16   16
 
#define REG_R17   17
 
#define REG_R18   18
 
#define REG_R19   19
 
#define REG_R20   20
 
#define REG_R21   21
 
#define REG_R22   22
 
#define REG_R23   23
 
#define REG_R24   24
 
#define REG_R25   25
 
#define REG_R26   26
 
#define REG_R27   27
 
#define REG_R28   28
 
#define REG_R29   29
 
#define REG_R30   30
 
#define REG_R31   31
 
#define REG_PC   32
 
#define REG_MS   33
 
#define REG_EA   34
 
#define REG_ES   35
 
#define REG_FS   36
 
#define REG_BT   37
 
#define REG_PV0   38
 
#define REG_PV1   39
 
#define REG_PV2   40
 
#define REG_PV3   41
 
#define REG_PV4   42
 
#define REG_PV5   43
 
#define REG_PV6   44
 
#define REG_PV7   45
 
#define REG_PV8   46
 
#define REG_PV9   47
 
#define REG_PV10   48
 
#define REG_PV11   49
 
#define REG_ED   50
 
#define REG_PID   51
 
#define REG_ZP   52
 
#define REG_TBLX   53
 
#define REG_TBLSX   54
 
#define REG_TBLLO   55
 
#define REG_TBLHI   56
 
#define RTEMS_DEBUGGER_NUMREGBYTES    microblaze_reg_offsets[ RTEMS_DEBUGGER_NUMREGS ]
 
#define EXC_FRAME_PRINT(_out, _prefix, _frame)
 
#define target_printk(_fmt, ...)
 
#define IGROUP_MASK   0x3f
 
#define REGISTER_MASK   0x1f
 
#define IMM16_MASK   0xffff
 
#define IMM24_MASK   0xffffff
 
#define IMM_GROUP   0x2c
 
#define RETURN_GROUP   0x2d
 
#define UBRANCH_GROUP   0x26
 
#define CBRANCH_GROUP   0x27
 
#define UIBRANCH_GROUP   0x2e
 
#define CIBRANCH_GROUP   0x2f
 
#define BRK_RA   0xC
 

Functions

int rtems_debugger_target_configure (rtems_debugger_target *target)
 
int rtems_debugger_target_enable (void)
 
int rtems_debugger_target_disable (void)
 
int rtems_debugger_target_read_regs (rtems_debugger_thread *thread)
 
int rtems_debugger_target_write_regs (rtems_debugger_thread *thread)
 
uintptr_t rtems_debugger_target_reg_pc (rtems_debugger_thread *thread)
 
uintptr_t rtems_debugger_target_frame_pc (CPU_Exception_frame *frame)
 
uintptr_t rtems_debugger_target_reg_sp (rtems_debugger_thread *thread)
 
uintptr_t rtems_debugger_target_tcb_sp (rtems_debugger_thread *thread)
 
int rtems_debugger_target_thread_stepping (rtems_debugger_thread *thread)
 
int rtems_debugger_target_exception_to_signal (CPU_Exception_frame *frame)
 
void rtems_debugger_target_exception_print (CPU_Exception_frame *frame)
 
int rtems_debugger_target_hwbreak_insert (void)
 
int rtems_debugger_target_hwbreak_remove (void)
 
int rtems_debugger_target_hwbreak_control (rtems_debugger_target_watchpoint wp, bool insert, uintptr_t addr, DB_UINT kind)
 
int rtems_debugger_target_cache_sync (rtems_debugger_target_swbreak *swbreak)
 

Variables

char bsp_section_text_begin []
 
char bsp_section_text_end []
 
char bsp_section_fast_text_begin []
 
char bsp_section_fast_text_end []
 
microblaze_soft_step next_soft_break = { 0 }
 
microblaze_soft_step target_soft_break = { 0 }
 
User_extensions_Control mb_ext
 

Detailed Description

MicroBlaze libdebugger implementation.

Macro Definition Documentation

◆ EXC_FRAME_PRINT

#define EXC_FRAME_PRINT (   _out,
  _prefix,
  _frame 
)

Print the exception frame.

Function Documentation

◆ rtems_debugger_target_cache_sync()

int rtems_debugger_target_cache_sync ( rtems_debugger_target_swbreak swbreak)

Target instruction cache sync. This depends on the target but it normally means a data cache flush and an instruction cache invalidate.

◆ rtems_debugger_target_configure()

int rtems_debugger_target_configure ( rtems_debugger_target target)

Configure the target. This is architecture specific.

◆ rtems_debugger_target_disable()

int rtems_debugger_target_disable ( void  )

Disable the target.

◆ rtems_debugger_target_enable()

int rtems_debugger_target_enable ( void  )

Enable the target.

◆ rtems_debugger_target_exception_print()

void rtems_debugger_target_exception_print ( CPU_Exception_frame frame)

Print the target exception registers.

◆ rtems_debugger_target_exception_to_signal()

int rtems_debugger_target_exception_to_signal ( CPU_Exception_frame frame)

Return the signal for the exception.

◆ rtems_debugger_target_frame_pc()

uintptr_t rtems_debugger_target_frame_pc ( CPU_Exception_frame frame)

Return the frame's program counter (PC).

◆ rtems_debugger_target_hwbreak_control()

int rtems_debugger_target_hwbreak_control ( rtems_debugger_target_watchpoint  type,
bool  insert,
uintptr_t  addr,
DB_UINT  kind 
)

Hardware breakpoints.

◆ rtems_debugger_target_hwbreak_insert()

int rtems_debugger_target_hwbreak_insert ( void  )

Insert hardware breakpoints into the hardware.

◆ rtems_debugger_target_hwbreak_remove()

int rtems_debugger_target_hwbreak_remove ( void  )

Remove hardware breakpoints from the hardware.

◆ rtems_debugger_target_read_regs()

int rtems_debugger_target_read_regs ( rtems_debugger_thread thread)

Read the regosters.

◆ rtems_debugger_target_reg_pc()

uintptr_t rtems_debugger_target_reg_pc ( rtems_debugger_thread thread)

Return the thread's program counter (PC).

◆ rtems_debugger_target_reg_sp()

uintptr_t rtems_debugger_target_reg_sp ( rtems_debugger_thread thread)

Return the thread's stack pointer (SP).

◆ rtems_debugger_target_tcb_sp()

uintptr_t rtems_debugger_target_tcb_sp ( rtems_debugger_thread thread)

Return the thread's TCB stack pointer (SP).

◆ rtems_debugger_target_thread_stepping()

int rtems_debugger_target_thread_stepping ( rtems_debugger_thread thread)

The thread is stepping. Setup the thread to step an instruction.

◆ rtems_debugger_target_write_regs()

int rtems_debugger_target_write_regs ( rtems_debugger_thread thread)

Write the regosters.

Variable Documentation

◆ mb_ext

Initial value:
= {
.Callouts = { .thread_switch = mb_thread_switch }
}