cs01 / cs01/gdbgui

Query: how to solve the sudo gdb issue on Mac?

Open
#411 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10.4k
Forks
521
PR merge metrics
No merged PRs in 30d

Description

On `macOS 10.15.5`, I first use brew to install gdb.

Then I clone the project, and would like to have a try in the `example` folder.

I execute `make hello` and successfully compile the binary
```
$ ls | grep hello
hello.c
hello_c.a
hello_c.a.dSYM
```

Then I can successfully debug with gdb by `sudo gdb hello_c.a`
![image](https://user-images.githubusercontent.com/6740021/144452717-78ef1cfb-5d6c-4c52-ad61-b2ddff7196bf.png)

But cannot debug with only `gdb hello_c.a`
![image](https://user-images.githubusercontent.com/6740021/144452901-08648923-a7f8-42ee-8e7d-0a69cba6c892.png)

Now the pivotal issue comes: when I use `gdbgui --args /Users/bytedance/test/gdbgui-test/gdbgui/examples/c/hello_c.a`, I can see the codes in Chrome, but cannot debug.
![image](https://user-images.githubusercontent.com/6740021/144453504-b3447004-4d26-4cc5-bdcd-c72d88a78ce3.png)

I suspend it is related to the sudo. Could anyone gives some hints? I google a lot but not yet have method to deal with this issue. Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.