public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/25346] support enum context variables
Date: Fri, 18 Dec 2020 12:29:48 +0000	[thread overview]
Message-ID: <bug-25346-6586-iGOkTQSwbS@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25346-6586@http.sourceware.org/bugzilla/>

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
Maybe it would also be useful to add a way to compute a constant using a
userspace expression.  Basically, generate a C source file like this

int systemtap_expression_1 = <<insertion expression 1 here>>;
int systemtap_expression_2 = <<insertion expression 2 here>>;

Compile this to an object file, and extract the constant from there.

Or use inline asm and search for some marker string around the constants that
were spliced in using inline asm arguments.

This would work for arbitrary C expressions that evaluate to compile-time
constants, and it sidesteps the kernel vs userspace context issue.

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

  parent reply	other threads:[~2020-12-18 12:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-04 18:20 [Bug translator/25346] New: " fche at redhat dot com
2020-12-18  6:33 ` [Bug translator/25346] " craig.ringer at 2ndquadrant dot com
2020-12-18  6:41 ` craig.ringer at 2ndquadrant dot com
2020-12-18 12:29 ` fweimer at redhat dot com [this message]
2021-01-06  0:58 ` craig.ringer at 2ndquadrant dot com
2021-01-08  8:32 ` craig.ringer at 2ndquadrant dot com
2021-01-20 15:21 ` scox at redhat dot com
2021-02-08 18:19 ` scox at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-25346-6586-iGOkTQSwbS@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).