+2015-02-11 Tom Tromey <tromey@redhat.com>
+ Pedro Alves <palves@redhat.com>
+
+ * breakpoint.c (base_breakpoint_ops): Delete.
+ * dwarf2loc.c (dwarf_expr_ctx_funcs): Make extern.
+ * elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_lazy_psyms): Make extern.
+ * guile/guile.c (guile_extension_script_ops, guile_extension_ops): Make extern.
+ * ppcnbsd-tdep.c (ppcnbsd2_sigtramp): Make extern.
+ * python/py-arch.c (arch_object_type): Make extern.
+ * python/py-block.c (block_syms_iterator_object_type): Make extern.
+ * python/py-bpevent.c (breakpoint_event_object_type): Make extern.
+ * python/py-cmd.c (cmdpy_object_type): Make extern.
+ * python/py-continueevent.c (continue_event_object_type)
+ * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove 'qual'
+ parameter. Update all callers.
+ * python/py-evtregistry.c (eventregistry_object_type): Make extern.
+ * python/py-exitedevent.c (exited_event_object_type): Make extern.
+ * python/py-finishbreakpoint.c (finish_breakpoint_object_type): Make extern.
+ * python/py-function.c (fnpy_object_type): Make extern.
+ * python/py-inferior.c (inferior_object_type, membuf_object_type): Make extern.
+ * python/py-infevents.c (call_pre_event_object_type)
+ (inferior_call_post_event_object_type).
+ (memory_changed_event_object_type): Make extern.
+ * python/py-infthread.c (thread_object_type): Make extern.
+ * python/py-lazy-string.c (lazy_string_object_type): Make extern.
+ * python/py-linetable.c (linetable_entry_object_type)
+ (linetable_object_type, ltpy_iterator_object_type): Make extern.
+ * python/py-newobjfileevent.c (new_objfile_event_object_type)
+ (clear_objfiles_event_object_type): Make extern.
+ * python/py-objfile.c (objfile_object_type): Make extern.
+ * python/py-param.c (parmpy_object_type): Make extern.
+ * python/py-progspace.c (pspace_object_type): Make extern.
+ * python/py-signalevent.c (signal_event_object_type): Make extern.
+ * python/py-symtab.c (symtab_object_type, sal_object_type): Make extern.
+ * python/py-type.c (type_object_type, field_object_type)
+ (type_iterator_object_type): Make extern.
+ * python/python.c (python_extension_script_ops)
+ (python_extension_ops): Make extern.
+ * stap-probe.c (stap_probe_ops): Make extern.
+
2015-02-11 Pedro Alves <pedro@codesourcery.com>
* infrun.c (adjust_pc_after_break): Don't adjust the PC just
static int strace_marker_p (struct breakpoint *b);
-/* The abstract base class all breakpoint_ops structures inherit
- from. */
-struct breakpoint_ops base_breakpoint_ops;
-
/* The breakpoint_ops structure to be inherited by all breakpoint_ops
that are implemented on top of software or hardware breakpoints
(user breakpoints, internal and momentary breakpoints, etc.). */
extern int dwarf2_always_disassemble;
-static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs;
+extern const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs;
static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
struct frame_info *frame,
/* Virtual method table for dwarf2_evaluate_loc_desc_full below. */
-static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs =
+const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs =
{
dwarf_expr_read_addr_from_reg,
dwarf_expr_get_reg_value,
extern void _initialize_elfread (void);
/* Forward declarations. */
-static const struct sym_fns elf_sym_fns_gdb_index;
-static const struct sym_fns elf_sym_fns_lazy_psyms;
+extern const struct sym_fns elf_sym_fns_gdb_index;
+extern const struct sym_fns elf_sym_fns_lazy_psyms;
/* The struct elfinfo is available only during ELF symbol table and
psymtab reading. It is destroyed at the completion of psymtab-reading.
/* The same as elf_sym_fns, but not registered and lazily reads
psymbols. */
-static const struct sym_fns elf_sym_fns_lazy_psyms =
+const struct sym_fns elf_sym_fns_lazy_psyms =
{
elf_new_init, /* init anything gbl to entire symtab */
elf_symfile_init, /* read initial info, setup for sym_read() */
/* The same as elf_sym_fns, but not registered and uses the
DWARF-specific GNU index rather than psymtab. */
-static const struct sym_fns elf_sym_fns_gdb_index =
+const struct sym_fns elf_sym_fns_gdb_index =
{
elf_new_init, /* init anything gbl to entire symab */
elf_symfile_init, /* read initial info, setup for sym_red() */
#ifdef HAVE_GUILE
/* Forward decls, these are defined later. */
-static const struct extension_language_script_ops guile_extension_script_ops;
-static const struct extension_language_ops guile_extension_ops;
+extern const struct extension_language_script_ops guile_extension_script_ops;
+extern const struct extension_language_ops guile_extension_ops;
#endif
/* The main struct describing GDB's interface to the Guile
/* The interface between gdb proper and loading of python scripts. */
-static const struct extension_language_script_ops guile_extension_script_ops =
+const struct extension_language_script_ops guile_extension_script_ops =
{
gdbscm_source_script,
gdbscm_source_objfile_script,
/* The interface between gdb proper and guile scripting. */
-static const struct extension_language_ops guile_extension_ops =
+const struct extension_language_ops guile_extension_ops =
{
gdbscm_finish_initialization,
gdbscm_initialized,
/* Signal trampolines. */
-static const struct tramp_frame ppcnbsd2_sigtramp;
+extern const struct tramp_frame ppcnbsd2_sigtramp;
static void
ppcnbsd_sigtramp_cache_init (const struct tramp_frame *self,
/* NetBSD 2.0 introduced a slightly different signal trampoline. */
-static const struct tramp_frame ppcnbsd2_sigtramp =
+const struct tramp_frame ppcnbsd2_sigtramp =
{
SIGTRAMP_FRAME,
4,
} \
} while (0)
-static PyTypeObject arch_object_type
+extern PyTypeObject arch_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("arch_object");
/* Associates an arch_object with GDBARCH as gdbarch_data via the gdbarch
{NULL} /* Sentinel */
};
-static PyTypeObject arch_object_type = {
+PyTypeObject arch_object_type = {
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Architecture", /* tp_name */
sizeof (arch_object), /* tp_basicsize */
} \
} while (0)
-static PyTypeObject block_syms_iterator_object_type
+extern PyTypeObject block_syms_iterator_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("block_syms_iterator_object");
static const struct objfile_data *blpy_objfile_data_key;
{NULL} /* Sentinel */
};
-static PyTypeObject block_syms_iterator_object_type = {
+PyTypeObject block_syms_iterator_object_type = {
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.BlockIterator", /*tp_name*/
sizeof (block_syms_iterator_object), /*tp_basicsize*/
#include "defs.h"
#include "py-stopevent.h"
-static PyTypeObject breakpoint_event_object_type
+extern PyTypeObject breakpoint_event_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
/* Create and initialize a BreakpointEvent object. This acquires new
"gdb.BreakpointEvent",
"BreakpointEvent",
"GDB breakpoint stop event object",
- stop_event_object_type,
- static);
+ stop_event_object_type);
typedef struct cmdpy_object cmdpy_object;
-static PyTypeObject cmdpy_object_type
+extern PyTypeObject cmdpy_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("cmdpy_object");
/* Constants used by this module. */
{ 0 }
};
-static PyTypeObject cmdpy_object_type =
+PyTypeObject cmdpy_object_type =
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Command", /*tp_name*/
#include "defs.h"
#include "py-event.h"
-static PyTypeObject continue_event_object_type
+extern PyTypeObject continue_event_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
static PyObject *
"gdb.ContinueEvent",
"ContinueEvent",
"GDB continue event object",
- thread_event_object_type,
- static);
+ thread_event_object_type);
python.
DOC Python documentation for the new event type
BASE the base event for this event usually just event_object_type.
- QUAL qualification for the create event usually 'static'
*/
-#define GDBPY_NEW_EVENT_TYPE(name, py_path, py_name, doc, base, qual) \
+#define GDBPY_NEW_EVENT_TYPE(name, py_path, py_name, doc, base) \
\
- qual PyTypeObject name##_event_object_type \
+ PyTypeObject name##_event_object_type \
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object") \
= { \
PyVarObject_HEAD_INIT (NULL, 0) \
events_object gdb_py_events;
-static PyTypeObject eventregistry_object_type
+extern PyTypeObject eventregistry_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("eventregistry_object");
/* Implementation of EventRegistry.connect () -> NULL.
{ NULL } /* Sentinel. */
};
-static PyTypeObject eventregistry_object_type =
+PyTypeObject eventregistry_object_type =
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.EventRegistry", /* tp_name */
#include "defs.h"
#include "py-event.h"
-static PyTypeObject exited_event_object_type
+extern PyTypeObject exited_event_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
static PyObject *
"gdb.ExitedEvent",
"ExitedEvent",
"GDB exited event object",
- event_object_type,
- static);
+ event_object_type);
PyObject *return_value;
};
-static PyTypeObject finish_breakpoint_object_type
+extern PyTypeObject finish_breakpoint_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("finish_breakpoint_object");
/* Python function to get the 'return_value' attribute of
{ NULL } /* Sentinel. */
};
-static PyTypeObject finish_breakpoint_object_type =
+PyTypeObject finish_breakpoint_object_type =
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.FinishBreakpoint", /*tp_name*/
#include "expression.h"
#include "language.h"
-static PyTypeObject fnpy_object_type
+extern PyTypeObject fnpy_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("PyObject");
\f
\f
-static PyTypeObject fnpy_object_type =
+PyTypeObject fnpy_object_type =
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Function", /*tp_name*/
int nthreads;
} inferior_object;
-static PyTypeObject inferior_object_type
+extern PyTypeObject inferior_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("inferior_object");
static const struct inferior_data *infpy_inf_data_key;
CORE_ADDR length;
} membuf_object;
-static PyTypeObject membuf_object_type
+extern PyTypeObject membuf_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("membuf_object");
/* Require that INFERIOR be a valid inferior ID. */
{ NULL }
};
-static PyTypeObject inferior_object_type =
+PyTypeObject inferior_object_type =
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Inferior", /* tp_name */
};
#endif /* IS_PY3K */
-static PyTypeObject membuf_object_type = {
+PyTypeObject membuf_object_type = {
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Membuf", /*tp_name*/
sizeof (membuf_object), /*tp_basicsize*/
#include "defs.h"
#include "py-event.h"
-static PyTypeObject inferior_call_pre_event_object_type
+extern PyTypeObject inferior_call_pre_event_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
-static PyTypeObject inferior_call_post_event_object_type
+extern PyTypeObject inferior_call_post_event_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
-static PyTypeObject register_changed_event_object_type
+extern PyTypeObject register_changed_event_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
-static PyTypeObject memory_changed_event_object_type
+extern PyTypeObject memory_changed_event_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
/* Construct either a gdb.InferiorCallPreEvent or a
"gdb.InferiorCallPreEvent",
"InferiorCallPreEvent",
"GDB inferior function pre-call event object",
- event_object_type,
- static);
+ event_object_type);
GDBPY_NEW_EVENT_TYPE (inferior_call_post,
"gdb.InferiorCallPostEvent",
"InferiorCallPostEvent",
"GDB inferior function post-call event object",
- event_object_type,
- static);
+ event_object_type);
GDBPY_NEW_EVENT_TYPE (register_changed,
"gdb.RegisterChangedEvent",
"RegisterChangedEvent",
"GDB register change event object",
- event_object_type,
- static);
+ event_object_type);
GDBPY_NEW_EVENT_TYPE (memory_changed,
"gdb.MemoryChangedEvent",
"MemoryChangedEvent",
"GDB memory change event object",
- event_object_type,
- static);
+ event_object_type);
#include "inferior.h"
#include "python-internal.h"
-static PyTypeObject thread_object_type
+extern PyTypeObject thread_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("thread_object");
/* Require that INFERIOR be a valid inferior ID. */
{ NULL }
};
-static PyTypeObject thread_object_type =
+PyTypeObject thread_object_type =
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.InferiorThread", /*tp_name*/
struct type *type;
} lazy_string_object;
-static PyTypeObject lazy_string_object_type
+extern PyTypeObject lazy_string_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("lazy_string_object");
static PyObject *
{ NULL } /* Sentinel */
};
-static PyTypeObject lazy_string_object_type = {
+PyTypeObject lazy_string_object_type = {
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.LazyString", /*tp_name*/
sizeof (lazy_string_object), /*tp_basicsize*/
CORE_ADDR pc;
} linetable_entry_object;
-static PyTypeObject linetable_entry_object_type
+extern PyTypeObject linetable_entry_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("linetable_entry_object");
typedef struct {
PyObject *symtab;
} linetable_object;
-static PyTypeObject linetable_object_type
+extern PyTypeObject linetable_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("linetable_object");
typedef struct {
PyObject *source;
} ltpy_iterator_object;
-static PyTypeObject ltpy_iterator_object_type
+extern PyTypeObject ltpy_iterator_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("ltpy_iterator_object");
/* Internal helper function to extract gdb.Symtab from a gdb.Linetable
{NULL} /* Sentinel */
};
-static PyTypeObject linetable_object_type = {
+PyTypeObject linetable_object_type = {
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.LineTable", /*tp_name*/
sizeof (linetable_object), /*tp_basicsize*/
{NULL} /* Sentinel */
};
-static PyTypeObject ltpy_iterator_object_type = {
+PyTypeObject ltpy_iterator_object_type = {
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.LineTableIterator", /*tp_name*/
sizeof (ltpy_iterator_object), /*tp_basicsize*/
{ NULL } /* Sentinel */
};
-static PyTypeObject linetable_entry_object_type = {
+PyTypeObject linetable_entry_object_type = {
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.LineTableEntry", /*tp_name*/
sizeof (linetable_entry_object), /*tp_basicsize*/
#include "defs.h"
#include "py-event.h"
-static PyTypeObject new_objfile_event_object_type
+extern PyTypeObject new_objfile_event_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
-static PyTypeObject clear_objfiles_event_object_type
+extern PyTypeObject clear_objfiles_event_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
static PyObject *
"gdb.NewObjFileEvent",
"NewObjFileEvent",
"GDB new object file event object",
- event_object_type,
- static);
+ event_object_type);
\f
/* Subroutine of emit_clear_objfiles_event to simplify it. */
"gdb.ClearObjFilesEvent",
"ClearObjFilesEvent",
"GDB clear object files event object",
- event_object_type,
- static);
+ event_object_type);
PyObject *xmethods;
} objfile_object;
-static PyTypeObject objfile_object_type
+extern PyTypeObject objfile_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("objfile_object");
static const struct objfile_data *objfpy_objfile_data_key;
{ NULL }
};
-static PyTypeObject objfile_object_type =
+PyTypeObject objfile_object_type =
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Objfile", /*tp_name*/
typedef struct parmpy_object parmpy_object;
-static PyTypeObject parmpy_object_type
+extern PyTypeObject parmpy_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("parmpy_object");
/* Some handy string constants. */
\f
-static PyTypeObject parmpy_object_type =
+PyTypeObject parmpy_object_type =
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Parameter", /*tp_name*/
PyObject *xmethods;
} pspace_object;
-static PyTypeObject pspace_object_type
+extern PyTypeObject pspace_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("pspace_object");
static const struct program_space_data *pspy_pspace_data_key;
{ NULL }
};
-static PyTypeObject pspace_object_type =
+PyTypeObject pspace_object_type =
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Progspace", /*tp_name*/
#include "defs.h"
#include "py-stopevent.h"
-static PyTypeObject signal_event_object_type
+extern PyTypeObject signal_event_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("event_object");
PyObject *
"gdb.SignalEvent",
"SignalEvent",
"GDB signal event object",
- stop_event_object_type,
- static);
+ stop_event_object_type);
"gdb.StopEvent",
"StopEvent",
"GDB stop event object",
- thread_event_object_type,
- /*no qual*/);
+ thread_event_object_type);
struct stpy_symtab_object *next;
} symtab_object;
-static PyTypeObject symtab_object_type
+extern PyTypeObject symtab_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("symtab_object");
static const struct objfile_data *stpy_objfile_data_key;
struct salpy_sal_object *next;
} sal_object;
-static PyTypeObject sal_object_type
+extern PyTypeObject sal_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("sal_object");
static const struct objfile_data *salpy_objfile_data_key;
{NULL} /* Sentinel */
};
-static PyTypeObject symtab_object_type = {
+PyTypeObject symtab_object_type = {
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Symtab", /*tp_name*/
sizeof (symtab_object), /*tp_basicsize*/
{NULL} /* Sentinel */
};
-static PyTypeObject sal_object_type = {
+PyTypeObject sal_object_type = {
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Symtab_and_line", /*tp_name*/
sizeof (sal_object), /*tp_basicsize*/
"gdb.ThreadEvent",
"ThreadEvent",
"GDB thread event object",
- event_object_type,
- /*no qual*/);
+ event_object_type);
struct pyty_type_object *next;
} type_object;
-static PyTypeObject type_object_type
+extern PyTypeObject type_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("type_object");
/* A Field object. */
PyObject *dict;
} field_object;
-static PyTypeObject field_object_type
+extern PyTypeObject field_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("field_object");
/* A type iterator object. */
struct pyty_type_object *source;
} typy_iterator_object;
-static PyTypeObject type_iterator_object_type
+extern PyTypeObject type_iterator_object_type
CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("typy_iterator_object");
/* This is used to initialize various gdb.TYPE_ constants. */
NULL /* no "set" method */
};
-static PyTypeObject type_object_type =
+PyTypeObject type_object_type =
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Type", /*tp_name*/
{ NULL }
};
-static PyTypeObject field_object_type =
+PyTypeObject field_object_type =
{
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Field", /*tp_name*/
0, /* tp_new */
};
-static PyTypeObject type_iterator_object_type = {
+PyTypeObject type_iterator_object_type = {
PyVarObject_HEAD_INIT (NULL, 0)
"gdb.TypeIterator", /*tp_name*/
sizeof (typy_iterator_object), /*tp_basicsize*/
#ifdef HAVE_PYTHON
/* Forward decls, these are defined later. */
-static const struct extension_language_script_ops python_extension_script_ops;
-static const struct extension_language_ops python_extension_ops;
+extern const struct extension_language_script_ops python_extension_script_ops;
+extern const struct extension_language_ops python_extension_ops;
#endif
/* The main struct describing GDB's interface to the Python
/* The interface between gdb proper and loading of python scripts. */
-static const struct extension_language_script_ops python_extension_script_ops =
+const struct extension_language_script_ops python_extension_script_ops =
{
gdbpy_source_script,
gdbpy_source_objfile_script,
/* The interface between gdb proper and python extensions. */
-static const struct extension_language_ops python_extension_ops =
+const struct extension_language_ops python_extension_ops =
{
gdbpy_finish_initialization,
gdbpy_initialized,
/* Forward declaration. */
-static const struct probe_ops stap_probe_ops;
+extern const struct probe_ops stap_probe_ops;
/* Should we display debug information for the probe's argument expression
parsing? */
/* SystemTap probe_ops. */
-static const struct probe_ops stap_probe_ops =
+const struct probe_ops stap_probe_ops =
{
stap_probe_is_linespec,
stap_get_probes,