[PATCH] btrace, x86: disable on some processors
Metzger, Markus T
markus.t.metzger@intel.com
Fri Feb 22 09:19:00 GMT 2013
> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Thursday, February 21, 2013 7:39 PM
Thanks for your review.
> > + file = syscall (SYS_perf_event_open, &attr, child, -1, -1, 0);
> > + if (file >= 0)
> > + close (file);
> > +
>
> I would put here one kill (child, SIGKILL); before that PTRACE_KILL.
> See linux-nat.c kill_callback or:
> http://sourceware.org/ml/archer/2011-q1/msg00102.html
> It probably cannot happen here but just to be sure.
>
>
> > + status = ptrace (PTRACE_KILL, child, NULL, NULL);
> > + if (status != 0)
> > + warning (_("test branch tracing: cannot kill forked child: %s."),
> > + strerror (errno));
> > + else
> > + {
> > + pid = waitpid (child, &status, 0);
When I send SIGKILL and then PTRACE_KILL, should I wait unconditionally?
I.e. can we be sure that our child still ptraced when it receives the SIGKILL?
Regards,
Markus.
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
More information about the Gdb-patches
mailing list