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 objc-lang.c ChangeLog


CVSROOT:	/cvs/src
Module name:	src
Changes by:	vapier@sourceware.org	2010-04-19 19:51:43

Modified files:
	gdb            : objc-lang.c ChangeLog 

Log message:
	gdb: objc-lang: check symbol name before accessing memory
	
	The current ObjC logic will check both the symbol name and the target
	address space when trying to locate an appropriate selector.  The problem
	is that first the target address space is checked before the symbol name.
	This may lead to a lot of unnecessary host<->target transactions when
	dealing with a non-OjbC target that does use function descriptors to
	describe functions as every symbol will have its FD read just to have the
	result thrown away with non-matching symbol names.
	
	It also may lead to problems when a non-FD symbol is found that points near
	the end of the address space as the target will throw up a memory_error().
	One such example are symbols that are not functions, smaller than a FD,
	and are the last valid location.  Obviously treating it as a larger data
	struct can cause memory overflows.
	
	So to speed things up and not screw over such targets, check the symbol
	name (which we already have locally) first before attempting to read the
	function's descriptor.  This fixes breakpoints with Blackfin Linux FDPIC
	ELFs, and seems to cause no native regressions on my x86_64/Linux system.
	
	Signed-off-by: Mike Frysinger <vapier@gentoo.org>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/objc-lang.c.diff?cvsroot=src&r1=1.86&r2=1.87
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.11638&r2=1.11639


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