This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Failures with exelib.exp testcase (was Re: minutes 2010-08-19)


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
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]