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 ia64-hpux-nat.c ia64-hpux-td ...


CVSROOT:	/cvs/src
Module name:	src
Changes by:	brobecke@sourceware.org	2011-01-13 16:24:27

Modified files:
	gdb            : ChangeLog ia64-hpux-nat.c ia64-hpux-tdep.c 
	                 ia64-tdep.c ia64-tdep.h target.h 

Log message:
	[ia64-hpux] unwinding bsp value from system call
	
	This fixes unwinding from a thread that is stopped inside a system call.
	This can be seen when switching to a thread that is stopped doing a
	pthread_cond_wait, for instance...
	
	The comments inside the code should explain what is happening in our
	case (the HP-UX exception in the case of system calls): Under certain
	circumstances (program stopped inside syscall), the offset to apply to
	the current BSP in order to compute the previous BSP is not the usual
	CFM & 0x7f.
	
	We parts in this patch:
	
	1. Figuring out that we are stopped inside a syscal: This requires
	a TT_LWP_RUREGS ttrace call, which is not directly possible from
	ia64-tdep.c.  So use defined a new TARGET_OBJECT_HPUX_UREGS object
	to request it from the -nat side.
	
	2. Add a gdbarch_tdep method that allows us to change the default
	behavior on ia64-hpux, permitting us to have a different "size of
	register frame" in that one particular case.
	
	gdb/ChangeLog:
	
	* target.h (enum target_object): Add TARGET_OBJECT_HPUX_UREGS.
	* ia64-tdep.h (struct frame_info): forward declaration.
	(struct gdbarch_tdep): Add field size_of_register_frame.
	* ia64-tdep.c (ia64_access_reg): Use tdep->size_of_register_frame
	to determine the size of the register frame.
	(ia64_size_of_register_frame): New function.
	(ia64_gdbarch_init): Set tdep->size_of_register_frame.
	* ia64-hpux-tdep.c: Include "target.h" and "frame.h".
	(IA64_HPUX_UREG_REASON): New macro.
	(ia64_hpux_stopped_in_syscall, ia64_hpux_size_of_register_frame):
	New functions.
	(ia64_hpux_init_abi): Set tdep->size_of_register_frame.
	* ia64-hpux-nat.c (ia64_hpux_xfer_uregs): New function.
	(ia64_hpux_xfer_partial): Add handling of TARGET_OBJECT_HPUX_UREGS
	objects.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.12472&r2=1.12473
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ia64-hpux-nat.c.diff?cvsroot=src&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ia64-hpux-tdep.c.diff?cvsroot=src&r1=1.1&r2=1.2
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ia64-tdep.c.diff?cvsroot=src&r1=1.209&r2=1.210
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ia64-tdep.h.diff?cvsroot=src&r1=1.16&r2=1.17
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/target.h.diff?cvsroot=src&r1=1.195&r2=1.196


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