Date: Fri, 2 Jul 2010 00:27:10 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: John Baldwin <john@baldwin.cx> Cc: freebsd-arch@freebsd.org Subject: Re: Access to siginfo for the signal from debugger Message-ID: <20100701212710.GP13238@deviant.kiev.zoral.com.ua> In-Reply-To: <201007011705.26173.john@baldwin.cx> References: <20100701134217.GM13238@deviant.kiev.zoral.com.ua> <201007011705.26173.john@baldwin.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
--d81eMP4bt36Qfuc6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 01, 2010 at 05:05:26PM -0400, John Baldwin wrote: > On Thursday 01 July 2010 09:42:17 am Kostik Belousov wrote: > > Hi, > > below is the patch that provides the debugger with access to siginfo > > of the signal that stopped the debuggee. This allows to see a lot more > > details for the cause of the process stop. E.g. you can see a fault > > address if process get SIGSEGV or SIGBUS, you can distinguish between > > breakpoint-generated SIGTRAP and non-breakpoint, whether the signal > > was send due to external event etc. > >=20 > > The change to struct ptrace_lwpinfo is backward-compatible in the sense > > that programs that were compiled with old definition for the struct will > > work on new kernels. >=20 > Nice! Does gdb "just work" with these changes or does it need patching a= s=20 > well? It should "just work", and my testing seems to confirm this. gdb uses PT_LWPINFO to enumerate the thread ids, and I checked it on mt process. As I said, the change is ABI backward-compatible, i.e. you do not need even to recompile the old program for new kernel. Sure, gdb cannot show additional available information without modifications. --d81eMP4bt36Qfuc6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkwtCC0ACgkQC3+MBN1Mb4jjAwCdG8/1I3EXl1uzNfqNjI35ZbBj 7eYAn2ZRUrNca7m/H6aUMRBTlTyjMhsM =sduh -----END PGP SIGNATURE----- --d81eMP4bt36Qfuc6--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100701212710.GP13238>