Ignore:
Timestamp:
2011-07-12T13:41:26Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
50fc490
Parents:
11809eab (diff), 6817eba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge libposix changes.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips64/include/debugger.h

    r11809eab r1916d1f  
    11/*
    2  * Copyright (c) 2006 Jakub Jermar
     2 * Copyright (c) 2005 Ondrej Palkovsky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 #ifndef KERN_FHC_H_
    30 #define KERN_FHC_H_
     29/** @addtogroup mips64
     30 * @{
     31 */
     32/** @file
     33 */
    3134
    32 #include <genarch/ofw/ofw_tree.h>
    33 #include <typedefs.h>
    34 #include <ddi/irq.h>
     35#ifndef KERN_mips64_DEBUGGER_H_
     36#define KERN_mips64_DEBUGGER_H_
     37
     38#include <arch/exception.h>
    3539#include <typedefs.h>
    3640
    37 typedef struct {
    38         uint64_t addr;
    39         uint32_t size;
    40 } __attribute__ ((packed)) ofw_fhc_reg_t;
     41#define BKPOINTS_MAX  10
    4142
    42 typedef struct {
    43         uint64_t child_base;
    44         uint64_t parent_base;
    45         uint32_t size;
    46 } __attribute__ ((packed)) ofw_fhc_range_t;
     43/** Breakpoint was shot */
     44#define BKPOINT_INPROG  (1 << 0)
    4745
    48 typedef struct {
    49         uint64_t addr;
    50         uint32_t size;
    51 } __attribute__ ((packed)) ofw_central_reg_t;
     46/** One-time breakpoint, mandatory for j/b instructions */
     47#define BKPOINT_ONESHOT  (1 << 1)
    5248
    53 typedef struct {
    54         uint64_t child_base;
    55         uint64_t parent_base;
    56         uint32_t size;
    57 } __attribute__ ((packed)) ofw_central_range_t;
     49/**
     50 * Breakpoint is set on the next instruction, so that it
     51 * could be reinstalled on the previous one
     52 */
     53#define BKPOINT_REINST  (1 << 2)
    5854
    59 extern bool ofw_fhc_apply_ranges(ofw_tree_node_t *, ofw_fhc_reg_t *,
    60     uintptr_t *);
    61 extern bool ofw_central_apply_ranges(ofw_tree_node_t *, ofw_central_reg_t *,
    62     uintptr_t *);
     55/** Call a predefined function */
     56#define BKPOINT_FUNCCALL  (1 << 3)
    6357
    64 extern bool ofw_fhc_map_interrupt(ofw_tree_node_t *, ofw_fhc_reg_t *,
    65     uint32_t, int *, cir_t *, void **);
     58
     59typedef struct  {
     60        uintptr_t address;         /**< Breakpoint address */
     61        sysarg_t instruction;      /**< Original instruction */
     62        sysarg_t nextinstruction;  /**< Original instruction following break */
     63        unsigned int flags;        /**< Flags regarding breakpoint */
     64        size_t counter;
     65        void (*bkfunc)(void *, istate_t *);
     66} bpinfo_t;
     67
     68extern bpinfo_t breakpoints[BKPOINTS_MAX];
     69
     70extern bool is_jump(sysarg_t);
     71
     72extern void debugger_init(void);
     73extern void debugger_bpoint(istate_t *);
    6674
    6775#endif
     76
     77/** @}
     78 */
Note: See TracChangeset for help on using the changeset viewer.