This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Issues with dwarf APIs
- From: "Frank Ch. Eigler" <fche at elastic dot org>
- To: Sharyathi Nagesh <sharyath at in dot ibm dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Tue, 2 Jun 2009 09:01:20 -0400
- Subject: Re: Issues with dwarf APIs
- References: <4A248804.3070009@in.ibm.com>
Hi -
> [...]
> 2. dwarf_getlocation_addr(&Dwarf_attribute, addr, &expr,len,1)
> addr: Is current Program counter with in the function boundaries ,
> [...]
> case 2: Is failing even when Dwarf_location Tab is present in the dwarf
> [...]
> In function die for pseries_dedicated_idle_sleep (in ppc64)
> readelf -wi vmlinux reads:
> -------------------------------------
> <2><385581>: Abbrev Number: 96 (DW_TAG_variable)
> 1520738 <385582> DW_AT_name : cpu
> 1520739 <385586> DW_AT_decl_file : 1
> 1520740 <385587> DW_AT_decl_line : 484
> 1520741 <385589> DW_AT_type : <0x378b77>
> 1520742 <38558d> DW_AT_location : 0x5f804 (location list)
> [...]
Check out the location list contents (0x5f804). Most likely the
address you supplied to dwarf_getlocation_addr is not within the range
of addresses that were encoded. This could mean that the variable is
only partially in scope, or that at that particular moment (PC value),
it had no easily encoded location.
Be sure you're using the right PC. If you're doing backtracing, your
PC value will only rarely happen to be the entry address of a
function; more frequently it will be in the middle (at a function call
site).
- FChE