Find offset of block instruction in function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Given the result of 'DECL_SAVED_TREE' for a FUNCTION_DECL, is there a way to
determine the offset into the function for a given block instruction?
Perhaps the question is not worded correctly, or maybe what I'm asking
doesn't make sense. But essentially, say there is a function:

void something() {
    int blah;
    
    blah = 2;

    if (1) {
        printf("blah: %d\n, blah);
    }
}

In this case is there a way to determine the offset of 'if (1)' or 'printf'?
By 'offset' I mean in the same sense 'backtrace_symbols' includes "a
hexadecimal offset into the function." If so does it depend on optimization
or anything else?

Any help is appreciated.



--
View this message in context: http://gcc.1065356.n5.nabble.com/Find-offset-of-block-instruction-in-function-tp1247666.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux