• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

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

Revisão67b538c17372e0b685852219e8de20f7ea1a56a2 (tree)
Hora2006-09-16 07:50:12
AutorNick Roberts <nickrob@snap...>
CommiterNick Roberts

Mensagem de Log

* async-nat-inferior.h (struct gdb_inferior_status): Remove
unused members.

(inf_ptrace_him): Don't set above deleted members.
(inf_ptrace_attach): Don't call gdb_inferior_destroy as it
is called by gdb_create_inferior later. Merge async conditionals.
(inf_ptrace_detach): Delete signal thread.

Mudança Sumário

Diff

--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -155,14 +155,8 @@ inf_ptrace_him (int pid)
155155 if (target_can_async_p ())
156156 {
157157 gdb_create_inferior (gdb_status, pid);
158-
159158 gdb_signal_thread_create (&gdb_status->signal_status, pid);
160-
161159 gdb_status->attached_in_ptrace = 1;
162- gdb_status->stopped_in_ptrace = 0;
163- gdb_status->stopped_in_softexc = 0;
164-
165- gdb_status->suspend_count = 0;
166160 }
167161
168162 /* START_INFERIOR_TRAPS_EXPECTED is defined in inferior.h, and will
@@ -245,9 +239,6 @@ inf_ptrace_attach (char *args, int from_tty)
245239 if (pid == getpid ()) /* Trying to masturbate? */
246240 error (_("I refuse to debug myself!"));
247241
248- if (target_can_async_p ())
249- gdb_inferior_destroy (gdb_status);
250-
251242 if (from_tty)
252243 {
253244 exec_file = get_exec_file (0);
@@ -262,10 +253,6 @@ inf_ptrace_attach (char *args, int from_tty)
262253 gdb_flush (gdb_stdout);
263254 }
264255
265- if (target_can_async_p ())
266- gdb_create_inferior (gdb_status, pid);
267-
268-
269256 #ifdef PT_ATTACH
270257 errno = 0;
271258 ptrace (PT_ATTACH, pid, (PTRACE_TYPE_ARG3)0, 0);
@@ -276,20 +263,14 @@ inf_ptrace_attach (char *args, int from_tty)
276263 error (_("This system does not support attaching to a process"));
277264 #endif
278265
279- if (target_can_async_p ())
280- {
281- gdb_status->attached_in_ptrace = 1;
282- gdb_status->stopped_in_ptrace = 0;
283- gdb_status->stopped_in_softexc = 0;
284-
285- gdb_status->suspend_count = 0;
286- }
287-
288266 inferior_ptid = pid_to_ptid (pid);
289267 push_target (ptrace_ops_hack);
290268
291- if (target_can_async_p () && gdb_status->attached_in_ptrace)
269+ if (target_can_async_p ())
292270 {
271+ gdb_create_inferior (gdb_status, pid);
272+ gdb_status->attached_in_ptrace = 1;
273+ gdb_status->stopped_in_ptrace = 0;
293274 gdb_signal_thread_create (&gdb_status->signal_status, pid);
294275 stop_soon = STOP_QUIETLY;
295276 wait_for_inferior ();
@@ -348,6 +329,9 @@ inf_ptrace_detach (char *args, int from_tty)
348329 error (_("This system does not support detaching from a process"));
349330 #endif
350331
332+ if (target_can_async_p ())
333+ gdb_inferior_destroy (gdb_status);
334+
351335 inferior_ptid = null_ptid;
352336 unpush_target (ptrace_ops_hack);
353337 }