X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gdb%2Fsymfile.c;h=8843781e13ae0cac58fde58ede2b2e3676aec55c;hb=4e962e74e45f2b0365e5b21504f33480c468ff00;hp=13a07e4dc0e57eff06680b25d921c5009dc20e07;hpb=268a13a5a3f7c6b9b6ffc5ac2d1b24eb41f3fbdc;p=external%2Fbinutils.git diff --git a/gdb/symfile.c b/gdb/symfile.c index 13a07e4..8843781 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1706,7 +1706,7 @@ set_initial_language (void) if (lang == language_unknown) { - char *name = main_name (); + const char *name = main_name (); struct symbol *sym = lookup_symbol (name, NULL, VAR_DOMAIN, NULL).symbol; if (sym != NULL) @@ -2095,9 +2095,9 @@ generic_load (const char *args, int from_tty) CORE_ADDR entry = bfd_get_start_address (loadfile_bfd.get ()); entry = gdbarch_addr_bits_remove (target_gdbarch (), entry); uiout->text ("Start address "); - uiout->field_fmt ("address", "%s", paddress (target_gdbarch (), entry)); + uiout->field_core_addr ("address", target_gdbarch (), entry); uiout->text (", load size "); - uiout->field_fmt ("load-size", "%lu", total_progress.data_count); + uiout->field_unsigned ("load-size", total_progress.data_count); uiout->text ("\n"); regcache_write_pc (get_current_regcache (), entry); @@ -2140,29 +2140,29 @@ print_transfer_performance (struct ui_file *stream, if (uiout->is_mi_like_p ()) { - uiout->field_fmt ("transfer-rate", "%lu", rate * 8); + uiout->field_unsigned ("transfer-rate", rate * 8); uiout->text (" bits/sec"); } else if (rate < 1024) { - uiout->field_fmt ("transfer-rate", "%lu", rate); + uiout->field_unsigned ("transfer-rate", rate); uiout->text (" bytes/sec"); } else { - uiout->field_fmt ("transfer-rate", "%lu", rate / 1024); + uiout->field_unsigned ("transfer-rate", rate / 1024); uiout->text (" KB/sec"); } } else { - uiout->field_fmt ("transferred-bits", "%lu", (data_count * 8)); + uiout->field_unsigned ("transferred-bits", (data_count * 8)); uiout->text (" bits in <1 sec"); } if (write_count > 0) { uiout->text (", "); - uiout->field_fmt ("write-rate", "%lu", data_count / write_count); + uiout->field_unsigned ("write-rate", data_count / write_count); uiout->text (" bytes/write"); } uiout->text (".\n"); @@ -2596,9 +2596,7 @@ reread_symbols (void) set_objfile_per_bfd (objfile); objfile->original_name - = (char *) obstack_copy0 (&objfile->objfile_obstack, - original_name.c_str (), - original_name.size ()); + = obstack_strdup (&objfile->objfile_obstack, original_name); /* Reset the sym_fns pointer. The ELF reader can change it based on whether .gdb_index is present, and we need it to @@ -2882,9 +2880,7 @@ allocate_compunit_symtab (struct objfile *objfile, const char *name) Just save the basename to avoid path issues (too long for display, relative vs absolute, etc.). */ saved_name = lbasename (name); - cu->name - = (const char *) obstack_copy0 (&objfile->objfile_obstack, saved_name, - strlen (saved_name)); + cu->name = obstack_strdup (&objfile->objfile_obstack, saved_name); COMPUNIT_DEBUGFORMAT (cu) = "unknown"; @@ -3958,8 +3954,8 @@ that lies within the boundaries of this symbol file in memory."), &cmdlist); c = add_cmd ("load", class_files, load_command, _("\ -Dynamically load FILE into the running program, and record its symbols\n\ -for access from GDB.\n\ +Dynamically load FILE into the running program.\n\ +FILE symbols are recorded for access from GDB.\n\ Usage: load [FILE] [OFFSET]\n\ An optional load OFFSET may also be given as a literal address.\n\ When OFFSET is provided, FILE must also be provided. FILE can be provided\n\