aboutsummaryrefslogtreecommitdiff
path: root/gdb/compile
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/compile')
-rw-r--r--gdb/compile/compile-object-load.c5
-rw-r--r--gdb/compile/compile-object-run.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/gdb/compile/compile-object-load.c b/gdb/compile/compile-object-load.c
index 73868c2..ea1a19a 100644
--- a/gdb/compile/compile-object-load.c
+++ b/gdb/compile/compile-object-load.c
@@ -386,7 +386,7 @@ copy_sections (bfd *abfd, asection *sect, void *data)
link_order.size = bfd_get_section_size (sect);
link_order.u.indirect.section = sect;
- sect_data = xmalloc (bfd_get_section_size (sect));
+ sect_data = (bfd_byte *) xmalloc (bfd_get_section_size (sect));
make_cleanup (xfree, sect_data);
sect_data_got = bfd_get_relocated_section_contents (abfd, &link_info,
@@ -718,7 +718,8 @@ compile_object_load (const char *object_file, const char *source_file,
/* The memory may be later needed
by bfd_generic_get_relocated_section_contents
called from default_symfile_relocate. */
- symbol_table = obstack_alloc (&objfile->objfile_obstack, storage_needed);
+ symbol_table = (asymbol **) obstack_alloc (&objfile->objfile_obstack,
+ storage_needed);
number_of_symbols = bfd_canonicalize_symtab (abfd, symbol_table);
if (number_of_symbols < 0)
error (_("Cannot parse symbols of compiled module \"%s\": %s"),
diff --git a/gdb/compile/compile-object-run.c b/gdb/compile/compile-object-run.c
index 6a39d13..6bc96b9 100644
--- a/gdb/compile/compile-object-run.c
+++ b/gdb/compile/compile-object-run.c
@@ -125,7 +125,8 @@ compile_object_run (struct compile_module *module)
CORE_ADDR regs_addr = module->regs_addr;
struct objfile *objfile = module->objfile;
- data = xmalloc (sizeof (*data) + strlen (objfile_name_s));
+ data = (struct do_module_cleanup *) xmalloc (sizeof (*data)
+ + strlen (objfile_name_s));
data->executedp = &executed;
data->source_file = xstrdup (module->source_file);
strcpy (data->objfile_name_string, objfile_name_s);