Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb If we are asked to step on ptid(-...



details:   https://anonhg.NetBSD.org/src/rev/bacba5fe91e7
branches:  trunk
changeset: 778931:bacba5fe91e7
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Apr 21 00:16:35 2012 +0000

description:
If we are asked to step on ptid(-1,0,0), then step on our inferior_thread
instead, which is the main thread instead of the currently executing thread
which is not what we want, since we've been running and nother thread might
have just started.

diffstat:

 external/gpl3/gdb/dist/gdb/nbsd-thread.c |  2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diffs (12 lines):

diff -r 71ef3944c15a -r bacba5fe91e7 external/gpl3/gdb/dist/gdb/nbsd-thread.c
--- a/external/gpl3/gdb/dist/gdb/nbsd-thread.c  Fri Apr 20 22:43:19 2012 +0000
+++ b/external/gpl3/gdb/dist/gdb/nbsd-thread.c  Sat Apr 21 00:16:35 2012 +0000
@@ -241,6 +241,8 @@
      isn't anything we can do but pass it down to the ptrace call;
      given the flexibility of the LWP-to-thread mapping, this might or
      might not accomplish what the user wanted. */
+  if (ptid_get_pid(ptid) == -1)
+    ptid = inferior_ptid;
   beneath->to_resume (beneath, ptid, step, signo);
 
   cached_thread = minus_one_ptid;



Home | Main Index | Thread Index | Old Index