• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Révisioncd8f80dc7f1488184d8968b1adb71986027402b5 (tree)
l'heure2006-09-14 11:26:04
AuteurNick Roberts <nickrob@snap...>
CommiterNick Roberts

Message de Log

(linux_nat_resume): Move async stuff from
i386_linux_resume to here.
(linux_nat_attach): Add initial process for sync too.

Change Summary

Modification

--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -48,6 +48,7 @@
4848 #include "gdbthread.h" /* for struct thread_info etc. */
4949 #include "gdb_stat.h" /* for struct stat */
5050 #include <fcntl.h> /* for O_RDONLY */
51+#include "inf-loop.h"
5152 #include "async-nat-inferior.h"
5253
5354 #ifndef O_LARGEFILE
@@ -1005,19 +1006,20 @@ linux_nat_attach (char *args, int from_tty)
10051006 attach all of them. */
10061007 linux_ops->to_attach (args, from_tty);
10071008
1009+ /* Add the initial process as the first LWP to the list. */
1010+ inferior_ptid = BUILD_LWP (GET_PID (inferior_ptid), GET_PID (inferior_ptid));
1011+ lp = add_lwp (inferior_ptid);
1012+
10081013 if (!target_can_async_p ())
10091014 {
1010- /* Add the initial process as the first LWP to the list. */
1011- inferior_ptid = BUILD_LWP (GET_PID (inferior_ptid), GET_PID (inferior_ptid));
1012- lp = add_lwp (inferior_ptid);
1013-
10141015 /* Make sure the initial process is stopped. The user-level threads
10151016 layer might want to poke around in the inferior, and that won't
10161017 work if things haven't stabilized yet. */
10171018 pid = my_waitpid (GET_PID (inferior_ptid), &status, 0);
10181019 if (pid == -1 && errno == ECHILD)
10191020 {
1020- warning (_("%s is a cloned process"), target_pid_to_str (inferior_ptid));
1021+ warning (_("%s is a cloned process"),
1022+ target_pid_to_str (inferior_ptid));
10211023
10221024 /* Try again with __WCLONE to check cloned processes. */
10231025 pid = my_waitpid (GET_PID (inferior_ptid), &status, __WCLONE);
@@ -1162,6 +1164,7 @@ resume_set_callback (struct lwp_info *lp, void *data)
11621164 static void
11631165 linux_nat_resume (ptid_t ptid, int step, enum target_signal signo)
11641166 {
1167+ struct target_waitstatus status;
11651168 struct lwp_info *lp;
11661169 int resume_all;
11671170
@@ -1251,6 +1254,26 @@ linux_nat_resume (ptid_t ptid, int step, enum target_signal signo)
12511254 iterate_over_lwps (resume_callback, NULL);
12521255
12531256 linux_ops->to_resume (ptid, step, signo);
1257+
1258+ if (target_can_async_p ())
1259+ {
1260+ status.kind = TARGET_WAITKIND_SPURIOUS;
1261+ gdb_process_events (gdb_status, &status, 0, 0);
1262+
1263+ if (gdb_post_pending_event ())
1264+ {
1265+ /* QUESTION: Do I need to lie about target_executing here? */
1266+ if (target_is_async_p ())
1267+ target_executing = 1;
1268+ return;
1269+ }
1270+
1271+ target_async (inferior_event_handler, 0);
1272+ }
1273+
1274+ if (target_is_async_p ())
1275+ target_executing = 1;
1276+
12541277 if (debug_linux_nat)
12551278 fprintf_unfiltered (gdb_stdlog,
12561279 "LLR: %s %s, %s (resume event thread)\n",