public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/28334] New: cannot handle offset into register
@ 2021-09-13 10:20 913495245 at qq dot com
  2022-05-19 20:25 ` [Bug translator/28334] " scox at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: 913495245 at qq dot com @ 2021-09-13 10:20 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=28334

            Bug ID: 28334
           Summary: cannot handle offset into register
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: 913495245 at qq dot com
  Target Milestone: ---

Hi team

I had a function trace demo with Struct parameter and Struct return, but got
the "cannot handle offset into register" error.

my environments:
  os: Ubuntu 16.04 LTS
  gcc 8.3
  systemtap 4.5
  elfutils 0.185


# func.h
struct DataPackage {
    int len;
    float width;
    // float width2; // uncomment this line will work :)
    double angle;
};

struct DataPackage func_complex_v2(struct DataPackage input_data, int page);

# func.c

struct DataPackage func_complex_v2(struct DataPackage input_data, int page) {
    struct DataPackage d;
    d.len = 19;
    d.width = 115.33;
    d.angle = 6.66;

    return d;
}

# main.c
int main(int argc, char const *argv[])
{

    struct DataPackage d;
    d.len = 997;
    d.width = 10;
    d.angle = 0.777;

    struct DataPackage r =func_complex_v2(d, 789);

    return 0;
}

# cc_stap_test_complex.stp
probe
process("/home/xyz/vs_workspace/CacheLab/build/test").function("func_complex_v2").return
{
    printf("func_complex_v2 return: %s\n", fp_to_string($return->width, 6))
}


Here is the console output:

Debug translate_offsetsemantic error: cannot handle offset into register:
identifier '$return' at 
/home/xyz/cc_stap_test_complex.stp:73:57
        source:     printf("func_complex_v2 return: %s\n",
fp_to_string($return->width, 6))
                                                                        ^

semantic error: unresolved type : identifier '$return' at :73:57
        source:     printf("func_complex_v2 return: %s\n",
fp_to_string($return->width, 6))


Any advice is appreciate, thanks!

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-07-01 17:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-13 10:20 [Bug translator/28334] New: cannot handle offset into register 913495245 at qq dot com
2022-05-19 20:25 ` [Bug translator/28334] " scox at redhat dot com
2022-05-19 20:31 ` fche at redhat dot com
2022-05-19 20:50 ` scox at redhat dot com
2022-07-01 17:39 ` wcohen at redhat dot com
2022-07-01 17:44 ` wcohen at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).