int remote_debug = 0;
/* Sbrk location on entry to main. Used for statistics only. */
-#ifdef HAVE_SBRK
+#ifdef HAVE_USEFUL_SBRK
char *lim_at_start;
#endif
we just finished executing did not resume the inferior's execution.
If it did resume the inferior, we will do that check after
the inferior stopped. */
- if (has_stack_frames () && !is_running (inferior_ptid))
+ if (has_stack_frames () && inferior_thread ()->state != THREAD_RUNNING)
check_frame_language_change ();
discard_cleanups (cleanup_if_error);
return cmd;
}
\f
-/* Print the GDB banner. */
+/* See top.h. */
void
-print_gdb_version (struct ui_file *stream)
+print_gdb_version (struct ui_file *stream, bool interactive)
{
/* From GNU coding standards, first line is meant to be easy for a
program to parse, and is just canonical program name and version
fprintf_filtered (stream, "\
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\
\nThis is free software: you are free to change and redistribute it.\n\
-There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n\
-and \"show warranty\" for details.\n");
+There is NO WARRANTY, to the extent permitted by law.");
+
+ if (!interactive)
+ return;
+
+ fprintf_filtered (stream, ("\nType \"show copying\" and "
+ "\"show warranty\" for details.\n"));
/* After the required info we print the configuration information. */
{
fprintf_filtered (stream, "%s", host_name);
}
- fprintf_filtered (stream, "\".\n\
-Type \"show configuration\" for configuration details.");
+ fprintf_filtered (stream, "\".\n");
+
+ fprintf_filtered (stream, _("Type \"show configuration\" "
+ "for configuration details.\n"));
if (REPORT_BUGS_TO[0])
{
fprintf_filtered (stream,
- _("\nFor bug reporting instructions, please see:\n"));
+ _("For bug reporting instructions, please see:\n"));
fprintf_filtered (stream, "%s.\n", REPORT_BUGS_TO);
}
fprintf_filtered (stream,
_("Find the GDB manual and other documentation \
-resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"));
+resources online at:\n <http://www.gnu.org/software/gdb/documentation/>."));
+ fprintf_filtered (stream, "\n\n");
fprintf_filtered (stream, _("For help, type \"help\".\n"));
fprintf_filtered (stream, _("Type \"apropos word\" to search for \
commands related to \"word\"."));
kill_or_detach (struct inferior *inf, void *args)
{
struct qt_args *qt = (struct qt_args *) args;
- struct thread_info *thread;
if (inf->pid == 0)
return 0;
- thread = any_thread_of_process (inf->pid);
+ thread_info *thread = any_thread_of_inferior (inf);
if (thread != NULL)
{
- switch_to_thread (thread->ptid);
+ switch_to_thread (thread);
/* Leave core files alone. */
if (target_has_execution)
if (inf->attach_flag)
fprintf_filtered (stb,
_("\tInferior %d [%s] will be detached.\n"), inf->num,
- target_pid_to_str (pid_to_ptid (inf->pid)));
+ target_pid_to_str (ptid_t (inf->pid)));
else
fprintf_filtered (stb,
_("\tInferior %d [%s] will be killed.\n"), inf->num,
- target_pid_to_str (pid_to_ptid (inf->pid)));
+ target_pid_to_str (ptid_t (inf->pid)));
return 0;
}