15796c8dcSSimon Schubert /* Python/gdb header for generic use in gdb 25796c8dcSSimon Schubert 3*ef5ccd6cSJohn Marino Copyright (C) 2008-2013 Free Software Foundation, Inc. 45796c8dcSSimon Schubert 55796c8dcSSimon Schubert This file is part of GDB. 65796c8dcSSimon Schubert 75796c8dcSSimon Schubert This program is free software; you can redistribute it and/or modify 85796c8dcSSimon Schubert it under the terms of the GNU General Public License as published by 95796c8dcSSimon Schubert the Free Software Foundation; either version 3 of the License, or 105796c8dcSSimon Schubert (at your option) any later version. 115796c8dcSSimon Schubert 125796c8dcSSimon Schubert This program is distributed in the hope that it will be useful, 135796c8dcSSimon Schubert but WITHOUT ANY WARRANTY; without even the implied warranty of 145796c8dcSSimon Schubert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 155796c8dcSSimon Schubert GNU General Public License for more details. 165796c8dcSSimon Schubert 175796c8dcSSimon Schubert You should have received a copy of the GNU General Public License 185796c8dcSSimon Schubert along with this program. If not, see <http://www.gnu.org/licenses/>. */ 195796c8dcSSimon Schubert 205796c8dcSSimon Schubert #ifndef GDB_PYTHON_H 215796c8dcSSimon Schubert #define GDB_PYTHON_H 225796c8dcSSimon Schubert 235796c8dcSSimon Schubert #include "value.h" 245796c8dcSSimon Schubert 25c50c785cSJohn Marino struct breakpoint_object; 26c50c785cSJohn Marino 27*ef5ccd6cSJohn Marino /* The suffix of per-objfile scripts to auto-load. 28*ef5ccd6cSJohn Marino E.g. When the program loads libfoo.so, look for libfoo-gdb.py. */ 29*ef5ccd6cSJohn Marino #define GDBPY_AUTO_FILE_NAME "-gdb.py" 30cf7f2e2dSJohn Marino 31c50c785cSJohn Marino extern void finish_python_initialization (void); 32c50c785cSJohn Marino 335796c8dcSSimon Schubert void eval_python_from_control_command (struct command_line *); 345796c8dcSSimon Schubert 35*ef5ccd6cSJohn Marino void source_python_script (FILE *file, const char *filename); 36cf7f2e2dSJohn Marino 375796c8dcSSimon Schubert int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr, 385796c8dcSSimon Schubert int embedded_offset, CORE_ADDR address, 395796c8dcSSimon Schubert struct ui_file *stream, int recurse, 40cf7f2e2dSJohn Marino const struct value *val, 415796c8dcSSimon Schubert const struct value_print_options *options, 425796c8dcSSimon Schubert const struct language_defn *language); 435796c8dcSSimon Schubert 445796c8dcSSimon Schubert void preserve_python_values (struct objfile *objfile, htab_t copied_types); 455796c8dcSSimon Schubert 46*ef5ccd6cSJohn Marino void gdbpy_load_auto_scripts_for_objfile (struct objfile *objfile); 47cf7f2e2dSJohn Marino 48c50c785cSJohn Marino int gdbpy_should_stop (struct breakpoint_object *bp_obj); 49c50c785cSJohn Marino 50c50c785cSJohn Marino int gdbpy_breakpoint_has_py_cond (struct breakpoint_object *bp_obj); 51c50c785cSJohn Marino 52*ef5ccd6cSJohn Marino void *start_type_printers (void); 53*ef5ccd6cSJohn Marino 54*ef5ccd6cSJohn Marino char *apply_type_printers (void *, struct type *type); 55*ef5ccd6cSJohn Marino 56*ef5ccd6cSJohn Marino void free_type_printers (void *arg); 57*ef5ccd6cSJohn Marino 585796c8dcSSimon Schubert #endif /* GDB_PYTHON_H */ 59