c - Printing the return address using format string -
i required print out return address stored in stack function? format supposed follow print is
void function() { int *retptr = 0; printf("return address 0x%08x\n", (unsigned int *)(&retptr+return_addr_offset)); /*code goes here*/ }
can please help! not supposed using inbuilt function. how can this?
this smells homework me if can't use built-in functions.
in case, there's nothing magic being pointer; need print out hex number.
without knowing functions if allowed use, it's kind of hard help. need work out 8 hex digits output them.
Comments
Post a Comment