This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
src/gdb ChangeLog darwin-nat.c
- From: brobecke at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: Mon, 06 May 2013 12:41:14 +0000
- Subject: src/gdb ChangeLog darwin-nat.c
CVSROOT: /cvs/src
Module name: src
Changes by: brobecke@sourceware.org 2013-05-06 12:41:14
Modified files:
gdb : ChangeLog darwin-nat.c
Log message:
darwin: warning resuming inferior after attach
This patch avoids a warning when resuming the execution of a program
that we attached to. For instance:
(gdb) attach 29989
(gdb) continue
Continuing.
warning: Mach error at "/[...]/darwin-nat.c:738" in function
"darwin_resume_thread": (os/kern) failure (0x5)
The warning is relatively harmless, but worrisome for the average
user. The warning comes from the fact that darwin_wait recorded
that the fake stop event corresponding to the suspend action was
caused by the main thread being suspended on a SIGTRAP. As a result
of this, when resuming the program's execution, we try to resume
the thread's execution as well. This is where the issue occurs,
as the thread was not in fact suspended, thus triggering the warning.
gdb/ChangeLog:
* darwin-nat.c (darwin_setup_fake_stop_event): New function.
(darwin_attach): Adjust using darwin_setup_fake_stop_event.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.15507&r2=1.15508
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/darwin-nat.c.diff?cvsroot=src&r1=1.44&r2=1.45