} \
} while (0)
-extern PyTypeObject arch_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("arch_object");
+extern PyTypeObject arch_object_type;
/* Associates an arch_object with GDBARCH as gdbarch_data via the gdbarch
post init registration mechanism (gdbarch_data_register_post_init). */
/* Initializes the Architecture class in the gdb module. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_arch (void)
+static int
+gdbpy_initialize_arch ()
{
arch_object_type.tp_new = PyType_GenericNew;
return gdbpy_type_ready (&arch_object_type);
&extension_language_python);
}
\f
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_auto_load (void)
+static int
+gdbpy_initialize_auto_load ()
{
add_setshow_boolean_cmd ("python-scripts", class_support,
&auto_load_python_scripts, _("\
} \
} while (0)
-extern PyTypeObject block_syms_iterator_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("block_syms_iterator_object");
+extern PyTypeObject block_syms_iterator_object_type;
static const registry<objfile>::key<htab, htab_deleter>
blpy_objfile_data_key;
return PyBool_FromLong (equal == expected);
}
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_blocks (void)
+static int
+gdbpy_initialize_blocks ()
{
block_object_type.tp_new = PyType_GenericNew;
if (gdbpy_type_ready (&block_object_type) < 0)
#include "linespec.h"
#include "gdbsupport/common-utils.h"
-extern PyTypeObject breakpoint_location_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("breakpoint_location_object");
+extern PyTypeObject breakpoint_location_object_type;
struct gdbpy_breakpoint_location_object
{
\f
/* Initialize the Python breakpoint code. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_breakpoints (void)
+static int
+gdbpy_initialize_breakpoints ()
{
int i;
/* Initialize the Python BreakpointLocation code. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
+static int
gdbpy_initialize_breakpoint_locations ()
{
return gdbpy_type_ready (&breakpoint_location_object_type);
struct cmd_list_element *sub_list;
};
-extern PyTypeObject cmdpy_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("cmdpy_object");
+extern PyTypeObject cmdpy_object_type;
/* Constants used by this module. */
static PyObject *invoke_cst;
/* Initialize the 'commands' code. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_commands (void)
+static int
+gdbpy_initialize_commands ()
{
int i;
struct process_stratum_target *target;
};
-extern PyTypeObject connection_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("connection_object");
+extern PyTypeObject connection_object_type;
-extern PyTypeObject remote_connection_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("remote_connection_object");
+extern PyTypeObject remote_connection_object_type;
/* Require that CONNECTION be valid. */
#define CONNPY_REQUIRE_VALID(connection) \
/* Python specific initialization for this file. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_connection (void)
+static int
+gdbpy_initialize_connection ()
{
if (gdbpy_type_ready (&connection_object_type) < 0)
return -1;
PyObject *mapped_files;
};
-extern PyTypeObject corefile_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("corefile_object");
+extern PyTypeObject corefile_object_type;
/* A gdb.CorefileMapped object. */
bool is_main_exec_p;
};
-extern PyTypeObject corefile_mapped_file_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("corefile_mapped_file_object");
+extern PyTypeObject corefile_mapped_file_object_type;
/* A gdb.CorefileMappedFileRegion object. */
ULONGEST file_offset;
};
-extern PyTypeObject corefile_mapped_file_region_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("corefile_mapped_file_region_object");
+extern PyTypeObject corefile_mapped_file_region_object_type;
/* Clear the inferior pointer in a Corefile object OBJ when an inferior is
deleted. */
struct disasm_info_object *next;
};
-extern PyTypeObject disasm_info_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("disasm_info_object");
+extern PyTypeObject disasm_info_object_type;
/* Implement gdb.disassembler.DisassembleAddressPart type. An object of
this type represents a small part of a disassembled instruction; a part
struct gdbarch *gdbarch;
};
-extern PyTypeObject disasm_addr_part_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("disasm_addr_part_object");
+extern PyTypeObject disasm_addr_part_object_type;
/* Implement gdb.disassembler.DisassembleTextPart type. An object of
this type represents a small part of a disassembled instruction; a part
enum disassembler_style style;
};
-extern PyTypeObject disasm_text_part_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("disasm_text_part_object");
+extern PyTypeObject disasm_text_part_object_type;
-extern PyTypeObject disasm_part_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("PyObject");
+extern PyTypeObject disasm_part_object_type;
/* Implement gdb.disassembler.DisassemblerResult type, an object that holds
the result of calling the disassembler. This is mostly the length of
std::vector<gdbpy_ref<>> *parts;
};
-extern PyTypeObject disasm_result_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("disasm_result_object");
+extern PyTypeObject disasm_result_object_type;
/* When this is false we fast path out of gdbpy_print_insn, which should
keep the performance impact of the Python disassembler down. This is
/* Called to initialize the Python structures in this file. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
+static int
gdbpy_initialize_disasm ()
{
/* Create the _gdb.disassembler module, and add it to the _gdb module. */
/* Initialize the Python event code. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_event (void)
+static int
+gdbpy_initialize_event ()
{
return gdbpy_type_ready (&event_object_type);
}
/* Declare all event types. */
#define GDB_PY_DEFINE_EVENT_TYPE(name, py_name, doc, base) \
- extern PyTypeObject name##_event_object_type \
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
+ extern PyTypeObject name##_event_object_type;
#include "py-event-types.def"
#undef GDB_PY_DEFINE_EVENT_TYPE
extern void evpy_dealloc (PyObject *self);
extern int evpy_add_attribute (PyObject *event,
- const char *name, PyObject *attr)
- CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
+ const char *name, PyObject *attr);
#endif /* GDB_PYTHON_PY_EVENT_H */
events_object gdb_py_events;
-extern PyTypeObject eventregistry_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("eventregistry_object");
+extern PyTypeObject eventregistry_object_type;
/* Implementation of EventRegistry.connect () -> NULL.
Add FUNCTION to the list of listeners. */
/* Initialize the Python event registry code. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_eventregistry (void)
+static int
+gdbpy_initialize_eventregistry ()
{
return gdbpy_type_ready (&eventregistry_object_type);
}
/* Helper function to add a single event registry to the events
module. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
+static int
add_new_registry (eventregistry_object **registryp, const char *name)
{
*registryp = create_eventregistry_object ();
struct frame_id initiating_frame;
};
-extern PyTypeObject finish_breakpoint_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("finish_breakpoint_object");
+extern PyTypeObject finish_breakpoint_object_type;
/* Python function to get the 'return_value' attribute of
FinishBreakpoint. */
/* Initialize the Python finish breakpoint code. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_finishbreakpoints (void)
+static int
+gdbpy_initialize_finishbreakpoints ()
{
if (!gdbpy_breakpoint_init_breakpoint_type ())
return -1;
/* Sets up the Frame API in the gdb module. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_frames (void)
+static int
+gdbpy_initialize_frames ()
{
frame_object_type.tp_new = PyType_GenericNew;
if (gdbpy_type_ready (&frame_object_type) < 0)
#include "expression.h"
#include "language.h"
-extern PyTypeObject fnpy_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("PyObject");
+extern PyTypeObject fnpy_object_type;
\f
/* Initialize internal function support. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_functions (void)
+static int
+gdbpy_initialize_functions ()
{
fnpy_object_type.tp_new = PyType_GenericNew;
return gdbpy_type_ready (&fnpy_object_type);
/* Initialize Python readline support. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_gdb_readline (void)
+static int
+gdbpy_initialize_gdb_readline ()
{
/* Python's readline module conflicts with GDB's use of readline
since readline is not reentrant. Ideally, a reentrant wrapper to
PyObject *dict;
};
-extern PyTypeObject inferior_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("inferior_object");
+extern PyTypeObject inferior_object_type;
/* Deleter to clean up when an inferior is removed. */
struct infpy_deleter
inferior_to_inferior_object (current_inferior ()).release ());
}
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_inferior (void)
+static int
+gdbpy_initialize_inferior ()
{
if (gdbpy_type_ready (&inferior_object_type) < 0)
return -1;
#include "inferior.h"
#include "python-internal.h"
-extern PyTypeObject thread_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("thread_object");
+extern PyTypeObject thread_object_type;
/* Require that INFERIOR be a valid inferior ID. */
#define THPY_REQUIRE_VALID(Thread) \
Py_RETURN_NONE;
}
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_thread (void)
+static int
+gdbpy_initialize_thread ()
{
return gdbpy_type_ready (&thread_object_type);
}
/* Sets up the gdb.Instruction type. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_instruction (void)
+static int
+gdbpy_initialize_instruction ()
{
if (py_insn_get_insn_type () == nullptr)
return -1;
PyObject *type;
};
-extern PyTypeObject lazy_string_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("lazy_string_object");
+extern PyTypeObject lazy_string_object_type;
static PyObject *
stpy_get_address (PyObject *self, void *closure)
return (PyObject *) str_obj;
}
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_lazy_string (void)
+static int
+gdbpy_initialize_lazy_string ()
{
return gdbpy_type_ready (&lazy_string_object_type);
}
CORE_ADDR pc;
};
-extern PyTypeObject linetable_entry_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("linetable_entry_object");
+extern PyTypeObject linetable_entry_object_type;
struct linetable_object {
PyObject_HEAD
PyObject *symtab;
};
-extern PyTypeObject linetable_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("linetable_object");
+extern PyTypeObject linetable_object_type;
struct ltpy_iterator_object {
PyObject_HEAD
PyObject *source;
};
-extern PyTypeObject ltpy_iterator_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("ltpy_iterator_object");
+extern PyTypeObject ltpy_iterator_object_type;
/* Internal helper function to extract gdb.Symtab from a gdb.LineTable
object. */
/* Initialize LineTable, LineTableEntry and LineTableIterator
objects. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_linetable (void)
+static int
+gdbpy_initialize_linetable ()
{
if (gdbpy_type_ready (&linetable_object_type) < 0)
return -1;
CORE_ADDR length;
};
-extern PyTypeObject membuf_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("membuf_object");
+extern PyTypeObject membuf_object_type;
/* Wrap BUFFER, ADDRESS, and LENGTH into a gdb.Membuf object. ADDRESS is
the address within the inferior that the contents of BUFFER were read,
/* General Python initialization callback. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_membuf (void)
+static int
+gdbpy_initialize_membuf ()
{
membuf_object_type.tp_new = PyType_GenericNew;
return gdbpy_type_ready (&membuf_object_type);
using mi_command_py_up = std::unique_ptr<mi_command_py>;
-extern PyTypeObject micmdpy_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("micmdpy_object");
+extern PyTypeObject micmdpy_object_type;
/* Holds a Python object containing the string 'invoke'. */
/* Python initialization for the MI commands components. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
+static int
gdbpy_initialize_micommands ()
{
micmdpy_object_type.tp_new = PyType_GenericNew;
PyObject *xmethods;
};
-extern PyTypeObject objfile_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("objfile_object");
+extern PyTypeObject objfile_object_type;
/* Clear the OBJFILE pointer in an Objfile object and remove the
reference. */
return gdbpy_ref<>::new_reference (result);
}
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_objfile (void)
+static int
+gdbpy_initialize_objfile ()
{
return gdbpy_type_ready (&objfile_object_type);
}
gdb_assert_not_reached ("unhandled var type");
}
-extern PyTypeObject parmpy_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("parmpy_object");
+extern PyTypeObject parmpy_object_type;
/* Some handy string constants. */
static PyObject *set_doc_cst;
}
/* Initialize the 'parameters' module. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_parameters (void)
+static int
+gdbpy_initialize_parameters ()
{
int i;
PyObject *missing_file_handlers;
};
-extern PyTypeObject pspace_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("pspace_object");
+extern PyTypeObject pspace_object_type;
/* Clear the PSPACE pointer in a Pspace object and remove the reference. */
struct pspace_deleter
gdbpy_program_space_event (pspace, false);
}
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_pspace (void)
+static int
+gdbpy_initialize_pspace ()
{
gdb::observers::executable_changed.attach (gdbpy_executable_changed,
"py-progspace");
/* Sets up the btrace record API. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_btrace (void)
+static int
+gdbpy_initialize_btrace ()
{
btpy_list_type.tp_new = PyType_GenericNew;
btpy_list_type.tp_flags = Py_TPFLAGS_DEFAULT;
/* Sets up the record API in the gdb module. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_record (void)
+static int
+gdbpy_initialize_record ()
{
recpy_record_type.tp_new = PyType_GenericNew;
recpy_record_type.tp_flags = Py_TPFLAGS_DEFAULT;
struct gdbarch *gdbarch;
};
-extern PyTypeObject register_descriptor_iterator_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("register_descriptor_iterator_object");
+extern PyTypeObject register_descriptor_iterator_object_type;
/* A register descriptor. */
struct register_descriptor_object {
struct gdbarch *gdbarch;
};
-extern PyTypeObject register_descriptor_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("register_descriptor_object");
+extern PyTypeObject register_descriptor_object_type;
/* Structure for iterator over register groups. */
struct reggroup_iterator_object {
struct gdbarch *gdbarch;
};
-extern PyTypeObject reggroup_iterator_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("reggroup_iterator_object");
+extern PyTypeObject reggroup_iterator_object_type;
/* A register group object. */
struct reggroup_object {
const struct reggroup *reggroup;
};
-extern PyTypeObject reggroup_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("reggroup_object");
+extern PyTypeObject reggroup_object_type;
/* Return a gdb.RegisterGroup object wrapping REGGROUP. The register
group objects are cached, and the same Python object will always be
/* Initializes the new Python classes from this file in the gdb module. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
+static int
gdbpy_initialize_registers ()
{
register_descriptor_object_type.tp_new = PyType_GenericNew;
return return_list.release ();
}
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_symbols (void)
+static int
+gdbpy_initialize_symbols ()
{
if (gdbpy_type_ready (&symbol_object_type) < 0)
return -1;
struct symtab *symtab;
};
-extern PyTypeObject symtab_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("symtab_object");
+extern PyTypeObject symtab_object_type;
static const gdbpy_registry<gdbpy_memoizing_registry_storage<symtab_object,
symtab, &symtab_object::symtab>> stpy_registry;
}
};
-extern PyTypeObject sal_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("sal_object");
+extern PyTypeObject sal_object_type;
static const gdbpy_registry<gdbpy_tracking_registry_storage<sal_object,
symtab_and_line, &sal_object::sal, salpy_invalidator>> salpy_registry;
return ((symtab_object *) obj)->symtab;
}
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_symtabs (void)
+static int
+gdbpy_initialize_symtabs ()
{
symtab_object_type.tp_new = PyType_GenericNew;
if (gdbpy_type_ready (&symtab_object_type) < 0)
bool is_valid () const;
};
-extern PyTypeObject gdbpy_tui_window_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("gdbpy_tui_window");
+extern PyTypeObject gdbpy_tui_window_object_type;
/* A TUI window written in Python. */
/* Initialize this module. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
+static int
gdbpy_initialize_tui ()
{
#ifdef TUI
struct type *type;
};
-extern PyTypeObject type_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("type_object");
+extern PyTypeObject type_object_type;
/* A Field object. */
struct field_object
PyObject *dict;
};
-extern PyTypeObject field_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("field_object");
+extern PyTypeObject field_object_type;
/* A type iterator object. */
struct typy_iterator_object {
type_object *source;
};
-extern PyTypeObject type_iterator_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("typy_iterator_object");
+extern PyTypeObject type_iterator_object_type;
/* This is used to initialize various gdb.TYPE_ constants. */
struct pyty_code
return type_to_type_object (type);
}
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_types (void)
+static int
+gdbpy_initialize_types ()
{
if (gdbpy_type_ready (&type_object_type) < 0)
return -1;
cached_reg_t reg[0];
};
-extern PyTypeObject pending_frame_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("pending_frame_object");
+extern PyTypeObject pending_frame_object_type;
-extern PyTypeObject unwind_info_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("unwind_info_object");
+extern PyTypeObject unwind_info_object_type;
/* An enum returned by pyuw_object_attribute_to_pointer, a function which
is used to extract an attribute from a Python object. */
/* Initialize unwind machinery. */
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_unwind (void)
+static int
+gdbpy_initialize_unwind ()
{
gdb::observers::new_architecture.attach (pyuw_on_new_gdbarch, "py-unwind");
return PyObject_TypeCheck (obj, &value_object_type);
}
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_values (void)
+static int
+gdbpy_initialize_values ()
{
return gdbpy_type_ready (&value_object_type);
}
Py_INCREF (this_type);
}
-static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-gdbpy_initialize_xmethods (void)
+static int
+gdbpy_initialize_xmethods ()
{
py_match_method_name = PyUnicode_FromString (match_method_name);
if (py_match_method_name == NULL)
#include "extension-priv.h"
#include "registry.h"
-/* These WITH_* macros are defined by the CPython API checker that
- comes with the Python plugin for GCC. See:
- https://gcc-python-plugin.readthedocs.org/en/latest/cpychecker.html
- The checker defines a WITH_ macro for each attribute it
- exposes. Note that we intentionally do not use
- 'cpychecker_returns_borrowed_ref' -- that idiom is forbidden in
- gdb. */
-
-#ifdef WITH_CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF_ATTRIBUTE
-#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG) \
- __attribute__ ((cpychecker_type_object_for_typedef (ARG)))
-#else
-#define CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF(ARG)
-#endif
-
-#ifdef WITH_CPYCHECKER_SETS_EXCEPTION_ATTRIBUTE
-#define CPYCHECKER_SETS_EXCEPTION __attribute__ ((cpychecker_sets_exception))
-#else
-#define CPYCHECKER_SETS_EXCEPTION
-#endif
-
-#ifdef WITH_CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION_ATTRIBUTE
-#define CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION \
- __attribute__ ((cpychecker_negative_result_sets_exception))
-#else
-#define CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION
-#endif
-
/* /usr/include/features.h on linux systems will define _POSIX_C_SOURCE
if it sees _GNU_SOURCE (which config.h will define).
pyconfig.h defines _POSIX_C_SOURCE to a different value than
extern PyObject *gdb_module;
extern PyObject *gdb_python_module;
-extern PyTypeObject value_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("value_object");
-extern PyTypeObject block_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF("block_object");
-extern PyTypeObject symbol_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("symbol_object");
-extern PyTypeObject event_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
-extern PyTypeObject breakpoint_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("breakpoint_object");
-extern PyTypeObject frame_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("frame_object");
-extern PyTypeObject thread_object_type
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("thread_object");
+extern PyTypeObject value_object_type;
+extern PyTypeObject block_object_type;
+extern PyTypeObject symbol_object_type;
+extern PyTypeObject event_object_type;
+extern PyTypeObject breakpoint_object_type;
+extern PyTypeObject frame_object_type;
+extern PyTypeObject thread_object_type;
/* Ensure that breakpoint_object_type is initialized and return true. If
breakpoint_object_type can't be initialized then set a suitable Python
extern PyObject *gdbpy_gdb_memory_error;
extern PyObject *gdbpy_gdberror_exc;
-extern void gdbpy_convert_exception (const struct gdb_exception &)
- CPYCHECKER_SETS_EXCEPTION;
+extern void gdbpy_convert_exception (const struct gdb_exception &);
/* Use this in a 'catch' block to convert the exception E to a Python
exception and return value VAL to signal that an exception occurred.
return val;
}
-int get_addr_from_python (PyObject *obj, CORE_ADDR *addr)
- CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
+int get_addr_from_python (PyObject *obj, CORE_ADDR *addr);
gdbpy_ref<> gdb_py_object_from_longest (LONGEST l);
gdbpy_ref<> gdb_py_object_from_ulongest (ULONGEST l);
PyObject *gdb_py_generic_dict (PyObject *self, void *closure);
int gdb_pymodule_addobject (PyObject *module, const char *name,
- PyObject *object)
- CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
+ PyObject *object);
/* Return a Python string (str) object that represents SELF. SELF can be
/* Define all the event objects. */
#define GDB_PY_DEFINE_EVENT_TYPE(name, py_name, doc, base) \
- PyTypeObject name##_event_object_type \
- CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object") \
+ PyTypeObject name##_event_object_type \
= { \
PyVarObject_HEAD_INIT (NULL, 0) \
"gdb." py_name, /* tp_name */ \