public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@redhat.com>
To: Prerna Saxena <prerna@linux.vnet.ibm.com>
Cc: systemtap@sourceware.org
Subject: Re: [RFC PATCH 1/2] Bug Translator 3016 : Error accessing members  of  anonymous structs / unions
Date: Fri, 29 Aug 2008 22:04:00 -0000	[thread overview]
Message-ID: <48B8722F.8010203@redhat.com> (raw)
In-Reply-To: <48B7BE86.9070905@linux.vnet.ibm.com>

Hi Prerna,

Prerna Saxena wrote:
> Hi all,
> This patch modifies tapsets.cxx to enable members of anonymous structs/ 
> unions to be recognised by the systemtap translator.
> Pls let me know your comments..

I'm interested in this feature.

I tested your patches on x86-64 with elfutils-0.137, and I got a SEGV
when I ran following command:

$ stap -e 'probe module("libsas").function("sas_ex_revalidate_domain") 
{print($port_dev->ex_dev->children)}' -vvvp2
SystemTap translator/driver (version 0.7.1/0.137 git branch master, 
commit 38fc2504 + changes)
Copyright (C) 2005-2008 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
Session arch: x86_64 release: 2.6.18-92.el5
Created temporary directory "/tmp/stapQefK9v"
Searched '/usr/share/systemtap/tapset/x86_64/*.stp', found 2
Searched '/usr/share/systemtap/tapset/*.stp', found 41
Pass 1: parsed user script and 43 library script(s) in 
380usr/20sys/533real ms.
control symbols: kts: 0xffffffff80064c68 kte: 0xffffffff80067956 stext: 
0xffffffff80001000
parsed 'sas_ex_revalidate_domain' -> func 'sas_ex_revalidate_domain'
blacklist regexps:
blfn: 
^(atomic_notifier_call_chain|default_do_nmi|__die|die_nmi|do_debug|do_general_protection|do_int3|do_IRQ|do_page_fault|do_sparc64_fault|do_trap|dummy_nmi_callback|flush_icache_range|ia64_bad_break|ia64_do_page_fault|ia64_fault|io_check_error|mem_parity_error|nmi_watchdog_tick|notifier_call_chain|oops_begin|oops_end|program_check_exception|single_step_exception|sync_regs|unhandled_fault|unknown_nmi_error|.*raw_.*lock.*|.*read_.*lock.*|.*write_.*lock.*|.*spin_.*lock.*|.*rwlock_.*lock.*|.*rwsem_.*lock.*|.*mutex_.*lock.*|raw_.*|.*seq_.*lock.*|atomic_.*|atomic64_.*|get_bh|put_bh|.*apic.*|.*APIC.*|.*softirq.*|.*IRQ.*|.*_intr.*|__delay|.*kernel_text.*|get_current|current_.*|.*exception_tables.*|.*setup_rt_frame.*|.*preempt_count.*|preempt_schedule|__switch_to)$
blfn_ret: ^(do_exit|sys_exit|sys_exit_group)$
blfile: ^(kernel/kprobes.c|arch/.*/kernel/kprobes.c)$
focused on module 'libsas = [0x759a600-0x75aadc9, bias 0x0] file 
/usr/lib/debug/lib/modules/2.6.18-92.el5/kernel/drivers/scsi/libsas/libsas.ko.debug 
ELF machine x86_64 (code 62)
selected function sas_ex_revalidate_domain
probe sas_ex_revalidate_domain@drivers/scsi/libsas/sas_expander.c:1861 
module=libsas reloc=.text section=.text pc=0x759ded1
finding location for local 'port_dev' near address 759ded1, module bias 0
Segmentation fault

----
And here is the output of gdb

$ gdb stap
GNU gdb Red Hat Linux (6.5-37.el5rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host 
libthread_db library "/lib64/libthread_db.so.1".

(gdb) r -e 'probe module("libsas").function("sas_ex_revalidate_domain") 
{print($port_dev->ex_dev->children)}'
Starting program: /usr/bin/stap -e 'probe 
module("libsas").function("sas_ex_revalidate_domain") 
{print($port_dev->ex_dev->children)}'
[Thread debugging using libthread_db enabled]
[New Thread 47364313547600 (LWP 3183)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47364313547600 (LWP 3183)]
0x00002b13dbba7fd3 in __libdw_find_attr (die=0x7fffcf43f930, search_name=3,
     codep=0x7fffcf43f9c0, formp=0x7fffcf43f9c4)
     at elfutils-0.137/libdw/dwarf_child.c:67
67	elfutils-0.137/libdw/dwarf_child.c: No such file or directory.
	in elfutils-0.137/libdw/dwarf_child.c
Current language:  auto; currently c
(gdb) p *die
$1 = {addr = 0x2b13e69c2d6b, cu = 0x765c800000aa3d00, abbrev = 
0x7fffcf43f930,
   padding__ = 140736670726592}

-----
it seems that die is not initialized.

Thank you,

-- 
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division

e-mail: mhiramat@redhat.com

  parent reply	other threads:[~2008-08-29 22:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-29  9:14 Prerna Saxena
2008-08-29 15:44 ` Frank Ch. Eigler
2008-09-04  5:55   ` Prerna Saxena
2008-09-04 14:57     ` Frank Ch. Eigler
2008-09-08  8:55       ` [RFC updated PATCH 2/2] " Prerna Saxena
2008-09-08 20:08         ` Frank Ch. Eigler
2008-09-15  6:34           ` Prerna Saxena
2008-08-29 22:04 ` Masami Hiramatsu [this message]
2008-09-03 15:39   ` [RFC PATCH 1/2] " Masami Hiramatsu
2008-09-04 19:15     ` Masami Hiramatsu
2008-09-08  9:00       ` [RFC updated " Prerna Saxena
2008-09-08 15:43         ` Masami Hiramatsu
2008-09-15  6:17           ` Prerna Saxena
2008-09-16  6:28             ` Masami Hiramatsu
2008-09-17 11:24               ` [RFC updated PATCHES] " Prerna Saxena
2008-09-17 14:45                 ` Masami Hiramatsu

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=48B8722F.8010203@redhat.com \
    --to=mhiramat@redhat.com \
    --cc=prerna@linux.vnet.ibm.com \
    --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).