aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/py-block.c5
-rw-r--r--gdb/python/py-breakpoint.c2
-rw-r--r--gdb/python/py-inferior.c6
-rw-r--r--gdb/python/py-objfile.c4
-rw-r--r--gdb/python/py-prettyprint.c2
-rw-r--r--gdb/python/py-progspace.c4
-rw-r--r--gdb/python/py-symbol.c5
-rw-r--r--gdb/python/py-symtab.c15
-rw-r--r--gdb/python/py-type.c5
-rw-r--r--gdb/python/py-unwind.c9
-rw-r--r--gdb/python/py-utils.c6
-rw-r--r--gdb/python/py-xmethods.c14
-rw-r--r--gdb/python/python.c4
13 files changed, 46 insertions, 35 deletions
diff --git a/gdb/python/py-block.c b/gdb/python/py-block.c
index 6c0f5cb..91a3d8e 100644
--- a/gdb/python/py-block.c
+++ b/gdb/python/py-block.c
@@ -256,7 +256,8 @@ set_block (block_object *obj, const struct block *block,
if (objfile)
{
obj->objfile = objfile;
- obj->next = objfile_data (objfile, blpy_objfile_data_key);
+ obj->next = ((struct blpy_block_object *)
+ objfile_data (objfile, blpy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (objfile, blpy_objfile_data_key, obj);
@@ -411,7 +412,7 @@ gdbpy_block_for_pc (PyObject *self, PyObject *args)
static void
del_objfile_blocks (struct objfile *objfile, void *datum)
{
- block_object *obj = datum;
+ block_object *obj = (block_object *) datum;
while (obj)
{
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index 30619dc..9c0b0e4 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -720,7 +720,7 @@ bppy_init (PyObject *self, PyObject *args, PyObject *kwargs)
static int
build_bp_list (struct breakpoint *b, void *arg)
{
- PyObject *list = arg;
+ PyObject *list = (PyObject *) arg;
PyObject *bp = (PyObject *) b->py_bp_object;
int iserr = 0;
diff --git a/gdb/python/py-inferior.c b/gdb/python/py-inferior.c
index 3cfa1d5..dbc197e 100644
--- a/gdb/python/py-inferior.c
+++ b/gdb/python/py-inferior.c
@@ -242,7 +242,7 @@ inferior_to_inferior_object (struct inferior *inferior)
{
inferior_object *inf_obj;
- inf_obj = inferior_data (inferior, infpy_inf_data_key);
+ inf_obj = (inferior_object *) inferior_data (inferior, infpy_inf_data_key);
if (!inf_obj)
{
inf_obj = PyObject_New (inferior_object, &inferior_object_type);
@@ -456,7 +456,7 @@ infpy_get_was_attached (PyObject *self, void *closure)
static int
build_inferior_list (struct inferior *inf, void *arg)
{
- PyObject *list = arg;
+ PyObject *list = (PyObject *) arg;
PyObject *inferior = inferior_to_inferior_object (inf);
int success = 0;
@@ -833,7 +833,7 @@ py_free_inferior (struct inferior *inf, void *datum)
{
struct cleanup *cleanup;
- inferior_object *inf_obj = datum;
+ inferior_object *inf_obj = (inferior_object *) datum;
struct threadlist_entry *th_entry, *th_tmp;
if (!gdb_python_initialized)
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index 5dc9ae6..ed2fe74 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -615,7 +615,7 @@ static void
py_free_objfile (struct objfile *objfile, void *datum)
{
struct cleanup *cleanup;
- objfile_object *object = datum;
+ objfile_object *object = (objfile_object *) datum;
cleanup = ensure_python_env (get_objfile_arch (objfile), current_language);
object->objfile = NULL;
@@ -633,7 +633,7 @@ objfile_to_objfile_object (struct objfile *objfile)
{
objfile_object *object;
- object = objfile_data (objfile, objfpy_objfile_data_key);
+ object = (objfile_object *) objfile_data (objfile, objfpy_objfile_data_key);
if (!object)
{
object = PyObject_New (objfile_object, &objfile_object_type);
diff --git a/gdb/python/py-prettyprint.c b/gdb/python/py-prettyprint.c
index 274ac6c..df21ff0 100644
--- a/gdb/python/py-prettyprint.c
+++ b/gdb/python/py-prettyprint.c
@@ -393,7 +393,7 @@ print_string_repr (PyObject *printer, const char *hint,
static void
py_restore_tstate (void *p)
{
- PyFrameObject *frame = p;
+ PyFrameObject *frame = (PyFrameObject *) p;
PyThreadState *tstate = PyThreadState_GET ();
tstate->frame = frame;
diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c
index 17da3d1..cd48cbb 100644
--- a/gdb/python/py-progspace.c
+++ b/gdb/python/py-progspace.c
@@ -323,7 +323,7 @@ static void
py_free_pspace (struct program_space *pspace, void *datum)
{
struct cleanup *cleanup;
- pspace_object *object = datum;
+ pspace_object *object = (pspace_object *) datum;
/* This is a fiction, but we're in a nasty spot: The pspace is in the
process of being deleted, we can't rely on anything in it. Plus
this is one time when the current program space and current inferior
@@ -351,7 +351,7 @@ pspace_to_pspace_object (struct program_space *pspace)
{
pspace_object *object;
- object = program_space_data (pspace, pspy_pspace_data_key);
+ object = (pspace_object *) program_space_data (pspace, pspy_pspace_data_key);
if (!object)
{
object = PyObject_New (pspace_object, &pspace_object_type);
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index 3d2fa91..c1511b5 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -308,7 +308,8 @@ set_symbol (symbol_object *obj, struct symbol *symbol)
{
struct objfile *objfile = symbol_objfile (symbol);
- obj->next = objfile_data (objfile, sympy_objfile_data_key);
+ obj->next = ((struct sympy_symbol_object *)
+ objfile_data (objfile, sympy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (objfile, sympy_objfile_data_key, obj);
@@ -485,7 +486,7 @@ gdbpy_lookup_global_symbol (PyObject *self, PyObject *args, PyObject *kw)
static void
del_objfile_symbols (struct objfile *objfile, void *datum)
{
- symbol_object *obj = datum;
+ symbol_object *obj = (symbol_object *) datum;
while (obj)
{
symbol_object *next = obj->next;
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index f0ae036..79bfeca 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -380,8 +380,10 @@ set_sal (sal_object *sal_obj, struct symtab_and_line sal)
objfile cleanup observer linked list. */
if (sal_obj->symtab != (symtab_object *)Py_None)
{
- sal_obj->next = objfile_data (SYMTAB_OBJFILE (sal_obj->symtab->symtab),
- salpy_objfile_data_key);
+ sal_obj->next
+ = ((struct salpy_sal_object *)
+ objfile_data (SYMTAB_OBJFILE (sal_obj->symtab->symtab),
+ salpy_objfile_data_key));
if (sal_obj->next)
sal_obj->next->prev = sal_obj;
@@ -406,8 +408,9 @@ set_symtab (symtab_object *obj, struct symtab *symtab)
obj->prev = NULL;
if (symtab)
{
- obj->next = objfile_data (SYMTAB_OBJFILE (symtab),
- stpy_objfile_data_key);
+ obj->next
+ = ((struct stpy_symtab_object *)
+ objfile_data (SYMTAB_OBJFILE (symtab), stpy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (SYMTAB_OBJFILE (symtab), stpy_objfile_data_key, obj);
@@ -478,7 +481,7 @@ symtab_object_to_symtab (PyObject *obj)
static void
del_objfile_symtab (struct objfile *objfile, void *datum)
{
- symtab_object *obj = datum;
+ symtab_object *obj = (symtab_object *) datum;
while (obj)
{
@@ -499,7 +502,7 @@ del_objfile_symtab (struct objfile *objfile, void *datum)
static void
del_objfile_sal (struct objfile *objfile, void *datum)
{
- sal_object *obj = datum;
+ sal_object *obj = (sal_object *) datum;
while (obj)
{
diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c
index e202c83..7b3f8f9 100644
--- a/gdb/python/py-type.c
+++ b/gdb/python/py-type.c
@@ -1086,7 +1086,7 @@ static const struct objfile_data *typy_objfile_data_key;
static void
save_objfile_types (struct objfile *objfile, void *datum)
{
- type_object *obj = datum;
+ type_object *obj = (type_object *) datum;
htab_t copied_types;
struct cleanup *cleanup;
@@ -1127,7 +1127,8 @@ set_type (type_object *obj, struct type *type)
{
struct objfile *objfile = TYPE_OBJFILE (type);
- obj->next = objfile_data (objfile, typy_objfile_data_key);
+ obj->next = ((struct pyty_type_object *)
+ objfile_data (objfile, typy_objfile_data_key));
if (obj->next)
obj->next->prev = obj;
set_objfile_data (objfile, typy_objfile_data_key, obj);
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c
index 523cb76..c518c5d 100644
--- a/gdb/python/py-unwind.c
+++ b/gdb/python/py-unwind.c
@@ -498,7 +498,7 @@ static struct value *
pyuw_prev_register (struct frame_info *this_frame, void **cache_ptr,
int regnum)
{
- cached_frame_info *cached_frame = *cache_ptr;
+ cached_frame_info *cached_frame = (cached_frame_info *) *cache_ptr;
struct reg_info *reg_info = cached_frame->reg;
struct reg_info *reg_info_end = reg_info + cached_frame->reg_count;
@@ -636,8 +636,9 @@ pyuw_gdbarch_data_init (struct gdbarch *gdbarch)
static void
pyuw_on_new_gdbarch (struct gdbarch *newarch)
{
- struct pyuw_gdbarch_data_type *data =
- gdbarch_data (newarch, pyuw_gdbarch_data);
+ struct pyuw_gdbarch_data_type *data
+ = (struct pyuw_gdbarch_data_type *) gdbarch_data (newarch,
+ pyuw_gdbarch_data);
if (!data->unwinder_registered)
{
@@ -648,7 +649,7 @@ pyuw_on_new_gdbarch (struct gdbarch *newarch)
unwinder->stop_reason = default_frame_unwind_stop_reason;
unwinder->this_id = pyuw_this_id;
unwinder->prev_register = pyuw_prev_register;
- unwinder->unwind_data = (void *) newarch;
+ unwinder->unwind_data = (const struct frame_data *) newarch;
unwinder->sniffer = pyuw_sniffer;
unwinder->dealloc_cache = pyuw_dealloc_cache;
frame_unwind_prepend_unwinder (newarch, unwinder);
diff --git a/gdb/python/py-utils.c b/gdb/python/py-utils.c
index 2e32f11..9a4d1ed 100644
--- a/gdb/python/py-utils.c
+++ b/gdb/python/py-utils.c
@@ -29,7 +29,7 @@
static void
py_decref (void *p)
{
- PyObject *py = p;
+ PyObject *py = (PyObject *) p;
Py_DECREF (py);
}
@@ -50,7 +50,7 @@ make_cleanup_py_decref (PyObject *py)
static void
py_xdecref (void *p)
{
- PyObject *py = p;
+ PyObject *py = (PyObject *) p;
Py_XDECREF (py);
}
@@ -420,7 +420,7 @@ PyObject *
gdb_py_generic_dict (PyObject *self, void *closure)
{
PyObject *result;
- PyTypeObject *type_obj = closure;
+ PyTypeObject *type_obj = (PyTypeObject *) closure;
char *raw_ptr;
raw_ptr = (char *) self + type_obj->tp_dictoffset;
diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c
index 91e2691..f927fe9 100644
--- a/gdb/python/py-xmethods.c
+++ b/gdb/python/py-xmethods.c
@@ -54,7 +54,7 @@ void
gdbpy_free_xmethod_worker_data (const struct extension_language_defn *extlang,
void *data)
{
- struct gdbpy_worker_data *worker_data = data;
+ struct gdbpy_worker_data *worker_data = (struct gdbpy_worker_data *) data;
struct cleanup *cleanups;
gdb_assert (worker_data->worker != NULL && worker_data->this_type != NULL);
@@ -75,7 +75,8 @@ void *
gdbpy_clone_xmethod_worker_data (const struct extension_language_defn *extlang,
void *data)
{
- struct gdbpy_worker_data *worker_data = data, *new_data;
+ struct gdbpy_worker_data *worker_data
+ = (struct gdbpy_worker_data *) data, *new_data;
struct cleanup *cleanups;
gdb_assert (worker_data->worker != NULL && worker_data->this_type != NULL);
@@ -379,7 +380,8 @@ gdbpy_get_xmethod_arg_types (const struct extension_language_defn *extlang,
struct xmethod_worker *worker,
int *nargs, struct type ***arg_types)
{
- struct gdbpy_worker_data *worker_data = worker->data;
+ struct gdbpy_worker_data *worker_data
+ = (struct gdbpy_worker_data *) worker->data;
PyObject *py_worker = worker_data->worker;
PyObject *get_arg_types_method;
PyObject *py_argtype_list, *list_iter = NULL, *item;
@@ -513,7 +515,8 @@ gdbpy_get_xmethod_result_type (const struct extension_language_defn *extlang,
struct value **args, int nargs,
struct type **result_type_ptr)
{
- struct gdbpy_worker_data *worker_data = worker->data;
+ struct gdbpy_worker_data *worker_data
+ = (struct gdbpy_worker_data *) worker->data;
PyObject *py_worker = worker_data->worker;
PyObject *py_value_obj, *py_arg_tuple, *py_result_type;
PyObject *get_result_type_method;
@@ -616,7 +619,8 @@ gdbpy_invoke_xmethod (const struct extension_language_defn *extlang,
PyObject *py_value_obj, *py_arg_tuple, *py_result;
struct type *obj_type, *this_type;
struct value *res = NULL;
- struct gdbpy_worker_data *worker_data = worker->data;
+ struct gdbpy_worker_data *worker_data
+ = (struct gdbpy_worker_data *) worker->data;
PyObject *xmethod_worker = worker_data->worker;
cleanups = ensure_python_env (get_current_arch (), current_language);
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 2031c0c..1c2d5c6 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -1458,7 +1458,7 @@ gdbpy_apply_type_printers (const struct extension_language_defn *extlang,
struct cleanup *cleanups;
PyObject *type_obj, *type_module = NULL, *func = NULL;
PyObject *result_obj = NULL;
- PyObject *printers_obj = ext_printers->py_type_printers;
+ PyObject *printers_obj = (PyObject *) ext_printers->py_type_printers;
char *result = NULL;
if (printers_obj == NULL)
@@ -1524,7 +1524,7 @@ gdbpy_free_type_printers (const struct extension_language_defn *extlang,
struct ext_lang_type_printers *ext_printers)
{
struct cleanup *cleanups;
- PyObject *printers = ext_printers->py_type_printers;
+ PyObject *printers = (PyObject *) ext_printers->py_type_printers;
if (printers == NULL)
return;