microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.55k stars 1.57k forks source link

Program received signal SIGSEGV, Segmentation fault. 0x0000aaaa9aa598a9 in ?? () #11185

Open arturkrutikhin-mars opened 1 year ago

arturkrutikhin-mars commented 1 year ago

HI! I configured VS Code on Ubuntu on Virtual Box (Host - MacOs, MacBook Pro) as it is written here: https://code.visualstudio.com/docs/cpp/config-linux But when I tried to debug the breakpoint was not highlighted at all and the following errors appeared: In Debug Console:
"Warning: Debuggee TargetArchitecture not detected, assuming x86_64. =cmd-param-changed,param="pagination",value="off" Stopped due to shared library event (no libraries added or removed) Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded. Program received signal SIGSEGV, Segmentation fault. 0x0000aaaa9aa598a9 in ?? ()" And when push "Step Into" or "Step Over", etc. it shows another error: "Unable to step in. Operation failed with error code 0x80004004." Could you please help me to fix this issue?! Thank you!

WardenGnaw commented 1 year ago

Can you enable debug logs by adding the following to your launch.json.

"logging": {
   "engineLogging": true,
   "traceResponse": true
}

And share the output from the debug console and share it here?

arturkrutikhin-mars commented 1 year ago

Now I try to debug this code (source.cpp):

#include <iostream>
#include <string>

using namespace std;

int main() {
    cout << "What is your name?" << endl;
    string name;

    getline(cin, name);

    cout <<"Hello, " << name << endl;
}

launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "C/C++: g++ build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}",
            "args": [],
            "stopAtEntry": false,
            "stopAtConnect": true,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "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
                }
            ],
            "preLaunchTask": "C/C++: g++ build active file",
            "miDebuggerPath": "/usr/bin/gdb",
            "logging": {
                "engineLogging": true,
                "traceResponse": true
             }
        }
    ]
}

c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "linux-gcc-x64",
            "compilerPath": "/usr/bin/gcc"
        }
    ],
    "version": 4
}

DEBUG CONSOLE: =thread-group-added,id="i1" GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word". Warning: Debuggee TargetArchitecture not detected, assuming x86_64. =cmd-param-changed,param="pagination",value="off" Stopped due to shared library event (no libraries added or removed) Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.

Program received signal SIGSEGV, Segmentation fault. 0x0000aaaa9aa5ab49 in ?? () Execute debugger commands using "-exec ", for example "-exec info registers" will list registers in use (when GDB is the debugger)

arturkrutikhin-mars commented 1 year ago

Hi Warden! What I'm doing wrong with launch.json file? I don't clear understand how to configure it. Thanks!

WardenGnaw commented 1 year ago

I'm not seeing the logs in your comment. Are you starting your debug session with F5?

arturkrutikhin-mars commented 1 year ago

--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (99) LaunchOptions{\"name\":\"C/C++: g++ build and debug active file\",\"type\":\"cppdbg\",\"request\":\"launch\",\"program\":\"/home/vboxuser/Projects/source\",\"args\":[],\"stopAtEntry\":true,\"cwd\":\"/home/vboxuser/Projects\",\"environment\":[],\"externalConsole\":false,\"MIMode\":\"gdb\",\"logging\":{\"engineLogging\":true,\"traceResponse\":true},\"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}],\"preLaunchTask\":\"C/C++: g++ build active file\",\"miDebuggerPath\":\"/usr/bin/gdb\",\"configSource\":\"workspaceFolder\",\"detail\":\"preLaunchTask: C/C++: g++ build active file\",\"existing\":true,\"isDefault\":true,\"debuggerEvent\":\"playButton\",\"debugType\":\"run\",\"sessionId\":\"df80bcae-1aec-43d3-8f1d-0c5ce9287c1f\"}\n"},"seq":2} 1: (99) LaunchOptions{"name":"C/C++: g++ build and debug active file","type":"cppdbg","request":"launch","program":"/home/vboxuser/Projects/source","args":[],"stopAtEntry":true,"cwd":"/home/vboxuser/Projects","environment":[],"externalConsole":false,"MIMode":"gdb","logging":{"engineLogging":true,"traceResponse":true},"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}],"preLaunchTask":"C/C++: g++ build active file","miDebuggerPath":"/usr/bin/gdb","configSource":"workspaceFolder","detail":"preLaunchTask: C/C++: g++ build active file","existing":true,"isDefault":true,"debuggerEvent":"playButton","debugType":"run","sessionId":"df80bcae-1aec-43d3-8f1d-0c5ce9287c1f"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (159) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-0yhzbv0y.rpj ; cd \"/home/vboxuser/Projects\" ; DbgTerm=tty ; set -o monitor ; trap 'rm \"/tmp/Microsoft-MIEngine-In-s3jueqw2.lkc\" \"/tmp/Microsoft-MIEngine-Out-hhi3gwrj.5hg\" \"/tmp/Microsoft-MIEngine-Pid-0yhzbv0y.rpj\" \"/tmp/Microsoft-MIEngine-Cmd-u51mvldt.5c0\"' EXIT ; \"/usr/bin/gdb\" --interpreter=mi --tty=$DbgTerm < \"/tmp/Microsoft-MIEngine-In-s3jueqw2.lkc\" > \"/tmp/Microsoft-MIEngine-Out-hhi3gwrj.5hg\" & clear; pid=$! ; echo $pid > \"/tmp/Microsoft-MIEngine-Pid-0yhzbv0y.rpj\" ; wait $pid; \n"},"seq":4} 1: (159) DbgCmd:echo $$ > /tmp/Microsoft-MIEngine-Pid-0yhzbv0y.rpj ; cd "/home/vboxuser/Projects" ; DbgTerm=tty ; set -o monitor ; trap 'rm "/tmp/Microsoft-MIEngine-In-s3jueqw2.lkc" "/tmp/Microsoft-MIEngine-Out-hhi3gwrj.5hg" "/tmp/Microsoft-MIEngine-Pid-0yhzbv0y.rpj" "/tmp/Microsoft-MIEngine-Cmd-u51mvldt.5c0"' EXIT ; "/usr/bin/gdb" --interpreter=mi --tty=$DbgTerm < "/tmp/Microsoft-MIEngine-In-s3jueqw2.lkc" > "/tmp/Microsoft-MIEngine-Out-hhi3gwrj.5hg" & clear; pid=$! ; echo $pid > "/tmp/Microsoft-MIEngine-Pid-0yhzbv0y.rpj" ; wait $pid; --> C (runInTerminal-6): {"type":"request","command":"runInTerminal","arguments":{"kind":"integrated","title":"cppdbg: source","cwd":"","args":["/bin/sh","/tmp/Microsoft-MIEngine-Cmd-u51mvldt.5c0"],"env":{}},"seq":6} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (177) Wait for connection completion.\n"},"seq":8} 1: (177) Wait for connection completion. --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2179) ->=thread-group-added,id=\"i1\"\n"},"seq":10} 1: (2179) ->=thread-group-added,id="i1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2186) ->~\"GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1\n\"\n"},"seq":12} 1: (2186) ->~"GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2186) ->~\"Copyright (C) 2022 Free Software Foundation, Inc.\n\"\n"},"seq":14} 1: (2186) ->~"Copyright (C) 2022 Free Software Foundation, Inc.\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2186) ->~\"License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\"\n"},"seq":16} 1: (2186) ->~"License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law." --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2186) ->~\"\nType \\"show copying\\" and \\"show warranty\\" for details.\n\"\n"},"seq":18} 1: (2186) ->~"\nType \"show copying\" and \"show warranty\" for details.\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2186) ->~\"This GDB was configured as \\"x86_64-linux-gnu\\".\n\"\n"},"seq":20} 1: (2186) ->~"This GDB was configured as \"x86_64-linux-gnu\".\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2186) ->~\"Type \\"show configuration\\" for configuration details.\n\"\n"},"seq":22} 1: (2186) ->~"Type \"show configuration\" for configuration details.\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2186) ->~\"For bug reporting instructions, please see:\n\"\n"},"seq":24} 1: (2186) ->~"For bug reporting instructions, please see:\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2187) ->~\"https://www.gnu.org/software/gdb/bugs/.\n\"\n"},"seq":26} 1: (2187) ->~"https://www.gnu.org/software/gdb/bugs/.\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2187) ->~\"Find the GDB manual and other documentation resources online at:\n http://www.gnu.org/software/gdb/documentation/.\"\n"},"seq":28} 1: (2187) ->~"Find the GDB manual and other documentation resources online at:\n http://www.gnu.org/software/gdb/documentation/." --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2187) ->~\"\n\n\"\n"},"seq":30} 1: (2187) ->~"\n\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2187) ->~\"For help, type \\"help\\".\n\"\n"},"seq":32} 1: (2187) ->~"For help, type \"help\".\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2187) ->~\"Type \\"apropos word\\" to search for commands related to \\"word\\".\n\"\n"},"seq":34} 1: (2187) ->~"Type \"apropos word\" to search for commands related to \"word\".\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2190) ->(gdb)\n"},"seq":36} 1: (2190) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2201) <-1001-gdb-set mi-async on\n"},"seq":38} 1: (2201) <-1001-gdb-set mi-async on --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2209) ->1001^done\n"},"seq":40} 1: (2209) ->1001^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2210) ->(gdb)\n"},"seq":42} 1: (2210) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2221) 1001: elapsed time 21\n"},"seq":44} 1: (2221) 1001: elapsed time 21 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2239) <-1002-enable-pretty-printing\n"},"seq":46} 1: (2239) <-1002-enable-pretty-printing --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2239) ->1002^done\n"},"seq":48} 1: (2239) ->1002^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2239) ->(gdb)\n"},"seq":50} 1: (2239) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2245) 1002: elapsed time 5\n"},"seq":52} 1: (2245) 1002: elapsed time 5 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2245) <-1003-gdb-set disassembly-flavor intel\n"},"seq":54} 1: (2245) <-1003-gdb-set disassembly-flavor intel --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2245) ->1003^done\n"},"seq":56} 1: (2245) ->1003^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2245) ->(gdb)\n"},"seq":58} 1: (2245) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2249) 1003: elapsed time 3\n"},"seq":60} 1: (2249) 1003: elapsed time 3 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2249) <-1004-interpreter-exec console \"set pagination off\"\n"},"seq":62} 1: (2249) <-1004-interpreter-exec console "set pagination off" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2249) ->=cmd-param-changed,param=\"pagination\",value=\"off\"\n"},"seq":64} 1: (2249) ->=cmd-param-changed,param="pagination",value="off" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2249) ->1004^done\n"},"seq":66} 1: (2249) ->1004^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2249) ->(gdb)\n"},"seq":68} 1: (2249) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2254) 1004: elapsed time 5\n"},"seq":70} 1: (2254) 1004: elapsed time 5 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2255) <-1005-gdb-set auto-solib-add on\n"},"seq":72} 1: (2255) <-1005-gdb-set auto-solib-add on --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2255) ->1005^done\n"},"seq":74} 1: (2255) ->1005^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2255) ->(gdb)\n"},"seq":76} 1: (2255) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2255) 1005: elapsed time 0\n"},"seq":78} 1: (2255) 1005: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2255) <-1006-gdb-set solib-search-path /home/vboxuser/Projects:\n"},"seq":80} 1: (2255) <-1006-gdb-set solib-search-path /home/vboxuser/Projects: --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2256) ->1006^done\n"},"seq":82} 1: (2256) ->1006^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2256) ->(gdb)\n"},"seq":84} 1: (2256) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2256) 1006: elapsed time 0\n"},"seq":86} 1: (2256) 1006: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2256) <-1007-gdb-set stop-on-solib-events 1\n"},"seq":88} 1: (2256) <-1007-gdb-set stop-on-solib-events 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2258) ->1007^done\n"},"seq":90} 1: (2258) ->1007^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2258) ->(gdb)\n"},"seq":92} 1: (2258) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2258) 1007: elapsed time 1\n"},"seq":94} 1: (2258) 1007: elapsed time 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2258) <-1008-environment-cd /home/vboxuser/Projects\n"},"seq":96} 1: (2258) <-1008-environment-cd /home/vboxuser/Projects --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2258) ->1008^done\n"},"seq":98} 1: (2258) ->1008^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2259) ->(gdb)\n"},"seq":100} 1: (2259) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2259) 1008: elapsed time 0\n"},"seq":102} 1: (2259) 1008: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2259) <-1009-file-exec-and-symbols /home/vboxuser/Projects/source\n"},"seq":104} 1: (2259) <-1009-file-exec-and-symbols /home/vboxuser/Projects/source --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2263) ->1009^done\n"},"seq":106} 1: (2263) ->1009^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2264) ->(gdb)\n"},"seq":108} 1: (2264) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2264) 1009: elapsed time 5\n"},"seq":110} 1: (2264) 1009: elapsed time 5 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2265) <-1010-interpreter-exec console \"show architecture\"\n"},"seq":112} 1: (2265) <-1010-interpreter-exec console "show architecture" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2266) ->~\"The target architecture is set to \\"auto\\" (currently \\"i386:x86-64\\").\n\"\n"},"seq":114} 1: (2266) ->~"The target architecture is set to \"auto\" (currently \"i386:x86-64\").\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2266) ->1010^done\n"},"seq":116} 1: (2266) ->1010^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2266) ->(gdb)\n"},"seq":118} 1: (2266) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2270) 1010: elapsed time 4\n"},"seq":120} 1: (2270) 1010: elapsed time 4 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2279) <-1011-break-insert -f main\n"},"seq":122} 1: (2279) <-1011-break-insert -f main --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2285) ->1011^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x0000000000001276\",func=\"main()\",file=\"/home/vboxuser/Projects/source.cpp\",fullname=\"/home/vboxuser/Projects/source.cpp\",line=\"6\",thread-groups=[\"i1\"],times=\"0\",original-location=\"main\"}\n"},"seq":124} 1: (2285) ->1011^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000001276",func="main()",file="/home/vboxuser/Projects/source.cpp",fullname="/home/vboxuser/Projects/source.cpp",line="6",thread-groups=["i1"],times="0",original-location="main"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2285) ->(gdb)\n"},"seq":126} 1: (2285) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2311) 1011: elapsed time 31\n"},"seq":128} 1: (2311) 1011: elapsed time 31 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2317) Send Event AD7EngineCreateEvent\n"},"seq":130} 1: (2317) Send Event AD7EngineCreateEvent --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (2318) Send Event AD7ProgramCreateEvent\n"},"seq":132} 1: (2318) Send Event AD7ProgramCreateEvent --> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/Launch","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"17.4.30208.2","VS.Diagnostics.Debugger.HostVersion":"17.4.30208.2","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.Launch.Duration":2247,"VS.Diagnostics.Debugger.Launch.IsNoDebug":true,"VS.Diagnostics.Debugger.MIMode":"gdb","VS.Diagnostics.Debugger.FrameworkVersion":"6.0.1322.58009"}},"seq":134} --> R (launch-2): {"type":"response","request_seq":2,"success":true,"command":"launch","body":{},"seq":136} --> E (initialized): {"type":"event","event":"initialized","body":{},"seq":138} <-- R (runInTerminal-6) [3026 ms]: {"type":"response","seq":3,"command":"runInTerminal","request_seq":6,"success":true,"body":{"shellProcessId":8809}} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3271) ShellPid=8825\n"},"seq":141} 1: (3271) ShellPid=8825 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3287) DebuggerPid=8827\n"},"seq":143} 1: (3287) DebuggerPid=8827 <-- C (configurationDone-4): {"command":"configurationDone","type":"request","seq":4} --> R (configurationDone-4): {"type":"response","request_seq":4,"success":true,"command":"configurationDone","body":{},"seq":146} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3353) Send Event AD7LoadCompleteEvent\n"},"seq":148} 1: (3353) Send Event AD7LoadCompleteEvent --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"=thread-group-added,id=\"i1\"\nGNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1\nCopyright (C) 2022 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\nType \"show copying\" and \"show warranty\" for details.\nThis GDB was configured as \"x86_64-linux-gnu\".\nType \"show configuration\" for configuration details.\nFor bug reporting instructions, please see:\nhttps://www.gnu.org/software/gdb/bugs/.\nFind the GDB manual and other documentation resources online at:\n http://www.gnu.org/software/gdb/documentation/.\n\nFor help, type \"help\".\nType \"apropos word\" to search for commands related to \"word\".\nWarning: Debuggee TargetArchitecture not detected, assuming x86_64.\n=cmd-param-changed,param=\"pagination\",value=\"off\"\n"},"seq":150} =thread-group-added,id="i1" GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word". Warning: Debuggee TargetArchitecture not detected, assuming x86_64. =cmd-param-changed,param="pagination",value="off" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3408) <-1012-exec-run\n"},"seq":152} 1: (3408) <-1012-exec-run --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3415) ->=thread-group-started,id=\"i1\",pid=\"8847\"\n"},"seq":154} 1: (3415) ->=thread-group-started,id="i1",pid="8847" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3415) ->=thread-created,id=\"1\",group-id=\"i1\"\n"},"seq":156} 1: (3415) ->=thread-created,id="1",group-id="i1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3415) ->=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x0000555555555276\",func=\"main()\",file=\"/home/vboxuser/Projects/source.cpp\",fullname=\"/home/vboxuser/Projects/source.cpp\",line=\"6\",thread-groups=[\"i1\"],times=\"0\",original-location=\"main\"}\n"},"seq":158} 1: (3415) ->=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000555555555276",func="main()",file="/home/vboxuser/Projects/source.cpp",fullname="/home/vboxuser/Projects/source.cpp",line="6",thread-groups=["i1"],times="0",original-location="main"} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3415) ->=library-loaded,id=\"/lib64/ld-linux-x86-64.so.2\",target-name=\"/lib64/ld-linux-x86-64.so.2\",host-name=\"/lib64/ld-linux-x86-64.so.2\",symbols-loaded=\"0\",thread-group=\"i1\",ranges=[{from=\"0x00007ffff7fc5090\",to=\"0x00007ffff7fee335\"}]\n"},"seq":160} 1: (3415) ->=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff7fc5090",to="0x00007ffff7fee335"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3440) <-1013-thread-info 1\n"},"seq":162} 1: (3440) <-1013-thread-info 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3453) ->1012^running\n"},"seq":164} 1: (3453) ->1012^running --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3453) ->running,thread-id=\"all\"\n"},"seq":166} 1: (3453) ->running,thread-id="all" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3453) ->(gdb)\n"},"seq":168} 1: (3453) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3453) ->~\"Stopped due to shared library event (no libraries added or removed)\n\"\n"},"seq":170} 1: (3453) ->~"Stopped due to shared library event (no libraries added or removed)\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3453) ->stopped,reason=\"solib-event\",thread-id=\"1\",stopped-threads=\"all\",core=\"0\"\n"},"seq":172} 1: (3453) ->stopped,reason="solib-event",thread-id="1",stopped-threads="all",core="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3453) ->1013^done,threads=[{id=\"1\",target-id=\"process 8847\",name=\"source\",frame={level=\"0\",addr=\"0x00007ffff7fc6300\",func=\"GIdl_debug_state\",args=[],file=\"./elf/dl-debug.c\",fullname=\"./elf/./elf/dl-debug.c\",line=\"116\",arch=\"i386:x86-64\"},state=\"stopped\",core=\"0\"}]\n"},"seq":174} 1: (3453) ->1013^done,threads=[{id="1",target-id="process 8847",name="source",frame={level="0",addr="0x00007ffff7fc6300",func="GIdl_debug_state",args=[],file="./elf/dl-debug.c",fullname="./elf/./elf/dl-debug.c",line="116",arch="i386:x86-64"},state="stopped",core="0"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3453) ->(gdb)\n"},"seq":176} 1: (3453) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3472) 1012: elapsed time 64\n"},"seq":178} 1: (3472) 1012: elapsed time 64 --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"Stopped due to shared library event (no libraries added or removed)\n"},"seq":180} Stopped due to shared library event (no libraries added or removed) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3539) 1013: elapsed time 99\n"},"seq":182} 1: (3539) 1013: elapsed time 99 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3561) <-1014-interpreter-exec console \"shell echo -e \\\\033c 1>&2\"\n"},"seq":184} 1: (3561) <-1014-interpreter-exec console "shell echo -e \\033c 1>&2" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3567) ->1014^done\n"},"seq":186} 1: (3567) ->1014^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3567) ->(gdb)\n"},"seq":188} 1: (3567) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3572) Send Event AD7ProcessInfoUpdatedEvent\n"},"seq":190} 1: (3572) Send Event AD7ProcessInfoUpdatedEvent --> E (process): {"type":"event","event":"process","body":{"startMethod":"launch","name":"/home/vboxuser/Projects/source","systemProcessId":8847,"pointerSize":64},"seq":192} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3638) Send Event AD7ThreadCreateEvent\n"},"seq":194} 1: (3638) Send Event AD7ThreadCreateEvent --> E (thread): {"type":"event","event":"thread","body":{"reason":"started","threadId":8847},"seq":196} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3677) 1014: elapsed time 115\n"},"seq":198} 1: (3677) 1014: elapsed time 115 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3681) <-1015-gdb-set stop-on-solib-events 0\n"},"seq":200} 1: (3681) <-1015-gdb-set stop-on-solib-events 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3689) ->1015^done\n"},"seq":202} 1: (3689) ->1015^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3689) ->(gdb)\n"},"seq":204} 1: (3689) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3690) 1015: elapsed time 9\n"},"seq":206} 1: (3690) 1015: elapsed time 9 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3740) <-1016-interpreter-exec console \"info sharedlibrary\"\n"},"seq":208} 1: (3740) <-1016-interpreter-exec console "info sharedlibrary" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3745) ->~\"From To Syms Read Shared Object Library\n\"\n"},"seq":210} 1: (3745) ->~"From To Syms Read Shared Object Library\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3746) ->~\"0x00007ffff7fc5090 0x00007ffff7fee335 Yes /lib64/ld-linux-x86-64.so.2\n\"\n"},"seq":212} 1: (3746) ->~"0x00007ffff7fc5090 0x00007ffff7fee335 Yes /lib64/ld-linux-x86-64.so.2\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3746) ->1016^done\n"},"seq":214} 1: (3746) ->1016^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3746) ->(gdb)\n"},"seq":216} 1: (3746) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3748) 1016: elapsed time 8\n"},"seq":218} 1: (3748) 1016: elapsed time 8 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3761) Send Event AD7ModuleLoadEvent\n"},"seq":220} 1: (3761) Send Event AD7ModuleLoadEvent --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.\n"},"seq":222} Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded. --> E (module): {"type":"event","event":"module","body":{"reason":"new","module":{"id":1,"name":"ld-linux-x86-64.so.2","path":"/lib64/ld-linux-x86-64.so.2","symbolFilePath":"/lib64/ld-linux-x86-64.so.2","vsLoadAddress":"140737353896080","vsPreferredLoadAddress":"140737353896080","vsModuleSize":168613,"vsLoadOrder":0,"vsTimestampUTC":"1688827604","vsIs64Bit":true}},"seq":224} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3835) <--exec-continue\n"},"seq":226} 1: (3835) <--exec-continue --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3838) ->^running\n"},"seq":228} 1: (3838) ->^running --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3838) ->running,thread-id=\"all\"\n"},"seq":230} 1: (3838) ->running,thread-id="all" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3838) ->(gdb)\n"},"seq":232} 1: (3838) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3838) ->~\"\nProgram\"\n"},"seq":234} 1: (3838) ->~"\nProgram" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3838) ->~\" received signal SIGSEGV, Segmentation fault.\n\"\n"},"seq":236} 1: (3838) ->~" received signal SIGSEGV, Segmentation fault.\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3838) ->~\"0x0000aaaa9aa5ab49 in ?? ()\n\"\n"},"seq":238} 1: (3838) ->~"0x0000aaaa9aa5ab49 in ?? ()\n" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (3838) ->stopped,reason=\"signal-received\",signal-name=\"SIGSEGV\",signal-meaning=\"Segmentation fault\",frame={addr=\"0x0000aaaa9aa5ab49\",func=\"??\",args=[],arch=\"i386:x86-64\"},thread-id=\"1\",stopped-threads=\"all\",core=\"0\"\n"},"seq":240} 1: (3838) ->stopped,reason="signal-received",signal-name="SIGSEGV",signal-meaning="Segmentation fault",frame={addr="0x0000aaaa9aa5ab49",func="??",args=[],arch="i386:x86-64"},thread-id="1",stopped-threads="all",core="0" --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"\nProgram"},"seq":242}

Program --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":" received signal SIGSEGV, Segmentation fault.\n"},"seq":244} received signal SIGSEGV, Segmentation fault. --> E (output): {"type":"event","event":"output","body":{"category":"stdout","output":"0x0000aaaa9aa5ab49 in ?? ()\n"},"seq":246} 0x0000aaaa9aa5ab49 in ?? () --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4057) <-1017-thread-info\n"},"seq":248} 1: (4057) <-1017-thread-info --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4057) ->1017^done,threads=[{id=\"1\",target-id=\"process 8847\",name=\"source\",frame={level=\"0\",addr=\"0x0000aaaa9aa5ab49\",func=\"??\",args=[],arch=\"i386:x86-64\"},state=\"stopped\",core=\"0\"}],current-thread-id=\"1\"\n"},"seq":250} 1: (4057) ->1017^done,threads=[{id="1",target-id="process 8847",name="source",frame={level="0",addr="0x0000aaaa9aa5ab49",func="??",args=[],arch="i386:x86-64"},state="stopped",core="0"}],current-thread-id="1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4057) ->(gdb)\n"},"seq":252} 1: (4057) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4064) 1017: elapsed time 7\n"},"seq":254} 1: (4064) 1017: elapsed time 7 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4163) <-1018-stack-list-frames 0 1000\n"},"seq":256} 1: (4163) <-1018-stack-list-frames 0 1000 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4178) ->1018^done,stack=[frame={level=\"0\",addr=\"0x0000aaaa9aa5ab49\",func=\"??\",arch=\"i386:x86-64\"},frame={level=\"1\",addr=\"0x00007ffff7fe636c\",func=\"dl_main\",file=\"./elf/rtld.c\",fullname=\"./elf/./elf/rtld.c\",line=\"1868\",arch=\"i386:x86-64\"},frame={level=\"2\",addr=\"0x00007ffff7fe285c\",func=\"_dl_sysdep_start\",file=\"../elf/dl-sysdep.c\",fullname=\"./elf/../elf/dl-sysdep.c\",line=\"256\",arch=\"i386:x86-64\"},frame={level=\"3\",addr=\"0x00007ffff7fe45b8\",func=\"_dl_start_final\",file=\"./elf/rtld.c\",fullname=\"./elf/./elf/rtld.c\",line=\"507\",arch=\"i386:x86-64\"},frame={level=\"4\",addr=\"0x00007ffff7fe45b8\",func=\"_dl_start\",file=\"./elf/rtld.c\",fullname=\"./elf/./elf/rtld.c\",line=\"596\",arch=\"i386:x86-64\"},frame={level=\"5\",addr=\"0x00007ffff7fe32b8\",func=\"_start\",from=\"/lib64/ld-linux-x86-64.so.2\",arch=\"i386:x86-64\"},frame={level=\"6\",addr=\"0x0000000000000001\",func=\"??\",arch=\"i386:x86-64\"},frame={level=\"7\",addr=\"0x00007fffffffe24d\",func=\"??\",arch=\"i386:x86-64\"},frame={level=\"8\",addr=\"0x0000000000000000\",func=\"??\",arch=\"i386:x86-64\"}]\n"},"seq":258} 1: (4178) ->1018^done,stack=[frame={level="0",addr="0x0000aaaa9aa5ab49",func="??",arch="i386:x86-64"},frame={level="1",addr="0x00007ffff7fe636c",func="dl_main",file="./elf/rtld.c",fullname="./elf/./elf/rtld.c",line="1868",arch="i386:x86-64"},frame={level="2",addr="0x00007ffff7fe285c",func="_dl_sysdep_start",file="../elf/dl-sysdep.c",fullname="./elf/../elf/dl-sysdep.c",line="256",arch="i386:x86-64"},frame={level="3",addr="0x00007ffff7fe45b8",func="_dl_start_final",file="./elf/rtld.c",fullname="./elf/./elf/rtld.c",line="507",arch="i386:x86-64"},frame={level="4",addr="0x00007ffff7fe45b8",func="_dl_start",file="./elf/rtld.c",fullname="./elf/./elf/rtld.c",line="596",arch="i386:x86-64"},frame={level="5",addr="0x00007ffff7fe32b8",func="_start",from="/lib64/ld-linux-x86-64.so.2",arch="i386:x86-64"},frame={level="6",addr="0x0000000000000001",func="??",arch="i386:x86-64"},frame={level="7",addr="0x00007fffffffe24d",func="??",arch="i386:x86-64"},frame={level="8",addr="0x0000000000000000",func="??",arch="i386:x86-64"}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4178) ->(gdb)\n"},"seq":260} 1: (4178) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4182) 1018: elapsed time 19\n"},"seq":262} 1: (4182) 1018: elapsed time 19 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4223) Send Event AD7ExceptionEvent\n"},"seq":264} 1: (4223) Send Event AD7ExceptionEvent --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"Execute debugger commands using \"-exec \", for example \"-exec info registers\" will list registers in use (when GDB is the debugger)\n"},"seq":266} Execute debugger commands using "-exec ", for example "-exec info registers" will list registers in use (when GDB is the debugger) <-- C (threads-5): {"command":"threads","type":"request","seq":5} --> R (threads-5): {"type":"response","request_seq":5,"success":true,"command":"threads","body":{"threads":[{"id":8847,"name":"source [8847]"}]},"seq":269} --> E (stopped): {"type":"event","event":"stopped","body":{"reason":"exception","threadId":8847,"text":"Segmentation fault","allThreadsStopped":true},"seq":271} <-- C (threads-6): {"command":"threads","type":"request","seq":6} --> R (threads-6): {"type":"response","request_seq":6,"success":true,"command":"threads","body":{"threads":[{"id":8847,"name":"source [8847]"}]},"seq":274} <-- C (stackTrace-7): {"command":"stackTrace","arguments":{"threadId":8847,"startFrame":0,"levels":20},"type":"request","seq":7} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4674) <-1019-stack-list-arguments 0 0 6\n"},"seq":277} 1: (4674) <-1019-stack-list-arguments 0 0 6 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4690) ->1019^done,stack-args=[frame={level=\"0\",args=[]},frame={level=\"1\",args=[name=\"phdr\",name=\"phnum\",name=\"user_entry\",name=\"auxv\"]},frame={level=\"2\",args=[name=\"start_argptr\",name=\"dl_main\"]},frame={level=\"3\",args=[name=\"arg\"]},frame={level=\"4\",args=[name=\"arg\"]},frame={level=\"5\",args=[]},frame={level=\"6\",args=[]}]\n"},"seq":279} 1: (4690) ->1019^done,stack-args=[frame={level="0",args=[]},frame={level="1",args=[name="phdr",name="phnum",name="user_entry",name="auxv"]},frame={level="2",args=[name="start_argptr",name="dl_main"]},frame={level="3",args=[name="arg"]},frame={level="4",args=[name="arg"]},frame={level="5",args=[]},frame={level="6",args=[]}] --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4690) ->(gdb)\n"},"seq":281} 1: (4690) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4692) 1019: elapsed time 17\n"},"seq":283} 1: (4692) 1019: elapsed time 17 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4696) <-1020-stack-select-frame 1\n"},"seq":285} 1: (4696) <-1020-stack-select-frame 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4706) ->1020^done\n"},"seq":287} 1: (4706) ->1020^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4706) ->(gdb)\n"},"seq":289} 1: (4706) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4750) 1020: elapsed time 54\n"},"seq":291} 1: (4750) 1020: elapsed time 54 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4752) <-1021-var-create - \"phdr\"\n"},"seq":293} 1: (4752) <-1021-var-create - "phdr" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4760) ->1021^done,name=\"var1\",numchild=\"8\",value=\"\",type=\"const Elf64_Phdr \",thread-id=\"1\",has_more=\"0\"\n"},"seq":295} 1: (4760) ->1021^done,name="var1",numchild="8",value="",type="const Elf64_Phdr ",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4760) ->(gdb)\n"},"seq":297} 1: (4760) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4761) 1021: elapsed time 9\n"},"seq":299} 1: (4761) 1021: elapsed time 9 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4763) <-1022-var-delete var1\n"},"seq":301} 1: (4763) <-1022-var-delete var1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4765) ->1022^done,ndeleted=\"1\"\n"},"seq":303} 1: (4765) ->1022^done,ndeleted="1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4765) ->(gdb)\n"},"seq":305} 1: (4765) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4767) 1022: elapsed time 4\n"},"seq":307} 1: (4767) 1022: elapsed time 4 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4769) <-1023-var-create - \"phnum\"\n"},"seq":309} 1: (4769) <-1023-var-create - "phnum" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4779) ->1023^done,name=\"var2\",numchild=\"0\",value=\"\",type=\"Elf64_Word\",thread-id=\"1\",has_more=\"0\"\n"},"seq":311} 1: (4779) ->1023^done,name="var2",numchild="0",value="",type="Elf64_Word",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4779) ->(gdb)\n"},"seq":313} 1: (4779) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4781) 1023: elapsed time 11\n"},"seq":315} 1: (4781) 1023: elapsed time 11 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4782) <-1024-var-delete var2\n"},"seq":317} 1: (4782) <-1024-var-delete var2 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4783) ->1024^done,ndeleted=\"1\"\n"},"seq":319} 1: (4783) ->1024^done,ndeleted="1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4783) ->(gdb)\n"},"seq":321} 1: (4783) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4783) 1024: elapsed time 1\n"},"seq":323} 1: (4783) 1024: elapsed time 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4784) <-1025-var-create - \"user_entry\"\n"},"seq":325} 1: (4784) <-1025-var-create - "user_entry" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4785) ->1025^done,name=\"var3\",numchild=\"1\",value=\"\",type=\"Elf64_Addr \",thread-id=\"1\",has_more=\"0\"\n"},"seq":327} 1: (4785) ->1025^done,name="var3",numchild="1",value="",type="Elf64_Addr ",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4785) ->(gdb)\n"},"seq":329} 1: (4785) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4786) 1025: elapsed time 1\n"},"seq":331} 1: (4786) 1025: elapsed time 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4786) <-1026-var-delete var3\n"},"seq":333} 1: (4786) <-1026-var-delete var3 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4786) ->1026^done,ndeleted=\"1\"\n"},"seq":335} 1: (4786) ->1026^done,ndeleted="1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4786) ->(gdb)\n"},"seq":337} 1: (4786) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4787) 1026: elapsed time 1\n"},"seq":339} 1: (4787) 1026: elapsed time 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4788) <-1027-var-create - \"auxv\"\n"},"seq":341} 1: (4788) <-1027-var-create - "auxv" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4789) ->1027^done,name=\"var4\",numchild=\"2\",value=\"\",type=\"Elf64_auxv_t \",thread-id=\"1\",has_more=\"0\"\n"},"seq":343} 1: (4789) ->1027^done,name="var4",numchild="2",value="",type="Elf64_auxv_t ",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4789) ->(gdb)\n"},"seq":345} 1: (4789) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4790) 1027: elapsed time 1\n"},"seq":347} 1: (4790) 1027: elapsed time 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4790) <-1028-var-delete var4\n"},"seq":349} 1: (4790) <-1028-var-delete var4 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4791) ->1028^done,ndeleted=\"1\"\n"},"seq":351} 1: (4791) ->1028^done,ndeleted="1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4791) ->(gdb)\n"},"seq":353} 1: (4791) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4791) 1028: elapsed time 0\n"},"seq":355} 1: (4791) 1028: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4791) <-1029-stack-select-frame 2\n"},"seq":357} 1: (4791) <-1029-stack-select-frame 2 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4792) ->1029^done\n"},"seq":359} 1: (4792) ->1029^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4792) ->(gdb)\n"},"seq":361} 1: (4792) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4804) 1029: elapsed time 12\n"},"seq":363} 1: (4804) 1029: elapsed time 12 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4805) <-1030-var-create - \"start_argptr\"\n"},"seq":365} 1: (4805) <-1030-var-create - "start_argptr" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4809) ->1030^done,name=\"var5\",numchild=\"1\",value=\"0x7fffffffdea0\",type=\"void \",thread-id=\"1\",has_more=\"0\"\n"},"seq":367} 1: (4809) ->1030^done,name="var5",numchild="1",value="0x7fffffffdea0",type="void ",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4809) ->(gdb)\n"},"seq":369} 1: (4809) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4810) 1030: elapsed time 5\n"},"seq":371} 1: (4810) 1030: elapsed time 5 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4810) <-1031-var-delete var5\n"},"seq":373} 1: (4810) <-1031-var-delete var5 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4816) ->1031^done,ndeleted=\"1\"\n"},"seq":375} 1: (4816) ->1031^done,ndeleted="1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4816) ->(gdb)\n"},"seq":377} 1: (4816) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4816) 1031: elapsed time 5\n"},"seq":379} 1: (4816) 1031: elapsed time 5 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4816) <-1032-var-create - \"dl_main\"\n"},"seq":381} 1: (4816) <-1032-var-create - "dl_main" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4817) ->1032^done,name=\"var6\",numchild=\"0\",value=\"0x7ffff7fe4900 \",type=\"void ()(const Elf64_Phdr , Elf64_Word, Elf64_Addr , Elf64_auxv_t )\",thread-id=\"1\",has_more=\"0\"\n"},"seq":383} 1: (4817) ->1032^done,name="var6",numchild="0",value="0x7ffff7fe4900 ",type="void ()(const Elf64_Phdr , Elf64_Word, Elf64_Addr , Elf64_auxv_t )",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4817) ->(gdb)\n"},"seq":385} 1: (4817) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4817) 1032: elapsed time 0\n"},"seq":387} 1: (4817) 1032: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4818) <-1033-var-delete var6\n"},"seq":389} 1: (4818) <-1033-var-delete var6 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4820) ->1033^done,ndeleted=\"1\"\n"},"seq":391} 1: (4820) ->1033^done,ndeleted="1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4820) ->(gdb)\n"},"seq":393} 1: (4820) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4820) 1033: elapsed time 2\n"},"seq":395} 1: (4820) 1033: elapsed time 2 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4820) <-1034-stack-select-frame 3\n"},"seq":397} 1: (4820) <-1034-stack-select-frame 3 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4821) ->1034^done\n"},"seq":399} 1: (4821) ->1034^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4821) ->(gdb)\n"},"seq":401} 1: (4821) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4821) 1034: elapsed time 0\n"},"seq":403} 1: (4821) 1034: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4821) <-1035-var-create - \"arg\"\n"},"seq":405} 1: (4821) <-1035-var-create - "arg" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4828) ->1035^done,name=\"var7\",numchild=\"0\",value=\"0x7fffffffdea0\",type=\"void \",thread-id=\"1\",has_more=\"0\"\n"},"seq":407} 1: (4828) ->1035^done,name="var7",numchild="0",value="0x7fffffffdea0",type="void ",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4828) ->(gdb)\n"},"seq":409} 1: (4828) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4829) 1035: elapsed time 7\n"},"seq":411} 1: (4829) 1035: elapsed time 7 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4829) <-1036-var-delete var7\n"},"seq":413} 1: (4829) <-1036-var-delete var7 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4829) ->1036^done,ndeleted=\"1\"\n"},"seq":415} 1: (4829) ->1036^done,ndeleted="1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4829) ->(gdb)\n"},"seq":417} 1: (4829) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4832) 1036: elapsed time 2\n"},"seq":419} 1: (4832) 1036: elapsed time 2 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4832) <-1037-stack-select-frame 4\n"},"seq":421} 1: (4832) <-1037-stack-select-frame 4 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4832) ->1037^done\n"},"seq":423} 1: (4832) ->1037^done --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4832) ->(gdb)\n"},"seq":425} 1: (4832) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4832) 1037: elapsed time 0\n"},"seq":427} 1: (4832) 1037: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4832) <-1038-var-create - \"arg\"\n"},"seq":429} 1: (4832) <-1038-var-create - "arg" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4832) ->1038^done,name=\"var8\",numchild=\"0\",value=\"0x7fffffffdea0\",type=\"void \",thread-id=\"1\",has_more=\"0\"\n"},"seq":431} 1: (4832) ->1038^done,name="var8",numchild="0",value="0x7fffffffdea0",type="void ",thread-id="1",has_more="0" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4833) ->(gdb)\n"},"seq":433} 1: (4833) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4833) 1038: elapsed time 0\n"},"seq":435} 1: (4833) 1038: elapsed time 0 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4833) <-1039-var-delete var8\n"},"seq":437} 1: (4833) <-1039-var-delete var8 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4833) ->1039^done,ndeleted=\"1\"\n"},"seq":439} 1: (4833) ->1039^done,ndeleted="1" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4833) ->(gdb)\n"},"seq":441} 1: (4833) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (4833) 1039: elapsed time 0\n"},"seq":443} 1: (4833) 1039: elapsed time 0 --> R (stackTrace-7): {"type":"response","request_seq":7,"success":true,"command":"stackTrace","body":{"stackFrames":[{"id":1000,"name":"[Unknown/Just-In-Time compiled code]","line":0,"column":0,"instructionPointerReference":"0x0000aaaa9aa5ab49"},{"id":1001,"name":"ld-linux-x86-64.so.2!dl_main(const Elf64_Phdr phdr, Elf64_Word phnum, Elf64_Addr user_entry, Elf64_auxv_t * auxv)","source":{"presentationHint":"deemphasize","name":"rtld.c","path":"./elf/./elf/rtld.c","sources":[],"checksums":[]},"line":1868,"column":1,"instructionPointerReference":"0x00007ffff7fe636c","moduleId":1},{"id":1002,"name":"ld-linux-x86-64.so.2!_dl_sysdep_start(void * start_argptr, void ()(const Elf64_Phdr , Elf64_Word, Elf64_Addr , Elf64_auxv_t ) dl_main)","source":{"presentationHint":"deemphasize","name":"dl-sysdep.c","path":"./elf/../elf/dl-sysdep.c","sources":[],"checksums":[]},"line":256,"column":1,"instructionPointerReference":"0x00007ffff7fe285c","moduleId":1},{"id":1003,"name":"ld-linux-x86-64.so.2!_dl_start_final(void arg)","source":{"presentationHint":"deemphasize","name":"rtld.c","path":"./elf/./elf/rtld.c","sources":[],"checksums":[]},"line":507,"column":1,"instructionPointerReference":"0x00007ffff7fe45b8","moduleId":1},{"id":1004,"name":"ld-linux-x86-64.so.2!_dl_start(void * arg)","source":{"presentationHint":"deemphasize","name":"rtld.c","path":"./elf/./elf/rtld.c","sources":[],"checksums":[]},"line":596,"column":1,"instructionPointerReference":"0x00007ffff7fe45b8","moduleId":1},{"id":1005,"name":"ld-linux-x86-64.so.2!_start","line":0,"column":0,"instructionPointerReference":"0x00007ffff7fe32b8","moduleId":1},{"id":1006,"name":"[Unknown/Just-In-Time compiled code]","line":0,"column":0,"instructionPointerReference":"0x0000000000000001"}],"totalFrames":7},"seq":445} <-- C (threads-8): {"command":"threads","type":"request","seq":8} --> R (threads-8): {"type":"response","request_seq":8,"success":true,"command":"threads","body":{"threads":[{"id":8847,"name":"source [8847]"}]},"seq":448}

arturkrutikhin-mars commented 1 year ago

It seems I got it) Launch.json:

{
    "version": "2.0.0",
    "configurations": [
        {
            "name": "C/C++: g++ build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}/${fileBasenameNoExtension}",
            "args": [],
            "stopAtEntry": true,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": false,
            "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
                }

            ],
            "preLaunchTask": "C/C++: g++ build active file",
            "miDebuggerPath": "/usr/bin/gdb",
            "logging": {
                "engineLogging": true,
                "traceResponse": true
             }
        }

    ],
    "logging": {
        "engineLogging": true,
        "traceResponse": true
     }

}
arturkrutikhin-mars commented 1 year ago

What's wrong with this launch.json file? Why the debugger does not stop and highlight the breakpoints? When I press Step-In I receive this message:

<-- C (stepIn-11): {"command":"stepIn","arguments":{"threadId":9091},"type":"request","seq":11} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (94262) <-1043-exec-step\n"},"seq":489} 1: (94262) <-1043-exec-step --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (94262) ->1043^error,msg=\"Cannot find bounds of current function\"\n"},"seq":491} 1: (94262) ->1043^error,msg="Cannot find bounds of current function" --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (94263) ->(gdb)\n"},"seq":493} 1: (94263) ->(gdb) --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (94263) 1043: elapsed time 1\n"},"seq":495} 1: (94263) 1043: elapsed time 1 --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (94264) Send Event AD7MessageEvent\n"},"seq":497} 1: (94264) Send Event AD7MessageEvent --> E (output): {"type":"event","event":"output","body":{"category":"stderr","output":"ERROR: Unexpected GDB output from command \"-exec-step\". Cannot find bounds of current function\n"},"seq":499} ERROR: Unexpected GDB output from command "-exec-step". Cannot find bounds of current function --> R (stepIn-11): {"type":"response","request_seq":11,"success":false,"command":"stepIn","message":"Unable to step in. Operation failed with error code 0x80004004.","body":{},"seq":501}

arturkrutikhin-mars commented 1 year ago

Hi Warden! Can you help me?