Date: Tue, 21 Apr 2009 19:57:23 +0200 From: Rafal Jaworowski <raj@semihalf.com> To: Marcel Moolenaar <xcllnt@mac.com> Cc: freebsd-ppc@freebsd.org Subject: Single stepping through atomic ops Message-ID: <36D74D0F-DB5D-4B3D-8A34-2AC72A5209AF@semihalf.com>
next in thread | raw e-mail | index | archive | help
Hi Marcel, I'm writing to you primarily as the gdb maintainer :-) There's a problem with current gdb in base when single stepping through atomic sequences on PowerPC (and presumably other archs with the load + conditional store approach for atomic ops). The effect is a hang because we endlessly loop due to the [always] lost reservation at the time of a closing stwcx. This is a known problem with gdb and it's fixed with newer versions, but the patches are not applicable to our gdb due to some infrastructure changes. The quick fix for 6.1.1 is here: http://people.freebsd.org/~raj/patches/powerpc/gdb-ppc-single-step.diff It's mainly a transplant of two fixes from the gdb repository (1.275, 1.276, deal_with_atomic_sequence) adjusted to our older gdb code, but it's ugly #ifdef'ed __ppc__. In order to do it cleanly we would need to change the signature of the SOFTWARE_SINGLE_STEP method so it returns a value (this is how newer gdb works), but it would affect gdb for all architectures. Do you see any objections for growing a return value here? Another direction would be importing a newer gdb code base, and be able to apply the fixes directly and cleanly (if at all required), but am not sure if there are any plans to upgrade gdb in base? Let me know your comments. Rafal
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36D74D0F-DB5D-4B3D-8A34-2AC72A5209AF>