This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Find offset of block instruction in function
- From: crasypantz <ihavecrazypants at hotmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 20 Mar 2016 23:59:46 -0700 (MST)
- Subject: Find offset of block instruction in function
- Authentication-results: sourceware.org; auth=none
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.