1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

アセンブラをgdbで取り扱う

Posted at

アセンブラ(.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"でレジスタの値が見れるんだっけかな。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?