public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "K.Prasad" <prasad@linux.vnet.ibm.com>
To: Mark Wielaard <mjw@redhat.com>
Cc: Roland McGrath <roland@redhat.com>,
	systemtap@sourceware.org,        Stan Cox <scox@redhat.com>,
	dsmith@redhat.com
Subject: Re: Failures with exelib.exp testcase (was Re: minutes 2010-08-19)
Date: Thu, 03 Feb 2011 12:34:00 -0000	[thread overview]
Message-ID: <20110203123353.GC2488@in.ibm.com> (raw)
In-Reply-To: <1296728173.3341.7.camel@springer.wildebeest.org>

On Thu, Feb 03, 2011 at 11:16:13AM +0100, Mark Wielaard wrote:
> On Thu, 2011-02-03 at 10:33 +0530, K.Prasad wrote:
> > > If at all possible lets try with the simple testcase that you posted
> > > earlier. If you could just post the output of that and the generated
> > > stap-symbols.h file that would make it a bit easier to analyze what is
> > > going on.
> >
> > Oh yes, I could have done that.
> > 
> > > $ stap -vvv -k -e 'probe
> > > process("/home/prasadkr/helloworld").function("print_hw")
> > > { printf("0x%x : %s\n", uaddr(), usymdata(uaddr())) }' -c ./helloworld
> > > 
> >
> > Please find the output of the above probe pasted below and the contents
> > of stap-symbols.h in the attachment.
> > 
> > # stap -v -k -e 'probe
> > process("/home/prasadkr/helloworld").function("print_hw")
> > { printf("0x%x : %s\n", uaddr(), usymdata(uaddr())) }' -c ./helloworld
> > Pass 1: parsed user script and 75 library script(s) using 38528virt/30592res/7872shr kb, in 240usr/0sys/246real ms.
> > Pass 2: analyzed script: 1 probe(s), 2 function(s), 4 embed(s), 0 global(s) using 143744virt/33216res/9088shr kb, in 30usr/120sys/194real ms.
> > Pass 3: translated to C into "/tmp/staps7Q0qG/stap_17236.c" using 143296virt/32896res/8960shr kb, in 20usr/110sys/129real ms.
> > Pass 4: compiled C into "stap_17236.ko" in 2730usr/350sys/3105real ms.
> > Pass 5: starting run.
> > Hello world
> > 0x10000530 : 00000011.plt_call.__libc_start_main@@GLIBC_2.3+0+0x188/0x350 [/home/prasadkr/helloworld]
> 
> hmmm, so the symbol table inside stap-symbols.h looks precisely the same
> as before my patch.
> 
> So, I see it doesn't even compile. Which must mean the #ifdef
> __powerpc__ is the wrong guard. What should be tested for to see whether
> we are compiling on powerpc?
>

Hi Mark,
	So as discussed over chat, the __powerpc__ is indeed defined and
hence the output with the patch below is unchanged.

Thanks,
K.Prasad
 
> While we figure that out, you could just try thing unconditionally:
> 
> diff --git a/translate.cxx b/translate.cxx
> index fab3da4..a19e598 100644
> --- a/translate.cxx
> +++ b/translate.cxx
> @@ -5060,13 +5060,13 @@ dump_unwindsyms (Dwfl_Module *m,
>                  }
>                else
>                 {
> -#ifdef __powerpc__
> +//#ifdef __powerpc__
>                   // ppc64 uses function descriptors in user space
>                   // XXX - actually check this is a legal address in .odp!
>                   if (GELF_ST_TYPE (sym.st_info) == STT_FUNC
>                       && name[0] != '.')
> -                   Dwarf_Addr sym_addr = *((Dwarf_Addr *) sym_addr);
> -#endif
> +                   sym_addr = *((Dwarf_Addr *) sym_addr);
> +//#endif
>                   if (n > 0)
>                     {
>                       assert (secname != NULL);
> 
> Note that it removes the erronious redeclaration of sym_addr too.
> 
> Cheers,
> 
> Mark
> 

  reply	other threads:[~2011-02-03 12:34 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100826194353.GC3185@redhat.com>
     [not found] ` <20100827092840.GA4129@in.ibm.com>
     [not found]   ` <20100830032810.GA5213@in.ibm.com>
     [not found]     ` <1283152139.2362.2.camel@hermans.wildebeest.org>
     [not found]       ` <20100830111805.GA4115@in.ibm.com>
     [not found]         ` <1283169285.15128.20.camel@springer.wildebeest.org>
     [not found]           ` <20101111121023.GA2597@in.ibm.com>
     [not found]             ` <1289485749.2470.5.camel@hermans.wildebeest.org>
     [not found]               ` <20110117145437.GA4251@in.ibm.com>
     [not found]                 ` <1295278356.2998.47.camel@springer.wildebeest.org>
2011-01-18 13:09                   ` K.Prasad
2011-01-18 13:30                     ` Mark Wielaard
2011-01-18 14:35                       ` K.Prasad
2011-01-18 14:56                         ` Mark Wielaard
2011-01-19 12:01                           ` K.Prasad
2011-01-19 23:24                             ` Mark Wielaard
2011-01-20  1:19                               ` Roland McGrath
2011-01-20 11:11                                 ` Mark Wielaard
2011-01-20 18:53                                   ` Roland McGrath
2011-01-21 23:16                                     ` Mark Wielaard
2011-02-02 12:24                                       ` K.Prasad
2011-02-02 12:59                                         ` Mark Wielaard
2011-02-03  5:04                                           ` K.Prasad
2011-02-03 10:16                                             ` Mark Wielaard
2011-02-03 12:34                                               ` K.Prasad [this message]
2011-02-03 12:44                                                 ` Mark Wielaard
2011-02-03 18:59                                                   ` Roland McGrath
2011-02-08 13:13                                                     ` Mark Wielaard
2011-02-08 18:45                                                       ` Roland McGrath
2011-02-08 19:51                                                         ` Mark Wielaard
2011-02-08 19:57                                                           ` Roland McGrath
2011-02-14 16:50                                                       ` K.Prasad
2011-02-14 20:33                                                         ` Mark Wielaard
2011-03-04  7:13                                                           ` K.Prasad
2011-03-04 15:06                                                             ` Mark Wielaard
2011-03-17  9:05                                                               ` K.Prasad
2011-03-17 13:04                                                                 ` Mark Wielaard

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=20110203123353.GC2488@in.ibm.com \
    --to=prasad@linux.vnet.ibm.com \
    --cc=dsmith@redhat.com \
    --cc=mjw@redhat.com \
    --cc=roland@redhat.com \
    --cc=scox@redhat.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).