1 /* Python/gdb header for generic use in gdb
3 Copyright (C) 2008-2014 Free Software Foundation, Inc.
5 This file is part of GDB.
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.
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.
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/>. */
24 #include "mi/mi-cmds.h"
26 struct gdbpy_breakpoint_object
;
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"
32 /* Python frame-filter status return values. */
35 /* Return when an error has occurred in processing frame filters,
36 or when printing the stack. */
39 /* Return from internal routines to indicate that the function
43 /* Return when the frame filter process is complete, and all
44 operations have succeeded. */
47 /* Return when the frame filter process is complete, but there
48 were no filter registered and enabled to process. */
52 /* Flags to pass to apply_frame_filter. */
54 enum frame_filter_flags
56 /* Set this flag if frame level is to be printed. */
59 /* Set this flag if frame information is to be printed. */
62 /* Set this flag if frame arguments are to be printed. */
65 /* Set this flag if frame locals are to be printed. */
69 /* A choice of the different frame argument printing strategies that
70 can occur in different cases of frame filter instantiation. */
71 typedef enum py_frame_args
73 /* Print no values for arguments when invoked from the MI. */
74 NO_VALUES
= PRINT_NO_VALUES
,
76 MI_PRINT_ALL_VALUES
= PRINT_ALL_VALUES
,
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
,
83 /* Print only scalar values for arguments when invoked from the
87 /* Print all values for arguments when invoked from the
92 /* Returns true if Python support is built into GDB, false
105 extern void finish_python_initialization (void);
107 void eval_python_from_control_command (struct command_line
*);
109 void source_python_script (FILE *file
, const char *filename
);
111 int apply_val_pretty_printer (struct type
*type
, const gdb_byte
*valaddr
,
112 int embedded_offset
, CORE_ADDR address
,
113 struct ui_file
*stream
, int recurse
,
114 const struct value
*val
,
115 const struct value_print_options
*options
,
116 const struct language_defn
*language
);
118 enum py_bt_status
apply_frame_filter (struct frame_info
*frame
, int flags
,
119 enum py_frame_args args_type
,
120 struct ui_out
*out
, int frame_low
,
123 void preserve_python_values (struct objfile
*objfile
, htab_t copied_types
);
125 const struct script_language
*gdbpy_script_language_defn (void);
127 int gdbpy_should_stop (struct gdbpy_breakpoint_object
*bp_obj
);
129 int gdbpy_breakpoint_has_py_cond (struct gdbpy_breakpoint_object
*bp_obj
);
131 void *start_type_printers (void);
133 char *apply_type_printers (void *, struct type
*type
);
135 void free_type_printers (void *arg
);
137 #endif /* GDB_PYTHON_H */
This page took 0.032914 seconds and 5 git commands to generate.