Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Changes
Page history
Update debugging
authored
Sep 22, 2024
by
umaumax
Show whitespace changes
Inline
Side-by-side
debugging.md
View page @
c8de55e3
...
...
@@ -2,7 +2,7 @@
## ワークアラウンド
### `⭐
``⭐``
⭐` root権限無しで、`/etc/hosts`ファイルの上書き相当の処理を実行する
### `⭐
⭐
⭐` root権限無しで、`/etc/hosts`ファイルの上書き相当の処理を実行する
[
dns - associate IP with hostname without editing /etc/hosts - Unix & Linux Stack Exchange
](
https://unix.stackexchange.com/questions/714953/associate-ip-with-hostname-without-editing-etc-hosts
)
...
...
@@ -11,6 +11,10 @@ TMP_HOSTS_FILEPATH=./tmp_etc_hosts # 相対パスでもOK
unshare
--mount
--map-root-user
bash
-c
"mount --bind --make-private "
$TMP_HOSTS_FILEPATH
" /etc/hosts; ping hoge.example.com"
```
### プロセスが落ちるときにアタッチしてデバッグしたい
シグナルハンドラの中で無限ループさせると、後からgdbでアタッチできる
## デバッグについて
### 種類
...
...
...
...