私はgdbの逆アセンブルメインを使用してそれを行いました。つまり、gdbの逆アセンブルメインを使用して次の行のアドレスを決定し、それが目的の行にスキップした方法です。逆アセンブル main を使用せずに次の行のアドレスを特定できる方法はありますか。つまり、c で直接。また、その他の方法があれば教えてください。
#include<stdio.h>
fun()
{
int i,*j;
j=&i;
j++;
j++;
j++;
*j=*j+13; //to skip first printf +13
*j=*j+21; //to skip first and second printf +21 ie. 21 + 13
//*j=*j+13; //to skip first,second,third printf +13 ie. 21 + 13 + 13
}
main()
{
int a;
a=5;
fun();
printf("hello1");
printf("%d\n",a);
printf("hello2");
}