X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fsymfile.c;h=0d67bfd834594cd68ad1da3aec9e2811dc32bfd8;hb=173981bc49c9e8fce9271cb47714952dbe2ec627;hp=229f9b430b90ce0827eab231d61dd09bdfb0b39e;hpb=224c3ddb89a43bf8db06c373d4ff429477833c0f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/symfile.c b/gdb/symfile.c index 229f9b430b..0d67bfd834 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1,6 +1,6 @@ /* Generic symbol file reading for the GNU debugger, GDB. - Copyright (C) 1990-2015 Free Software Foundation, Inc. + Copyright (C) 1990-2016 Free Software Foundation, Inc. Contributed by Cygnus Support, using pieces from other GDB modules. @@ -424,7 +424,7 @@ struct place_section_arg static void place_section (bfd *abfd, asection *sect, void *obj) { - struct place_section_arg *arg = obj; + struct place_section_arg *arg = (struct place_section_arg *) obj; CORE_ADDR *offsets = arg->offsets->offsets, start_addr; int done; ULONGEST align = ((ULONGEST) 1) << bfd_get_section_alignment (abfd, sect); @@ -1738,7 +1738,7 @@ symfile_bfd_open (const char *name) #if defined(__GO32__) || defined(_WIN32) || defined (__CYGWIN__) if (desc < 0) { - char *exename = alloca (strlen (expanded_name) + 5); + char *exename = (char *) alloca (strlen (expanded_name) + 5); strcat (strcpy (exename, expanded_name), ".exe"); desc = openp (getenv ("PATH"), @@ -1907,7 +1907,7 @@ static int validate_download = 0; static void add_section_size_callback (bfd *abfd, asection *asec, void *data) { - bfd_size_type *sum = data; + bfd_size_type *sum = (bfd_size_type *) data; *sum += bfd_get_section_size (asec); } @@ -1944,7 +1944,8 @@ struct load_progress_section_data { static void load_progress (ULONGEST bytes, void *untyped_arg) { - struct load_progress_section_data *args = untyped_arg; + struct load_progress_section_data *args + = (struct load_progress_section_data *) untyped_arg; struct load_progress_data *totals; if (args == NULL) @@ -2009,7 +2010,7 @@ static void load_section_callback (bfd *abfd, asection *asec, void *data) { struct memory_write_request *new_request; - struct load_section_data *args = data; + struct load_section_data *args = (struct load_section_data *) data; struct load_progress_section_data *section_data; bfd_size_type size = bfd_get_section_size (asec); gdb_byte *buffer; @@ -2048,7 +2049,7 @@ load_section_callback (bfd *abfd, asection *asec, void *data) static void clear_memory_write_data (void *arg) { - VEC(memory_write_request_s) **vec_p = arg; + VEC(memory_write_request_s) **vec_p = (VEC(memory_write_request_s) **) arg; VEC(memory_write_request_s) *vec = *vec_p; int i; struct memory_write_request *mr; @@ -2141,8 +2142,6 @@ generic_load (const char *args, int from_tty) ui_out_text (uiout, ", load size "); ui_out_field_fmt (uiout, "load-size", "%lu", total_progress.data_count); ui_out_text (uiout, "\n"); - /* We were doing this in remote-mips.c, I suspect it is right - for other targets too. */ regcache_write_pc (get_current_regcache (), entry); /* Reset breakpoints, now that we have changed the load image. For @@ -2155,12 +2154,6 @@ generic_load (const char *args, int from_tty) breakpoint_re_set (); - /* FIXME: are we supposed to call symbol_file_add or not? According - to a comment from remote-mips.c (where a call to symbol_file_add - was commented out), making the call confuses GDB if more than one - file is loaded in. Some targets do (e.g., remote-vx.c) but - others don't (or didn't - perhaps they have all been deleted). */ - print_transfer_performance (gdb_stdout, total_progress.data_count, total_progress.write_count, &start_time, &end_time); @@ -2880,7 +2873,7 @@ enum language deduce_language_from_filename (const char *filename) { int i; - char *cp; + const char *cp; if (filename != NULL) if ((cp = strrchr (filename, '.')) != NULL) @@ -2901,7 +2894,8 @@ allocate_symtab (struct compunit_symtab *cust, const char *filename) struct symtab *symtab = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct symtab); - symtab->filename = bcache (filename, strlen (filename) + 1, + symtab->filename + = (const char *) bcache (filename, strlen (filename) + 1, objfile->per_bfd->filename_cache); symtab->fullname = NULL; symtab->language = deduce_language_from_filename (filename);