From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7778 invoked by alias); 12 May 2007 17:28:10 -0000 Received: (qmail 7770 invoked by uid 22791); 12 May 2007 17:28:09 -0000 X-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,DK_POLICY_SIGNSOME,TW_XB X-Spam-Check-By: sourceware.org Received: from mail128.messagelabs.com (HELO mail128.messagelabs.com) (216.82.250.131) by sourceware.org (qpsmtpd/0.31) with SMTP; Sat, 12 May 2007 17:28:07 +0000 X-VirusChecked: Checked X-Env-Sender: qbarnes@urbana.css.mot.com X-Msg-Ref: server-5.tower-128.messagelabs.com!1178990885!267220!1 X-StarScan-Version: 5.5.10.7.1; banners=-,-,- X-Originating-IP: [129.188.136.8] Received: (qmail 7596 invoked from network); 12 May 2007 17:28:05 -0000 Received: from motgate8.mot.com (HELO motgate8.mot.com) (129.188.136.8) by server-5.tower-128.messagelabs.com with SMTP; 12 May 2007 17:28:05 -0000 Received: from il06exr01.mot.com (il06exr01.mot.com [129.188.137.131]) by motgate8.mot.com (8.12.11/Motorola) with ESMTP id l4CHS5Wu017657 for ; Sat, 12 May 2007 10:28:05 -0700 (MST) Received: from il06vts02.mot.com (il06vts02.mot.com [129.188.137.142]) by il06exr01.mot.com (8.13.5/Vontu) with SMTP id l4CHS44c024421 for ; Sat, 12 May 2007 12:28:05 -0500 (CDT) Received: from udc.urbana.css.mot.com (udc.urbana.css.mot.com [10.12.0.51]) by il06exr01.mot.com (8.13.5/8.13.0) with ESMTP id l4CHS4Cr024415 for ; Sat, 12 May 2007 12:28:04 -0500 (CDT) Received: from nova.urbana.css.mot.com (nova.urbana.css.mot.com [192.88.153.60]) by udc.urbana.css.mot.com (8.13.8+Sun/8.13.8) with ESMTP id l4CHS4MX013458 for ; Sat, 12 May 2007 12:28:04 -0500 (CDT) Received: (from qbarnes@localhost) by nova.urbana.css.mot.com (8.13.7+Sun/8.13.7/Submit) id l4CHS4lw020499 for systemtap@sources.redhat.com; Sat, 12 May 2007 12:28:04 -0500 (CDT) Date: Sat, 12 May 2007 17:28:00 -0000 From: Quentin Barnes To: systemtap@sources.redhat.com Subject: _stp_kallsyms_lookup() broken? Message-ID: <20070512172803.GA20389@urbana.css.mot.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline User-Agent: Mutt/1.4.2.1i X-POPI: This message is Motorola General Business Information (MGBI). X-Organization: Motorola Cellular Subscriber Group, Urbana Design Center X-Phone: (217) 384-8726 X-Vontu: Pass X-IsSubscribed: yes Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2007-q2/txt/msg00266.txt.bz2 In porting the Systemtap runtime to ARM, the got stack-arm.c working except for one thing, symbolic addresses weren't coming out right. I know my code is right because I can call print_symbol() on the address and it returns the correct symbol, but _stp_symbol_print() is out lost in the weeds. For example, I have a stack traceback that turns up address 0xc01aa8b0 which in my kernel of the day corresponds to sys_socketcall. The function print_symbol() outputs "sys_socketcall+0x0/0x1e8", but _stp_symbol_print() prints 0xc01aa8b0 out as: 0xc01aa8b0 : $a+0x11a4f3c/0x0 [stap_9c636862fdbf9f35091984d2ee34d03b_4024] Doing a little math, 0xc01aa8b0 - 0x11a4f3c = 0xbf005974. Note that the brackets are present and not empty, but instead contain my module's name "stap_9c636862fdbf9f35091984d2ee34d03b_4024". The 0xbf005974 is in the one and only loaded module: stap_9c636862fdbf9f35091984d2ee34d03b_4024: systemtap: 0.5.14, base: bf000000, memory: 16028+22924+1320+164160+273469 data+text+ctx+io+glob, probes: 1 So it looks like _stp_symbol_print() is not finding any symbols in the kernel proper, only loaded modules. I don't fully understand the code in _stp_kallsyms_lookup(), but I only see code for walking module symbol tables, not the kernel. What's going on here? Has anyone else seen a problem like this, or does _stp_symbol_print() work on other kernels? I'm running on Linux 2.6.21.1 ARM build. Quentin