Rename breakpoint_object to gdbpy_breakpoint_object.
[deliverable/binutils-gdb.git] / gdb / python / python.h
CommitLineData
d57a3c85
TJB
1/* Python/gdb header for generic use in gdb
2
28e7fd62 3 Copyright (C) 2008-2013 Free Software Foundation, Inc.
d57a3c85
TJB
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20#ifndef GDB_PYTHON_H
21#define GDB_PYTHON_H
22
23#include "value.h"
1e611234 24#include "mi/mi-cmds.h"
d57a3c85 25
4cb0213d 26struct gdbpy_breakpoint_object;
7371cf6d 27
9a950c7c
JK
28/* The suffix of per-objfile scripts to auto-load.
29 E.g. When the program loads libfoo.so, look for libfoo-gdb.py. */
30#define GDBPY_AUTO_FILE_NAME "-gdb.py"
31
1e611234
PM
32/* Python frame-filter status return values. */
33enum py_bt_status
34 {
35 /* Return when an error has occurred in processing frame filters,
36 or when printing the stack. */
37 PY_BT_ERROR = -1,
38
39 /* Return from internal routines to indicate that the function
40 succeeded. */
41 PY_BT_OK = 1,
42
43 /* Return when the frame filter process is complete, and all
44 operations have succeeded. */
45 PY_BT_COMPLETED = 2,
46
47 /* Return when the frame filter process is complete, but there
48 were no filter registered and enabled to process. */
49 PY_BT_NO_FILTERS = 3
50 };
51
52/* Flags to pass to apply_frame_filter. */
53
54enum frame_filter_flags
55 {
56 /* Set this flag if frame level is to be printed. */
57 PRINT_LEVEL = 1,
58
59 /* Set this flag if frame information is to be printed. */
60 PRINT_FRAME_INFO = 2,
61
62 /* Set this flag if frame arguments are to be printed. */
63 PRINT_ARGS = 4,
64
65 /* Set this flag if frame locals are to be printed. */
66 PRINT_LOCALS = 8,
67 };
68
69/* A choice of the different frame argument printing strategies that
70 can occur in different cases of frame filter instantiation. */
71typedef enum py_frame_args
72{
73 /* Print no values for arguments when invoked from the MI. */
74 NO_VALUES = PRINT_NO_VALUES,
75
76 MI_PRINT_ALL_VALUES = PRINT_ALL_VALUES,
77
78 /* Print only simple values (what MI defines as "simple") for
79 arguments when invoked from the MI. */
80 MI_PRINT_SIMPLE_VALUES = PRINT_SIMPLE_VALUES,
81
82
83 /* Print only scalar values for arguments when invoked from the
84 CLI. */
85 CLI_SCALAR_VALUES,
86
87 /* Print all values for arguments when invoked from the
88 CLI. */
89 CLI_ALL_VALUES
90} py_frame_args;
91
9dea9163
DE
92extern void finish_python_initialization (void);
93
d57a3c85
TJB
94void eval_python_from_control_command (struct command_line *);
95
4c63965b 96void source_python_script (FILE *file, const char *filename);
973817a3 97
a6bac58e
TT
98int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
99 int embedded_offset, CORE_ADDR address,
100 struct ui_file *stream, int recurse,
0e03807e 101 const struct value *val,
a6bac58e
TT
102 const struct value_print_options *options,
103 const struct language_defn *language);
104
1e611234
PM
105enum py_bt_status apply_frame_filter (struct frame_info *frame, int flags,
106 enum py_frame_args args_type,
107 struct ui_out *out, int frame_low,
108 int frame_high);
109
4e7a5ef5
TT
110void preserve_python_values (struct objfile *objfile, htab_t copied_types);
111
bf88dd68 112void gdbpy_load_auto_scripts_for_objfile (struct objfile *objfile);
88a1906b 113
4cb0213d 114int gdbpy_should_stop (struct gdbpy_breakpoint_object *bp_obj);
7371cf6d 115
4cb0213d 116int gdbpy_breakpoint_has_py_cond (struct gdbpy_breakpoint_object *bp_obj);
7371cf6d 117
18a9fc12
TT
118void *start_type_printers (void);
119
120char *apply_type_printers (void *, struct type *type);
121
122void free_type_printers (void *arg);
123
d57a3c85 124#endif /* GDB_PYTHON_H */
This page took 0.534542 seconds and 4 git commands to generate.