Message ID | 20190906232807.6191-8-palves@redhat.com |
---|---|
State | New |
Headers | show |
Hi, * On September 7, 2019 1:28 AM, Pedro Alves wrote: > > diff --git a/gdb/infcmd.c b/gdb/infcmd.c > index d7a7e6f933..a12dba23aa 100644 > --- a/gdb/infcmd.c > +++ b/gdb/infcmd.c > @@ -2503,20 +2503,6 @@ kill_command (const char *arg, int from_tty) > printf_unfiltered (_("[Inferior %d (%s) killed]\n"), > infnum, pid_str.c_str ()); > > - /* If we still have other inferiors to debug, then don't mess with > - with their threads. */ > - if (!have_inferiors ()) > - { > - init_thread_list (); /* Destroy thread info. */ Removing 'init_thread_list' skips re-initialization of the 'highest_thread_num' global back to zero. In turn, this causes the following failure: FAIL: gdb.arch/i386-mpx-simple_segv.exp: print nopass stop: display because the output becomes Thread 1 "i386-mpx-simple" received signal SIGSEGV instead of Program received signal SIGSEGV Regards, -Baris Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Gary Kershaw Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928
* On October 1, 2019 12:19 PM, Aktemur, Tankut Baris wrote: > > Hi, > > * On September 7, 2019 1:28 AM, Pedro Alves wrote: > > > > diff --git a/gdb/infcmd.c b/gdb/infcmd.c > > index d7a7e6f933..a12dba23aa 100644 > > --- a/gdb/infcmd.c > > +++ b/gdb/infcmd.c > > @@ -2503,20 +2503,6 @@ kill_command (const char *arg, int from_tty) > > printf_unfiltered (_("[Inferior %d (%s) killed]\n"), > > infnum, pid_str.c_str ()); > > > > - /* If we still have other inferiors to debug, then don't mess with > > - with their threads. */ > > - if (!have_inferiors ()) > > - { > > - init_thread_list (); /* Destroy thread info. */ > > Removing 'init_thread_list' skips re-initialization of the > 'highest_thread_num' global back to zero. In turn, this causes the > following failure: > > FAIL: gdb.arch/i386-mpx-simple_segv.exp: print nopass stop: display > Please ignore this. The failure is caused by another patch, not this one. Regards, -Baris > because the output becomes > > Thread 1 "i386-mpx-simple" received signal SIGSEGV > > instead of > > Program received signal SIGSEGV > > Regards, > -Baris > Intel Deutschland GmbH Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Gary Kershaw Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928
diff --git a/gdb/infcmd.c b/gdb/infcmd.c index d7a7e6f933..a12dba23aa 100644 --- a/gdb/infcmd.c +++ b/gdb/infcmd.c @@ -2503,20 +2503,6 @@ kill_command (const char *arg, int from_tty) printf_unfiltered (_("[Inferior %d (%s) killed]\n"), infnum, pid_str.c_str ()); - /* If we still have other inferiors to debug, then don't mess with - with their threads. */ - if (!have_inferiors ()) - { - init_thread_list (); /* Destroy thread info. */ - - /* Killing off the inferior can leave us with a core file. If - so, print the state we are left in. */ - if (target_has_stack) - { - printf_filtered (_("In %s,\n"), target_longname); - print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC, 1); - } - } bfd_cache_close_all (); }