/* Core dump and executable file functions below target vector, for GDB.
- Copyright (C) 1986-2014 Free Software Foundation, Inc.
+ Copyright (C) 1986-2015 Free Software Foundation, Inc.
This file is part of GDB.
sections. */
TRY_CATCH (except, RETURN_MASK_ERROR)
{
- target_find_new_threads ();
+ target_update_thread_list ();
}
if (except.reason < 0)
/* Now, set up the frame cache, and print the top of stack. */
reinit_frame_cache ();
print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1);
+
+ /* Current thread should be NUM 1 but the user does not know that.
+ If a program is single threaded gdb in general does not mention
+ anything about threads. That is why the test is >= 2. */
+ if (thread_count () >= 2)
+ {
+ TRY_CATCH (except, RETURN_MASK_ERROR)
+ {
+ thread_command (NULL, from_tty);
+ }
+ if (except.reason < 0)
+ exception_print (gdb_stderr, except);
+ }
}
static void
/* Otherwise, this isn't a "threaded" core -- use the PID field, but
only if it isn't a fake PID. */
- inf = find_inferior_pid (ptid_get_pid (ptid));
+ inf = find_inferior_ptid (ptid);
if (inf != NULL && !inf->fake_pid_p)
return normal_pid_to_str (ptid);