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 ada-tasks.c


CVSROOT:	/cvs/src
Module name:	src
Changes by:	brobecke@sourceware.org	2010-09-22 22:50:55

Modified files:
	gdb            : ChangeLog ada-tasks.c 

Log message:
	[Ada] Do not compute task ptid when debugging core file
	
	After thread support over core files was added for GNU/Linux was added,
	we started noticing the following type of crash when trying to perform
	task switches (this is a bit accademic, since task switching is not
	supported when debugging core files - this is what our testcase was
	verifying).
	
	(please check out the comment inside ada-tasks.c:task_command for
	more details on this topic)
	
	The reason for the crash comes from the fact that the GNU/Linux thread
	layer now gets pushed on the target stack, causing the associated
	to_get_ada_task_ptid target method to be activated.  This routine
	makes the assumption that, for all threads, the private area is not
	NULL.  This is incorrect in the case of core files, as the core layer
	creates some threads with no private data.
	
	But, taking a step back, we don't need to try to compute the task ptid,
	as we'll never be using it anyways (we only use it for task switching).
	So the fix is to avoid the ptid computation altogether when debugging
	a core file.
	
	gdb/ChangeLog:
	
	* ada-tasks.c (read_atcb): Do not compute the task ptid when
	debugging a core file.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12197&r2=1.12198
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ada-tasks.c.diff?cvsroot=src&r1=1.30&r2=1.31


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