public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/19930] New: @cast headers should allow other languages
@ 2016-04-08 20:42 jistone at redhat dot com
  0 siblings, 0 replies; only message in thread
From: jistone at redhat dot com @ 2016-04-08 20:42 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=19930

            Bug ID: 19930
           Summary: @cast headers should allow other languages
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: jistone at redhat dot com
  Target Milestone: ---

Currently, with @cast(ptr,"type","<header>") we go into make_typequery_umod and
build it like:

  gcc -shared -g -fno-eliminate-unused-debug-types -xc /dev/null \
    -o name -include header

In particular, that "-xc" leads it to be interpreted as C only.

Conceptually, it ought to be fine for us to support C++ headers too.  Perhaps
the cast could allow something like "c<header>" and "c++<header>", where the
latter will now map to "-xc++".

I'm not sure if any other languages could work like this, but we should remain
open to the possibility.

We may also need to let the user specify arbitrary options somehow, e.g. for
things like "-std=c++11".  Dialect alone could be mapped "c++11<header>", but I
imagine many other options might be useful too.  @cast lines may start to get
unwieldy, but macros can alleviate some repetition.


PS- as a workaround, it should already be possible for users to compile an
object however they need, then @cast(ptr,"type","/path/to/object")

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-08 20:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 20:42 [Bug translator/19930] New: @cast headers should allow other languages jistone at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).