OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [gdb/] [gdb-events.h] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
/* User Interface Events.
2
   Copyright 1999, 2001 Free Software Foundation, Inc.
3
 
4
   Contributed by Cygnus Solutions.
5
 
6
   This file is part of GDB.
7
 
8
   This program is free software; you can redistribute it and/or modify
9
   it under the terms of the GNU General Public License as published by
10
   the Free Software Foundation; either version 2 of the License, or
11
   (at your option) any later version.
12
 
13
   This program is distributed in the hope that it will be useful,
14
   but WITHOUT ANY WARRANTY; without even the implied warranty of
15
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
   GNU General Public License for more details.
17
 
18
   You should have received a copy of the GNU General Public License
19
   along with this program; if not, write to the Free Software
20
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
21
 
22
/* Work in progress */
23
 
24
/* This file was created with the aid of ``gdb-events.sh''.
25
 
26
   The bourn shell script ``gdb-events.sh'' creates the files
27
   ``new-gdb-events.c'' and ``new-gdb-events.h and then compares
28
   them against the existing ``gdb-events.[hc]''.  Any differences
29
   found being reported.
30
 
31
   If editing this file, please also run gdb-events.sh and merge any
32
   changes into that script. Conversely, when making sweeping changes
33
   to this file, modifying gdb-events.sh and using its output may
34
   prove easier. */
35
 
36
 
37
#ifndef GDB_EVENTS_H
38
#define GDB_EVENTS_H
39
 
40
#ifndef WITH_GDB_EVENTS
41
#define WITH_GDB_EVENTS 1
42
#endif
43
 
44
 
45
/* COMPAT: pointer variables for old, unconverted events.
46
   A call to set_gdb_events() will automatically update these. */
47
 
48
 
49
 
50
/* Type definition of all hook functions.
51
   Recommended pratice is to first declare each hook function using
52
   the below ftype and then define it. */
53
 
54
typedef void (gdb_events_breakpoint_create_ftype) (int b);
55
typedef void (gdb_events_breakpoint_delete_ftype) (int b);
56
typedef void (gdb_events_breakpoint_modify_ftype) (int b);
57
typedef void (gdb_events_tracepoint_create_ftype) (int number);
58
typedef void (gdb_events_tracepoint_delete_ftype) (int number);
59
typedef void (gdb_events_tracepoint_modify_ftype) (int number);
60
 
61
 
62
/* gdb-events: object. */
63
 
64
struct gdb_events
65
  {
66
    gdb_events_breakpoint_create_ftype *breakpoint_create;
67
    gdb_events_breakpoint_delete_ftype *breakpoint_delete;
68
    gdb_events_breakpoint_modify_ftype *breakpoint_modify;
69
    gdb_events_tracepoint_create_ftype *tracepoint_create;
70
    gdb_events_tracepoint_delete_ftype *tracepoint_delete;
71
    gdb_events_tracepoint_modify_ftype *tracepoint_modify;
72
  };
73
 
74
 
75
/* Interface into events functions.
76
   Where a *_p() predicate is present, it must be called before
77
   calling the hook proper. */
78
extern void breakpoint_create_event (int b);
79
extern void breakpoint_delete_event (int b);
80
extern void breakpoint_modify_event (int b);
81
extern void tracepoint_create_event (int number);
82
extern void tracepoint_delete_event (int number);
83
extern void tracepoint_modify_event (int number);
84
 
85
 
86
/* When GDB_EVENTS are not being used, completly disable them. */
87
 
88
#if !WITH_GDB_EVENTS
89
#define breakpoint_create_event(b) 0
90
#define breakpoint_delete_event(b) 0
91
#define breakpoint_modify_event(b) 0
92
#define tracepoint_create_event(number) 0
93
#define tracepoint_delete_event(number) 0
94
#define tracepoint_modify_event(number) 0
95
#endif
96
 
97
/* Install custom gdb-events hooks. */
98
extern struct gdb_events *set_gdb_event_hooks (struct gdb_events *vector);
99
 
100
/* Deliver any pending events. */
101
extern void gdb_events_deliver (struct gdb_events *vector);
102
 
103
#if !WITH_GDB_EVENTS
104
#define set_gdb_events(x) 0
105
#define set_gdb_event_hooks(x) 0
106
#define gdb_events_deliver(x) 0
107
#endif
108
 
109
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.