Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error #2

Open
bAndie91 opened this issue Oct 12, 2022 · 1 comment
Open

compile error #2

bAndie91 opened this issue Oct 12, 2022 · 1 comment

Comments

@bAndie91
Copy link

hi, do you have any idea what am i missing:

make CFLAGS=-I$HOME/src/aquynh/capstone/include\ -L$HOME/src/aquynh/capstone
gcc -o ftrace ftrace.c -lcapstone -I/home/…/src/aquynh/capstone/include -L/home/…/src/aquynh/capstone
In file included from ftrace.c:10:0:
readelf.h: In function ‘get_sym_addr’:
readelf.h:28:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
readelf.h: In function ‘addr_in_section’:
readelf.h:77:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
readelf.h:77:44: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
readelf.h: In function ‘bytes_from_addr_in_section’:
readelf.h:89:21: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
In file included from ftrace.c:11:0:
functools.h: In function ‘n_func_args’:
functools.h:130:40: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
functools.h: In function ‘get_n_arg’:
functools.h:180:15: error: ‘struct user_regs_struct’ has no member named ‘rdi’
functools.h:182:15: error: ‘struct user_regs_struct’ has no member named ‘rsi’
functools.h:184:15: error: ‘struct user_regs_struct’ has no member named ‘rdx’
functools.h:186:15: error: ‘struct user_regs_struct’ has no member named ‘rcx’
ftrace.c: In function ‘trace’:
ftrace.c:162:47: error: ‘struct user_regs_struct’ has no member named ‘rip’
ftrace.c:171:63: error: ‘struct user_regs_struct’ has no member named ‘rax’
ftrace.c:186:58: error: ‘struct user_regs_struct’ has no member named ‘rdi’
ftrace.c:186:68: error: ‘struct user_regs_struct’ has no member named ‘rsi’
ftrace.c:186:78: error: ‘struct user_regs_struct’ has no member named ‘rdx’
ftrace.c:192:72: error: ‘struct user_regs_struct’ has no member named ‘rsp’
ftrace.c:199:17: error: ‘struct user_regs_struct’ has no member named ‘rip’
make: *** [ftrace] Error 1
@bAndie91
Copy link
Author

i have

struct user_regs_struct
{
  long int ebx;
  long int ecx;
  long int edx;
  long int esi;
  long int edi;
  long int ebp;
  long int eax;
  long int xds;
  long int xes;
  long int xfs;
  long int xgs;
  long int orig_eax;
  long int eip;
  long int xcs;
  long int eflags;
  long int esp;
  long int xss;
};

in /usr/include/i386-linux-gnu/sys/user.h from libc6-dev:i386 2.13-38+deb7u12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant