forked from Imagelibrary/binutils-gdb
* ui-file.h (ui_file_xstrdup): Mention that the length argument
may be NULL. * ui-file.c (ui_file_xstrdup): Don't dereference LENGTH if it is NULL. * aix-thread.c (aix_thread_extra_thread_info): Pass NULL as length parameter to ui_file_xstrdup. * arm-tdep.c (_initialize_arm_tdep): Ditto. * infrun.c (print_target_wait_results): Ditto. * language.c (add_language): Ditto. * linespec.c (cplusplus_error): Ditto. * remote.c (escape_buffer): Ditto. * typeprint.c (type_to_string): Ditto. * utils.c (error_stream): Ditto. * varobj.c (value_get_print_value): Ditto. * xtensa-tdep.c (xtensa_verify_config): Replace `dummy' local with `length' local. Pass it to ui_file_xstrdup, and avoid an strlen call. * gdbarch.sh (verify_gdbarch): Ditto. * gdbarch.c: Regenerate. * cli/cli-setshow.c (do_setshow_command): Pass NULL as length parameter to ui_file_xstrdup. * python/python-frame.c (frapy_str): Ditto. * python/python-type.c (typy_str): Use the length local instead of calling strlen. * python/python-value.c (valpy_str): Pass NULL as length parameter to ui_file_xstrdup.
This commit is contained in:
@@ -1943,7 +1943,6 @@ print_target_wait_results (ptid_t waiton_ptid, ptid_t result_ptid,
|
||||
char *status_string = target_waitstatus_to_string (ws);
|
||||
struct ui_file *tmp_stream = mem_fileopen ();
|
||||
char *text;
|
||||
long len;
|
||||
|
||||
/* The text is split over several lines because it was getting too long.
|
||||
Call fprintf_unfiltered (gdb_stdlog) once so that the text is still
|
||||
@@ -1963,7 +1962,7 @@ print_target_wait_results (ptid_t waiton_ptid, ptid_t result_ptid,
|
||||
"infrun: %s\n",
|
||||
status_string);
|
||||
|
||||
text = ui_file_xstrdup (tmp_stream, &len);
|
||||
text = ui_file_xstrdup (tmp_stream, NULL);
|
||||
|
||||
/* This uses %s in part to handle %'s in the text, but also to avoid
|
||||
a gcc error: the format attribute requires a string literal. */
|
||||
|
||||
Reference in New Issue
Block a user