2013-05-10 Phil Muldoon <pmuldoon@redhat.com>
[deliverable/binutils-gdb.git] / gdb / python / python.h
index 24e3077a003c52b898bfb46275a2cc370d7b466a..1a1e5c233428e2bf586f9e82df994d021c171877 100644 (file)
@@ -21,6 +21,7 @@
 #define GDB_PYTHON_H
 
 #include "value.h"
+#include "mi/mi-cmds.h"
 
 struct breakpoint_object;
 
@@ -28,6 +29,66 @@ struct breakpoint_object;
    E.g. When the program loads libfoo.so, look for libfoo-gdb.py.  */
 #define GDBPY_AUTO_FILE_NAME "-gdb.py"
 
+/* Python frame-filter status return values.  */
+enum py_bt_status
+  {
+    /* Return when an error has occurred in processing frame filters,
+       or when printing the stack.  */
+    PY_BT_ERROR = -1,
+
+    /* Return from internal routines to indicate that the function
+       succeeded.  */
+    PY_BT_OK = 1,
+
+    /* Return when the frame filter process is complete, and all
+       operations have succeeded.  */
+    PY_BT_COMPLETED = 2,
+
+    /* Return when the frame filter process is complete, but there
+       were no filter registered and enabled to process. */
+    PY_BT_NO_FILTERS = 3
+  };
+
+/* Flags to pass to apply_frame_filter.  */
+
+enum frame_filter_flags
+  {
+    /* Set this flag if frame level is to be printed.  */
+    PRINT_LEVEL = 1,
+
+    /* Set this flag if frame information is to be printed.  */
+    PRINT_FRAME_INFO = 2,
+
+    /* Set this flag if frame arguments are to be printed.  */
+    PRINT_ARGS = 4,
+
+    /* Set this flag if frame locals are to be printed.  */
+    PRINT_LOCALS = 8,
+  };
+
+/* A choice of the different frame argument printing strategies that
+   can occur in different cases of frame filter instantiation.  */
+typedef enum py_frame_args
+{
+  /* Print no values for arguments when invoked from the MI. */
+  NO_VALUES = PRINT_NO_VALUES,
+
+  MI_PRINT_ALL_VALUES = PRINT_ALL_VALUES,
+
+  /* Print only simple values (what MI defines as "simple") for
+     arguments when invoked from the MI. */
+  MI_PRINT_SIMPLE_VALUES = PRINT_SIMPLE_VALUES,
+
+
+  /* Print only scalar values for arguments when invoked from the
+     CLI. */
+  CLI_SCALAR_VALUES,
+
+  /* Print all values for arguments when invoked from the
+     CLI. */
+  CLI_ALL_VALUES
+} py_frame_args;
+
 extern void finish_python_initialization (void);
 
 void eval_python_from_control_command (struct command_line *);
@@ -41,6 +102,11 @@ int apply_val_pretty_printer (struct type *type, const gdb_byte *valaddr,
                              const struct value_print_options *options,
                              const struct language_defn *language);
 
+enum py_bt_status apply_frame_filter (struct frame_info *frame, int flags,
+                                     enum py_frame_args args_type,
+                                     struct ui_out *out, int frame_low,
+                                     int frame_high);
+
 void preserve_python_values (struct objfile *objfile, htab_t copied_types);
 
 void gdbpy_load_auto_scripts_for_objfile (struct objfile *objfile);
This page took 0.031609 seconds and 4 git commands to generate.