Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot input password when attaching to process with GDB #10576

Open
adriancostin6 opened this issue Feb 23, 2023 · 1 comment
Open

Cannot input password when attaching to process with GDB #10576

adriancostin6 opened this issue Feb 23, 2023 · 1 comment

Comments

@adriancostin6
Copy link

Environment

  • OS and version: Ubuntu 20.04 LTS
  • VS Code: 1.72.2
  • C/C++ extension: 1.14.3
  • GDB / LLDB version: 9.2

Bug Summary and Steps to Reproduce

Bug Summary:

Steps to reproduce:

  1. Run VS Code
  2. Try attaching to process with GDB
  3. Get YAMA ptrace prompt, select yes to input password
  4. Get new terminal prompt, rendering you unable to enter password

Debugger Configurations

"version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Attach Remote",
            "type": "cppdbg",
            "request": "attach",
            "program": "/path/to/my/executable",
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Set Disassembly Flavor to Intel",
                    "text": "-gdb-set disassembly-flavor intel",
                    "ignoreFailures": true
                }
            ]
        },

Debugger Logs

==== AUTHENTICATING FOR org.freedesktop.policykit.exec ===
Authentication is needed to run `/usr/bin/gdb' as the super user
Authenticating as: root
Password: prompt>

Other Extensions

  • C/C++ extension pack: 1.3.0

Additional Information

More background info on this. My application disables ptrace hardening at runtime using a call to prctl, making me able to attach with regular CLI GDB from the command line, however, I want to use VS Code. I have already opened an issue in the MIDebugEngine, where the message comes from: microsoft/MIEngine#1388.

Opening a bug issue here as well, as I was unable to input the password when prompted in the VS Code terminal. If this issue is external, please point me in the right direction. Thanks!

@WardenGnaw
Copy link
Member

We will have to investigate what will need to be done for this.

Thank you for creating this request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants