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/2738] deref error on ppc64


------- Additional Comments From fche at redhat dot com  2006-06-12 17:23 -------
Here is the $return tvar extractor function in the attached .c file.

    intptr_t addr;
    { // DWARF expression: 0x73
      {
        intptr_t s0;
        s0 = fetch_register (3) + 0L;
        addr = s0;
      }
    }
    THIS->__retvalue = deref (8, addr);

Compared to the ppc64 retval() function, this does one extra round of
dereference.  According the ppc64 ABI [1], r3 should only be dereferenced
for aggregates/unions/longer character strings.  Integers are returned simply
without indirection.  So here we have an ABI misunderstanding.  It may
be a bug in the new $return code handling (thus cc:ing dsmith), or
inadequacy of the elfutils api for this distinction (thus cc:ing roland).

[1] http://freestandards.org/spec/ELF/ppc64/spec/x280.html#RETURN-VAL


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsmith at redhat dot com,
                   |                            |roland at redhat dot com


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

------- 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]