From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26772 invoked by alias); 19 May 2006 04:52:17 -0000 Received: (qmail 26765 invoked by uid 22791); 19 May 2006 04:52:16 -0000 X-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from mga01.intel.com (HELO fmsmga101-1.fm.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 19 May 2006 04:52:14 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101-1.fm.intel.com with ESMTP; 18 May 2006 21:52:12 -0700 Received: from orsmsx331.jf.intel.com (HELO orsmsx331.amr.corp.intel.com) ([192.168.65.56]) by fmsmga001.fm.intel.com with ESMTP; 18 May 2006 21:52:12 -0700 X-IronPort-AV: i="4.05,143,1146466800"; d="scan'208"; a="39523753:sNHT15679104" Received: from orsmsx311.amr.corp.intel.com ([192.168.65.40]) by orsmsx331.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 18 May 2006 21:52:12 -0700 Received: from pdsmsx405.ccr.corp.intel.com ([172.16.12.95]) by orsmsx311.amr.corp.intel.com with Microsoft SMTPSVC(6.0.3790.211); Thu, 18 May 2006 21:52:11 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Subject: RE: stucture element variable access problem Date: Fri, 19 May 2006 04:52:00 -0000 Message-ID: <9FBCE015AF479F46B3B410499F3AE05BEDA9CE@pdsmsx405> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: stucture element variable access problem Thread-Index: AcZ6/CxFIF8OmpF3SbSPp5jpfm0SbgAAysFQ From: "Mao, Bibo" To: "Li Guanglei" Cc: X-OriginalArrivalTime: 19 May 2006 04:52:11.0752 (UTC) FILETIME=[FDA7CE80:01C67AFF] 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-q2/txt/msg00453.txt.bz2 Oh, yes it is. That works for me now :) Thanks Bibo,mao >-----Original Message----- >From: Li Guanglei [mailto:guanglei@cn.ibm.com] >Sent: 2006=C4=EA5=D4=C219=C8=D5 12:24 >To: Mao, Bibo >Cc: systemtap@sources.redhat.com >Subject: Re: stucture element variable access problem > >Mao, Bibo =D0=B4=B5=C0: >> My kernel version is 2.6.9-36.ELia32, and it will use >$q->elevator.elevator_name get its name, for kernel >2.6.10 >$q->elevator->elevator_type->elevator_name will be used to get the name. >> My original meaning is that if variable is structure pointer type, it wi= ll >be ok to access its element like "elevator_type->elevator_name". But if the >variable is structure type but not pointer type, there will be error to ac= cess >its element like "elevator.elevator_name". >> In my IA32 and IA64 box, there will be the same error on 2.6.9-36.EL ver= sion. >I do not know whether there is one method to access structure type variabl= e's >element. >> >You should use: >$q->elevator->elevator_name >instead of: >$q->elevator.elevator_name > >The following script works well for me on 2.6.9-34.19.EL/ppc64 > >probe kernel.function("__elv_add_request") >{ > elevator_name =3D kernel_string($q->elevator->elevator_name) > printf("%s\n", elevator_name) >}