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 Tue, Jan 18, 2011 at 03:56:13PM +0100, Mark Wielaard wrote:
> > On Tue, 2011-01-18 at 20:04 +0530, K.Prasad wrote:
> > > selected function print_hw
> > > prologue searching function 'print_hw'
> > > 0x10000530-0x10000570@/home/prasadkr/helloworld.c:4
> > > checking line record 0x10000530@/home/prasadkr/helloworld.c:5
> > > prologue found function 'print_hw' (naked) = 0x10000530
> > > probe print_hw@/home/prasadkr/helloworld.c:4
> > > process=/home/prasadkr/helloworld reloc=.absolute pc=0x10000530
> >
> > So, we actually are putting the probe at address 0x10000530, and
> > uaddr()
> > does return that address from within the probe context. Good. But
> > our
> > translation table doesn't contain "print_hw" at that address.
> >
> > Could you check some things?
> > - Can you run it under gdb and put a breakpoint at print_hw,
> >   which address does that give?
> > - What is the output of eu-readelf -s helloworld?
> 
> # gdb helloworld
> GNU gdb (GDB) 7.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law. Type "show
> copying"
> and "show warranty" for details.
> This GDB was configured as "powerpc64-unknown-linux-gnu".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> Reading symbols from /home/prasadkr/helloworld...done.
> (gdb) break print_hw
> Breakpoint 1 at 0x10000544: file helloworld.c, line 6.
> (gdb) q

We place our probe at 0x10000530, while GDB select address
0x10000544. Maybe that difference is just the prologue or something.
Could you check by doing an disassemble of print_hw:
(gdb) disassemble print_hw

> I'm attaching the output of eu-readelf to this mail.

> Symbol table [37] '.symtab' contains 75 entries:
> 56 local symbols  String table: [38] '.strtab'
>  Num:            Value   Size Type    Bind   Vis          Ndx Name
> [...]
>    61: 0000000010010a70     64 FUNC    GLOBAL DEFAULT       22 print_hw

So, that does match our _stp_symbol entry:
   { 0x10010a70, "print_hw" },
and is also totally not what we want/need to resolve the address to
the symbol name. I am not sure what is going on here.

Cheers,

Mark


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