diff options
Diffstat (limited to 'gdb/solib-dsbt.c')
-rw-r--r-- | gdb/solib-dsbt.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c index 7261e73..102b41a 100644 --- a/gdb/solib-dsbt.c +++ b/gdb/solib-dsbt.c @@ -251,7 +251,7 @@ decode_loadmap (gdb_byte *buf) external loadsegs. I.e, allocate the internal loadsegs. */ int_ldmbuf_size = (sizeof (struct int_elf32_dsbt_loadmap) + (nsegs - 1) * sizeof (struct int_elf32_dsbt_loadseg)); - int_ldmbuf = xmalloc (int_ldmbuf_size); + int_ldmbuf = (struct int_elf32_dsbt_loadmap *) xmalloc (int_ldmbuf_size); /* Place extracted information in internal structs. */ int_ldmbuf->version = version; @@ -355,7 +355,7 @@ fetch_loadmap (CORE_ADDR ldmaddr) /* Allocate space for the complete (external) loadmap. */ ext_ldmbuf_size = sizeof (struct ext_elf32_dsbt_loadmap) + (nsegs - 1) * sizeof (struct ext_elf32_dsbt_loadseg); - ext_ldmbuf = xmalloc (ext_ldmbuf_size); + ext_ldmbuf = (struct ext_elf32_dsbt_loadmap *) xmalloc (ext_ldmbuf_size); /* Copy over the portion of the loadmap that's already been read. */ memcpy (ext_ldmbuf, &ext_ldmbuf_partial, sizeof ext_ldmbuf_partial); @@ -374,7 +374,7 @@ fetch_loadmap (CORE_ADDR ldmaddr) external loadsegs. I.e, allocate the internal loadsegs. */ int_ldmbuf_size = sizeof (struct int_elf32_dsbt_loadmap) + (nsegs - 1) * sizeof (struct int_elf32_dsbt_loadseg); - int_ldmbuf = xmalloc (int_ldmbuf_size); + int_ldmbuf = (struct int_elf32_dsbt_loadmap *) xmalloc (int_ldmbuf_size); /* Place extracted information in internal structs. */ int_ldmbuf->version = version; @@ -452,7 +452,7 @@ scan_dyntag (int dyntag, bfd *abfd, CORE_ADDR *ptr) /* Read in .dynamic from the BFD. We will get the actual value from memory later. */ sect_size = bfd_section_size (abfd, sect); - buf = bufstart = alloca (sect_size); + buf = bufstart = (gdb_byte *) alloca (sect_size); if (!bfd_get_section_contents (abfd, sect, buf, 0, sect_size)) return 0; @@ -825,7 +825,7 @@ enable_break (void) /* Read the contents of the .interp section into a local buffer; the contents specify the dynamic linker this program uses. */ interp_sect_size = bfd_section_size (exec_bfd, interp_sect); - buf = alloca (interp_sect_size); + buf = (char *) alloca (interp_sect_size); bfd_get_section_contents (exec_bfd, interp_sect, buf, 0, interp_sect_size); @@ -944,8 +944,8 @@ dsbt_relocate_main_executable (void) info->main_executable_lm_info = XCNEW (struct lm_info); info->main_executable_lm_info->map = ldm; - new_offsets = xcalloc (symfile_objfile->num_sections, - sizeof (struct section_offsets)); + new_offsets = XCNEWVEC (struct section_offsets, + symfile_objfile->num_sections); old_chain = make_cleanup (xfree, new_offsets); changed = 0; |