More than 5 years have passed since last update.
アセンブラ(.s)に対して-gを付ける。
$ cat foo.c
# include <stdio.h>
int main(void){
printf("Hello!\n");
return 0;
}
$ gcc -S foo.c
$ gcc -g foo.s
$ ./a.out
Hello!
あとはいつものようにgdbを起動。
gdbで"i r"でレジスタの値が見れるんだっけかな。
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
