gdb_interface.h
1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Copyright (C) 1996-1998 by the Board of Trustees
* of Leland Stanford Junior University.
*
* This file is part of the SimOS distribution.
* See LICENSE file for terms of the license.
*
*/
/*
* simdebug.h - Interface to debugger
*/
#ifndef SIMDEBUG_H
#define SIMDEBUG_H
typedef enum Simdebug_result {
SD_CONTINUE = -2,
SD_NEXTI_ANYCPU = -1
} Simdebug_result;
/*
* Return values from Simdebug_run:
* SD_CONTINUE run free
* SD_NEXTI_ANYCPU execute one instruction, stop before next instruction
* on any cpu is executed
* val >= 0 execute one instruction, stop before next inst
* on cpu <returnval> is executed
*
* the 'sig' argument specifies what signal you stopped on. If this
* doesn't make sense for a given CPU simulator, use SIGTRAP for a breakpoint
* or singlestep completion and SIGUSR2 for a interrupt that knocked you
* into the debugger.
*
* the 'cpunum' argument indicates which cpu to focus the debugger on
* when it starts up
*/
extern Simdebug_result Simdebug_run(int sig, int cpunum);
extern void Simdebug_init(void);
/*
* someone needs to poll the gdb connection if it is open in case
* the user types ^C. This is currently piggy-backed onto the
* select polling done by the Visual control subsystem.
*/
extern int Simdebug_pollfd(void); /* returns fd number or -1 */
extern void Simdebug_fdactive(void); /* call this if select() on that fd
* shows data available
*/
#endif /* SIMDEBUG_H */