source: rtems/cpukit/libmisc/serdbg/serdbg.h @ 764e0a75

4.115
Last change on this file since 764e0a75 was 764e0a75, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/09/11 at 03:59:21

2011-10-09 Ralf Corsépius <ralf.corsepius@…>

  • libmisc/serdbg/serdbg.h (putDebugChar, getDebugChar): Remove duplicate decls.
  • Property mode set to 100644
File size: 7.5 KB
Line 
1/*===============================================================*\
2| Project: RTEMS remote gdb over serial line                      |
3+-----------------------------------------------------------------+
4| File: serdbg.h                                                  |
5+-----------------------------------------------------------------+
6|                    Copyright (c) 2002 IMD                       |
7|      Ingenieurbuero fuer Microcomputertechnik Th. Doerfler      |
8|               <Thomas.Doerfler@imd-systems.de>                  |
9|                       all rights reserved                       |
10+-----------------------------------------------------------------+
11| this file declares intialization functions to add               |
12| a gdb remote debug stub to an RTEMS system                      |
13|                                                                 |
14+-----------------------------------------------------------------+
15|   date                      history                        ID   |
16| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
17| 04.04.02  creation                                         doe  |
18\*===============================================================*/
19/*
20 * $Id$
21 */
22#ifndef _SERDBG_H
23#define _SERDBG_H
24
25#include <rtems.h>
26#include <termios.h>
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32typedef struct {
33  uint32_t   baudrate;      /* debug baud rate, e.g. 57600            */
34  void (*callout)(void);    /* callout pointer during polling         */
35  int  (*open_io)(const char *dev_name, uint32_t baudrate); /* I/O open fnc */
36  const char *devname;      /* debug device, e.g. "/dev/tty01"        */
37  bool      skip_init_bkpt; /* if TRUE, do not stop when initializing */
38} serdbg_conf_t;
39
40/*
41 * must be defined in init module...
42 */
43extern serdbg_conf_t serdbg_conf;
44
45
46/*=========================================================================*\
47| Function:                                                                 |
48\*-------------------------------------------------------------------------*/
49void putDebugChar
50(
51/*-------------------------------------------------------------------------*\
52| Purpose:                                                                  |
53|   send character to remote debugger                                       |
54+---------------------------------------------------------------------------+
55| Input Parameters:                                                         |
56\*-------------------------------------------------------------------------*/
57 char        c                          /* char to send                    */
58 );
59/*-------------------------------------------------------------------------*\
60| Return Value:                                                             |
61|    <none>                                                                 |
62\*=========================================================================*/
63
64/*=========================================================================*\
65| Function:                                                                 |
66\*-------------------------------------------------------------------------*/
67int getDebugChar
68(
69/*-------------------------------------------------------------------------*\
70| Purpose:                                                                  |
71|   get character from remote debugger                                      |
72+---------------------------------------------------------------------------+
73| Input Parameters:                                                         |
74\*-------------------------------------------------------------------------*/
75 void                                   /* <none>                          */
76 );
77/*-------------------------------------------------------------------------*\
78| Return Value:                                                             |
79|    <none>                                                                 |
80\*=========================================================================*/
81
82/*=========================================================================*\
83| Function:                                                                 |
84\*-------------------------------------------------------------------------*/
85void serdbg_exceptionHandler
86(
87/*-------------------------------------------------------------------------*\
88| Purpose:                                                                  |
89|   hook directly to an exception vector                                    |
90+---------------------------------------------------------------------------+
91| Input Parameters:                                                         |
92\*-------------------------------------------------------------------------*/
93 int vecnum,                            /* vector index to hook at         */
94 void *vector                           /* address of handler function     */
95 );
96/*-------------------------------------------------------------------------*\
97| Return Value:                                                             |
98|    <none>                                                                 |
99\*=========================================================================*/
100
101/*=========================================================================*\
102| Function:                                                                 |
103\*-------------------------------------------------------------------------*/
104int serdbg_init
105(
106/*-------------------------------------------------------------------------*\
107| Purpose:                                                                  |
108|   initialize remote gdb session over serial line                          |
109+---------------------------------------------------------------------------+
110| Input Parameters:                                                         |
111\*-------------------------------------------------------------------------*/
112 void
113 );
114/*-------------------------------------------------------------------------*\
115| Return Value:                                                             |
116|    rtems_status_code                                                      |
117\*=========================================================================*/
118
119/*
120 * stuff from serdbgio.c
121 */
122/*=========================================================================*\
123| Function:                                                                 |
124\*-------------------------------------------------------------------------*/
125int serdbg_open
126
127/*-------------------------------------------------------------------------*\
128| Purpose:                                                                  |
129|    try to open given serial debug port                                    |
130+---------------------------------------------------------------------------+
131| Input Parameters:                                                         |
132\*-------------------------------------------------------------------------*/
133(
134 const char *dev_name, /* name of device to open */
135 uint32_t   baudrate   /* baud rate to use       */
136 );
137/*-------------------------------------------------------------------------*\
138| Return Value:                                                             |
139|    0 on success, -1 and errno otherwise                                   |
140\*=========================================================================*/
141
142/*
143 * Assumed to be provided by the BSP
144 */
145extern void set_debug_traps(void);
146extern void breakpoint(void);
147#ifdef __cplusplus
148}
149#endif
150
151#endif /* _SERDBG_H */
Note: See TracBrowser for help on using the repository browser.