This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

src/gdb ChangeLog darwin-nat.c


CVSROOT:	/cvs/src
Module name:	src
Changes by:	brobecke@sourceware.org	2011-07-01 18:36:28

Modified files:
	gdb            : ChangeLog darwin-nat.c 

Log message:
	[Darwin] Do not crash (failed assertion) after PT_KILL ptrace error
	
	It might not be a debugger bug that caused the PT_KILL ptrace operation
	to fail.  So emit a warning instead, and try to continue.
	
	This patch also tries to handle the case where ptrace return -1,
	but left errno set to zero.  According to the ptrace man page,
	it is possible for some ptrace operations to return -1 in non-error
	situations, and to detect those situations, it explains that errno
	should be set prior to calling ptrace, and then checked again after.
	
	gdb/ChangeLog:
	
	* darwin-nat.c (darwin_ptrace): Add documentation.
	Set errno to zero before calling ptrace.  If ptrace returns
	-1 and errno is zero, then change then return zero.
	(darwin_kill_inferior): Issue a warning instead of triggering
	a failed assertion when the PT_KILL ptrace operations returned
	nonzero.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.13145&r2=1.13146
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/darwin-nat.c.diff?cvsroot=src&r1=1.25&r2=1.26


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]