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]

[Bug runtime/10512] STAP_PROBES don't work in c++ constructors/destructors


------- Additional Comments From mjw at redhat dot com  2009-08-17 10:25 -------
(In reply to comment #4)
> But loc2c also has trouble retrieving them:
> 
> $ ./loc2c-test -e ./test.orig 0x40063b arg1
> loc2c-test: required DW_AT_frame_base attribute not supplied
> $ ./loc2c-test -e ./test.orig 0x40063b arg2
> loc2c-test: required DW_AT_frame_base attribute not supplied

gdb can retrieve them:

$ gdb ./test
[...]
(gdb) break *0x40063b
Breakpoint 1 at 0x40063b: file cxxclass.cxx, line 14.
(gdb) run
Starting program: /usr/local/src/systemtap/test.orig 

Breakpoint 1, 0x000000000040063b in ProbeClass (n=<value optimized out>, 
    v=<value optimized out>, this=<value optimized out>)
    at cxxclass.cxx.test.cxx:14
14	    STAP_PROBE2(_test_, cons, name, ref);
(gdb) print arg1
$1 = 0x4008d8 "call"
(gdb) print arg2
$2 = 64

The problem is accessing the correct outer CFA of the inlined_subroutine in
loc2c-test.c and dwflpp.cxx. See case DW_TAG_inlined_subroutine:  /* XXX */

dwflp.cxx find_variable_and_frame_base also has another issue finding the actual
variable at the pc location because off this snippet:

  // if pc and scope_die are disjoint then we need dwarf_getscopes_die
  for (sidx = 0; sidx < nscopes; sidx++)
    if (scopes[sidx].addr == scope_die->addr)
      break;
  if (sidx == nscopes)
    nscopes = dwarf_getscopes_die (scope_die, &scopes);

I'll open another bug as soon as I have a simpler testcase for "not
finding/resolving inlined local variable definitions".

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10512

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


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