This is the mail archive of the gdb-patches@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]

Re: [PATCH 2/3] Implement new features needed for handling SystemTap probes


> From: Tom Tromey <tromey@redhat.com>
> Date: Thu, 15 Mar 2012 14:43:38 -0600
> 
> >>>>> "Mark" == Mark Kettenis <mark.kettenis@xs4all.nl> 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().


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