home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / h / debugger < prev    next >
Encoding:
Text File  |  1994-09-07  |  2.6 KB  |  87 lines

  1. #ifndef debugger_H
  2. #define debugger_H
  3.  
  4. /* C header file for Debugger
  5.  * written by DefMod (Sep  7 1994) on Wed Sep  7 21:25:04 1994
  6.  * Copyright © Acorn Computers Ltd, 1994
  7.  */
  8.  
  9. /*************************************************************************
  10.  * This source file was written by Acorn Computers Limited. It is part   *
  11.  * of the OSLib library for writing applications for RISC OS. It may be  *
  12.  * used freely in the creation of programs for RISC OS.                  *
  13.  *************************************************************************/
  14.  
  15. #ifndef types_H
  16.    #include "types.h"
  17. #endif
  18.  
  19. #ifndef os_H
  20.    #include "os.h"
  21. #endif
  22.  
  23. /**********************************
  24.  * SWI names and SWI reason codes *
  25.  **********************************/
  26. #undef  Debugger_Disassemble
  27. #define Debugger_Disassemble                    0x40380
  28. #undef  XDebugger_Disassemble
  29. #define XDebugger_Disassemble                   0x60380
  30.  
  31. /************************
  32.  * Constant definitions *
  33.  ************************/
  34. #define error_DEBUG_BREAK_NOT_FOUND             0x800u
  35. #define error_DEBUG_INVALID_VALUE               0x801u
  36. #define error_DEBUG_RESETTING                   0x802u
  37. #define error_DEBUG_NO_ROOM                     0x803u
  38. #define error_DEBUG_NO_BREAKPOINTS              0x804u
  39. #define error_DEBUG_BAD_BREAKPOINT              0x805u
  40. #define error_DEBUG_UNDEFINED                   0x806u
  41. #define error_DEBUG_NON_ALIGNED                 0x807u
  42. #define error_DEBUG_NO_WORKSPACE                0x808u
  43.  
  44. /*************************
  45.  * Function declarations *
  46.  *************************/
  47.  
  48. #ifdef __cplusplus
  49.    extern "C" {
  50. #endif
  51.  
  52. /*************************************************************
  53.  * NOTE: The following functions provide direct access to    *
  54.  *       the SWI's noted in the function description.        *
  55.  *       Please read the relevant PRM section for more       *
  56.  *       information on their input/output parameters.       *
  57.  *************************************************************/
  58.  
  59. /* ------------------------------------------------------------------------
  60.  * Function:      debugger_disassemble()
  61.  *
  62.  * Description:   Disassembles an instruction
  63.  *
  64.  * Input:         instruction - value of R0 on entry
  65.  *                address - value of R1 on entry
  66.  *
  67.  * Output:        disassembly - value of R1 on exit
  68.  *                used - value of R2 on exit
  69.  *
  70.  * Other notes:   Calls SWI 0x40380.
  71.  */
  72.  
  73. extern os_error *xdebugger_disassemble (int instruction,
  74.       int *address,
  75.       char **disassembly,
  76.       int *used);
  77. extern void debugger_disassemble (int instruction,
  78.       int *address,
  79.       char **disassembly,
  80.       int *used);
  81.  
  82. #ifdef __cplusplus
  83.    }
  84. #endif
  85.  
  86. #endif
  87.