From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3787 invoked by alias); 5 Mar 2011 00:03:28 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 3773 invoked by uid 22791); 5 Mar 2011 00:03:27 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_GJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Tom Tromey Cc: Project Archer Subject: Re: glibc with probes In-Reply-To: Tom Tromey's message of Friday, 4 March 2011 11:56:30 -0700 References: <20110303191647.8F70B183F97@magilla.sf.frob.com> Message-Id: <20110305000322.BBE09181F6E@magilla.sf.frob.com> Date: Sat, 05 Mar 2011 00:03:00 -0000 X-SW-Source: 2011-q1/txt/msg00118.txt.bz2 > Rayson's patch is still incomplete. I don't recall offhand whether I > thought it still needed an incompatible change, but it definitely can't > be used in the situation we wanted it for. If that's still so, I think it's news to Rayson. There have been numerous iterations of this code. The current code is on the branch roland/systemtap in the glibc.git repository. If you have more probes you want added, or changes you want made to the ones there now, please tell rho@redhat.com and CC both the libc-alpha@sourceware.org and systemtap@sourceware.org mailing lists. > Roland> I've used this for some trivial manual tests of the > Roland> setjmp/longjmp probes. > > Sounds great, thanks. We are pretty close to being able to test this in > gdb as well. Sergio is hard at work on the very last piece, namely > parsing the probe arguments. I plan to write tests for the setjmp/longjmp probes in the systemtap suite shortly. But aside from that, you will be the main user of it. So please do try to test them and let me know if it works for you. As I recall, the only probe argument you wanted was the (demangled) PC where longjmp returns to. That's the third argument in the longjmp{,_target} probes. For your purposes, I don't think you care between longjmp and longjmp_target. The difference between them is in what the backtrace from that point looks like (longjmp's caller or setjmp's caller). For testing purposes, note that there are two or three instances of each probe, and four (or six, depending how you count) ways to reach one of them. There are longjmp, _longjmp, and siglongjmp names you can use. Then, when you compile with -D_FORTIFY_SOURCE=1 (or =2), you are getting to a different internal entry code path when you use any of those names. So for thorough testing, use all three flavors in the source code, and compile that both with and without _FORTIFY_SOURCE. (And, of course, do all that for both 32-bit and 64-bit x86.) Thanks, Roland