[Bug remote/12228] thread.c:598: internal-error: is_thread_state: Assertion `tp' failed.

aburgess at broadcom dot com sourceware-bugzilla@sourceware.org
Fri Mar 25 15:26:00 GMT 2011


http://sourceware.org/bugzilla/show_bug.cgi?id=12228

Andrew Burgess <aburgess at broadcom dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aburgess at broadcom dot
                   |                            |com

--- Comment #1 from Andrew Burgess <aburgess at broadcom dot com> 2011-03-25 15:25:55 UTC ---
There are further problems that the previous patch doesn't fix, if after
killing the remote target that then restarts you might be tempted to try "info
program" or "info threads" both of these will run into similar problems.

The patch below uses the remote_start_remote method in the same way as when we
initially connect to the target to setup the thread state.

diff -u -p -r1.10 -r1.11
--- ./binutils/gdb/remote.c    27 Oct 2010 16:33:30 -0000    1.10
+++ ./binutils/gdb/remote.c    25 Mar 2011 15:13:01 -0000    1.11
@@ -6674,10 +6674,25 @@ extended_remote_mourn_1 (struct target_o

       if (rs->buf[0] == 'S' || rs->buf[0] == 'T')
         {
-          /* Assume that the target has been restarted.  Set inferior_ptid
-         so that bits of core GDB realizes there's something here, e.g.,
-         so that the user can say "kill" again.     */
-          inferior_ptid = magic_null_ptid;
+              /* APB: 25-March-2010: Fix for issue TLFIREPATH-2263.
+                 When we kill the remote target the target is actual
+                 reset, and then enters the stop state, just like
+                 when we originally connect to it - we want the
+                 threads to reflect that.  */
+              struct gdb_exception ex;
+              struct start_remote_args args;
+              
+              args.from_tty = 0;
+              args.target = target;
+              args.extended_p = 1;
+
+              printf_filtered (_("Remote target reset.\n"));
+
+          /* Assume that the target has been restarted. Attempt to
+                 restart the target.  */
+              ex = catch_exception (uiout, remote_start_remote, &args,
RETURN_MASK_ALL);
+              if (ex.reason < 0)
+                throw_exception (ex);
         }
     }
     }

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the Gdb-prs mailing list