LoginSignup
1
1

More than 5 years have passed since last update.

Macでgdbを使う方法

Posted at

DockerのUbuntuコンテナ内に環境構築します。

docker run -it -v SRC-DIR:DST-DIR --cap-add=SYS_PTRACE --security-opt="seccomp=unconfined" ubuntu /bin/bash
docker exec -it CONTAINER /bin/bash
apt-get update
apt-get -y install emacs g++ gdb
cd DST-DIR
g++ -g3 main.cpp
gdb a.out
1
1
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
1