From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29922 invoked by alias); 16 Mar 2012 14:52:25 -0000 Received: (qmail 29905 invoked by uid 22791); 16 Mar 2012 14:52:25 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Mar 2012 14:52:12 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q2GEq6xc006360; Fri, 16 Mar 2012 15:52:06 +0100 (CET) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q2GEq4Q4019189; Fri, 16 Mar 2012 15:52:04 +0100 (CET) Date: Fri, 16 Mar 2012 14:52:00 -0000 Message-Id: <201203161452.q2GEq4Q4019189@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: tromey@redhat.com CC: mark.kettenis@xs4all.nl, sergiodj@redhat.com, gdb-patches@sourceware.org In-reply-to: <87ipi5y4qt.fsf@fleche.redhat.com> (message from Tom Tromey on Thu, 15 Mar 2012 14:43:38 -0600) Subject: Re: [PATCH 2/3] Implement new features needed for handling SystemTap probes References: <201203101655.q2AGte2M019374@glazunov.sibelius.xs4all.nl> <87wr6pq4s3.fsf@fleche.redhat.com> <201203130858.q2D8w5fe030670@glazunov.sibelius.xs4all.nl> <87ipi5y4qt.fsf@fleche.redhat.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-03/txt/msg00612.txt.bz2 > From: Tom Tromey > Date: Thu, 15 Mar 2012 14:43:38 -0600 > > >>>>> "Mark" == Mark Kettenis writes: > > Tom> sdt.h is really more like an ELF feature. > > Mark> Can you elaborate on that? I've googled around a bit but didn't > Mark> really find anything that describes how SystemTap works; only stuff > Mark> that describes how great it is and how it can be used. I did notice > Mark> that DTrace uses a header file with that name as well, but it seems > Mark> that the interfaces defined in the DTrace sdt.h are completely > Mark> different from the SystemTap one. > > Yeah, sorry. That was too brief. > > The static probes in this case are intended to be source- (but not > binary-) compatible with DTrace. Don't you mean the other way around? As far as I can tell the SystemTap macros have different names than their DTrace counterparts. And I'd say that for GDB it's only binary compatibility that really matters here. > They are implemented entirely in a header file (technically two > headers but one is of the "config.h" variety) and assume ELF and > GCC. > > The header is independent of SystemTap proper; it just came from the > SystemTap project and so it is maintained in that source repository. > There's been some talk that it will be used as the basis for UST markers > as well, but AFAIK this work hasn't happened yet. > > I don't know of any barrier to this header working as-is on other > ELF+GCC platforms. I haven't tried it myself. So you are saying that, at least in principle, it should be possible to use the SystemTap toolchain on any ELF-based system to do user-space tracing without needing any kernel support? That'd be cool. > If you still want this in the Linux tdep files, I suppose it can be > done. And if that's the case, I think having them where they are currently should be fine. But perhaps in that case setting the gdbarch hooks needs to be moved from the Linux tdep files into i386_elf_init_abi().