From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12148 invoked by alias); 13 Feb 2006 20:44:27 -0000 Received: (qmail 12140 invoked by uid 22791); 13 Feb 2006 20:44:27 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 13 Feb 2006 20:44:26 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id k1DKiNuQ001229 for ; Mon, 13 Feb 2006 15:44:23 -0500 Received: from post-office.corp.redhat.com (post-office.corp.redhat.com [172.16.52.227]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id k1DKiN122118; Mon, 13 Feb 2006 15:44:23 -0500 Received: from localhost.localdomain (sebastian-int.corp.redhat.com [172.16.52.221]) by post-office.corp.redhat.com (8.11.6/8.11.6) with ESMTP id k1DKiNt29616; Mon, 13 Feb 2006 15:44:23 -0500 Subject: Re: Global constants From: Mark McLoughlin To: Martin Hunt Cc: "Frank Ch. Eigler" , systemtap@sourceware.org In-Reply-To: <1139862190.3942.33.camel@monkey2> References: <1139852331.11054.17.camel@localhost.localdomain> <1139859707.3942.11.camel@monkey2> <1139861652.11054.40.camel@localhost.localdomain> <1139862190.3942.33.camel@monkey2> Content-Type: text/plain Date: Mon, 13 Feb 2006 20:44:00 -0000 Message-Id: <1139863461.11054.51.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2006-q1/txt/msg00499.txt.bz2 On Mon, 2006-02-13 at 12:23 -0800, Martin Hunt wrote: > On Mon, 2006-02-13 at 20:14 +0000, Mark McLoughlin wrote: > > > > something like > > > %{ const_O_CREAT = O_CREAT; %} > > > instead of > > > O_CREAT = 64 > > > > Absolutely, that was my first thought too ... unfortunately, the kernel > > headers don't seem to have all the values e.g. O_ASYNC is only available > > as FASYNC ... I didn't take it any further than thinking "uggh, that > > sucks", though :-) > > I don't understand. > > function get_o_creat:long() %{ THIS->__retvalue = O_CREAT; %} > > probe begin { > printf("O_CREAT = %d\n", get_o_creat()) > } > > > stap -g creat.stp > O_CREAT = 64 O_CREAT works fine, but try O_ASYNC (AFAIR) What header are you including? Maybe you're including the user-space header? I think I was including linux/fs.h and O_ASYNC wasn't defined. Cheers, Mark.