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

Can't debug with breakpoints #88

Closed
luxingxiao opened this issue Mar 23, 2023 · 2 comments
Closed

Can't debug with breakpoints #88

luxingxiao opened this issue Mar 23, 2023 · 2 comments
Labels
bug Something isn't working moreinfoneeded For issues where more information is needed before we can proceed on this issue.

Comments

@luxingxiao
Copy link

cdt-gdb-vscode version: 0.0.91
gdb version: GNU gdb (Ubuntu 12.0.90-0ubuntu1) 12.0.90

@jonahgraham jonahgraham added bug Something isn't working moreinfoneeded For issues where more information is needed before we can proceed on this issue. labels Mar 23, 2023
@jonahgraham
Copy link
Contributor

Can you please provide additional details. I am able to debug successfully using gdb 12.1?

e.g. can you set "verbose": true in launch.json and share the output?

@GitMensch
Copy link

Still happening here, output:

From client: initialize({"clientID":"vscode","clientName":"VSCodium","adapterID":"gdb","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true,"supportsANSIStyling":true})
To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"supportsConfigurationDoneRequest":true,"supportsEvaluateForHovers":true,"supportsSetVariable":true,"supportsConditionalBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsFunctionBreakpoints":true,"supportsDisassembleRequest":true,"supportsReadMemoryRequest":true,"supportsWriteMemoryRequest":true,"supportsSteppingGranularity":true}}
From client: launch({"name":"Debug","type":"gdb","gdb":"/tmp/gdb-wrapper","request":"launch","program":"/tmp/prog","cwd":"/tmp","verbose":true,"__configurationTarget":6,"__sessionId":"08c81faf-29aa-49a5-aca8-63da424752fc"})
GDB notify async: thread-group-added,id="i1"
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"GNU gdb (Debian 15.2-1) 15.2\n"}}
GNU gdb (Debian 15.2-1) 15.2
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Copyright (C) 2024 Free Software Foundation, Inc.\n"}}
Copyright (C) 2024 Free Software Foundation, Inc.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"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."}}
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.To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"\nType \"show copying\" and \"show warranty\" for details.\n"}}

Type "show copying" and "show warranty" for details.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"This GDB was configured as \"x86_64-linux-gnu\".\n"}}
This GDB was configured as "x86_64-linux-gnu".
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Type \"show configuration\" for configuration details.\n"}}
Type "show configuration" for configuration details.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"For bug reporting instructions, please see:\n"}}
For bug reporting instructions, please see:
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"<https://www.gnu.org/software/gdb/bugs/>.\n"}}
<https://www.gnu.org/software/gdb/bugs/>.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Find the GDB manual and other documentation resources online at:\n    <"}}
Find the GDB manual and other documentation resources online at:
    <To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"http://www.gnu.org/software/gdb/documentation/>.\n\n"}}
http://www.gnu.org/software/gdb/documentation/>.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"For help, type \"help\".\n"}}
For help, type "help".
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Type \"apropos word\" to search for commands related to \"word\".\n"}}
Type "apropos word" to search for commands related to "word".
GDB command: 0 -gdb-set non-stop off
GDB result: 0 done
GDB command: 1 -gdb-set mi-async on
GDB result: 1 done
GDB command: 2 -file-exec-and-symbols "/tmp/prog"
GDB result: 2 done
GDB command: 3 -enable-pretty-printing
GDB result: 3 done
To client: {"seq":0,"type":"event","event":"initialized"}
To client: {"seq":0,"type":"response","request_seq":2,"command":"launch","success":true}
From client: setBreakpoints({"source":{"name":"fileio.c","path":"/tmp/fileio.c"},"lines":[],"breakpoints":[],"sourceModified":false})
GDB command: 4 -break-list
From client: setBreakpoints({"source":{"name":"strings.c","path":"/tmp/strings.c"},"lines":[550],"breakpoints":[{"line":550}],"sourceModified":false})
From client: setFunctionBreakpoints({"breakpoints":[{"name":"cob_runtime_error"},{"name":"bdb_bt_compare"}]})
GDB command: 5 -break-list
GDB command: 6 -break-list
GDB result: 4 done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
To client: {"seq":0,"type":"response","request_seq":3,"command":"setBreakpoints","success":true,"body":{"breakpoints":[]}}
GDB result: 5 done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
GDB result: 6 done,BreakpointTable={nr_rows="0",nr_cols="6",hdr=[{width="7",alignment="-1",col_name="number",colhdr="Num"},{width="14",alignment="-1",col_name="type",colhdr="Type"},{width="4",alignment="-1",col_name="disp",colhdr="Disp"},{width="3",alignment="-1",col_name="enabled",colhdr="Enb"},{width="10",alignment="-1",col_name="addr",colhdr="Address"},{width="40",alignment="2",col_name="what",colhdr="What"}],body=[]}
GDB command: 7 -break-insert --function cob_runtime_error
GDB command: 8 -break-insert --source "/tmp/strings.c" --line 550
GDB result: 7 error,msg="Function \"cob_runtime_error\" not defined."
GDB result: 8 error,msg="No source file named /tmp/strings.c."
To client: {"seq":0,"type":"response","request_seq":4,"command":"setBreakpoints","success":true,"body":{"breakpoints":[{"verified":false,"message":"No source file named /tmp/strings.c."}]}}
From client: configurationDone(undefined)
To client: {"seq":0,"type":"event","event":"output","body":{"category":"console","output":"\nIn the Debug Console view you can interact directly with GDB.\nTo display the value of an expression, type that expression which can reference\nvariables that are in scope. For example type '2 + 3' or the name of a variable.\nArbitrary commands can be sent to GDB by prefixing the input with a '>',\nfor example type '>show version' or '>help'.\n\n"}}

In the Debug Console view you can interact directly with GDB.
To display the value of an expression, type that expression which can reference
variables that are in scope. For example type '2 + 3' or the name of a variable.
Arbitrary commands can be sent to GDB by prefixing the input with a '>',
for example type '>show version' or '>help'.
GDB command: 10 -exec-run
GDB notify async: thread-group-started,id="i1",pid="1571"
GDB notify async: thread-created,id="1",group-id="i1"
GDB notify async: 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="0x00007ffff7fc9000",to="0x00007ffff7feff11"}]
GDB result: 10 running
GDB exec async: running,thread-id="all"
To client: {"seq":0,"type":"event","event":"continued","body":{"threadId":1,"allThreadsContinued":true}}
To client: {"seq":0,"type":"response","request_seq":6,"command":"configurationDone","success":true}
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libasan.so.8",target-name="/lib/x86_64-linux-gnu/libasan.so.8",host-name="/lib/x86_64-linux-gnu/libasan.so.8",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff791fb80",to="0x00007ffff7a33eae"}]
GDB notify async: library-loaded,id="/tmp/gnucobol-3.x-commit-only/build/libcob/.libs/libcob.so.4",target-name="/tmp/gnucobol-3.x-commit-only/build/libcob/.libs/libcob.so.4",host-name="/tmp/gnucobol-3.x-commit-only/build/libcob/.libs/libcob.so.4",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff72c6ef0",to="0x00007ffff74e107f"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libubsan.so.1",target-name="/lib/x86_64-linux-gnu/libubsan.so.1",host-name="/lib/x86_64-linux-gnu/libubsan.so.1",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff69cc700",to="0x00007ffff6a1716e"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff67f7400",to="0x00007ffff695bb6d"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libm.so.6",target-name="/lib/x86_64-linux-gnu/libm.so.6",host-name="/lib/x86_64-linux-gnu/libm.so.6",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff66f9240",to="0x00007ffff6772326"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libgcc_s.so.1",target-name="/lib/x86_64-linux-gnu/libgcc_s.so.1",host-name="/lib/x86_64-linux-gnu/libgcc_s.so.1",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff66be3c0",to="0x00007ffff66e0f95"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libgmp.so.10",target-name="/lib/x86_64-linux-gnu/libgmp.so.10",host-name="/lib/x86_64-linux-gnu/libgmp.so.10",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff663d680",to="0x00007ffff66a0a40"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libxml2.so.2",target-name="/lib/x86_64-linux-gnu/libxml2.so.2",host-name="/lib/x86_64-linux-gnu/libxml2.so.2",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff64a7cc0",to="0x00007ffff65cd70e"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libcjson.so.1",target-name="/lib/x86_64-linux-gnu/libcjson.so.1",host-name="/lib/x86_64-linux-gnu/libcjson.so.1",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff6470240",to="0x00007ffff6473923"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libncursesw.so.6",target-name="/lib/x86_64-linux-gnu/libncursesw.so.6",host-name="/lib/x86_64-linux-gnu/libncursesw.so.6",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff643e240",to="0x00007ffff6463e8a"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libtinfo.so.6",target-name="/lib/x86_64-linux-gnu/libtinfo.so.6",host-name="/lib/x86_64-linux-gnu/libtinfo.so.6",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff640eac0",to="0x00007ffff6420eec"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libpanelw.so.6",target-name="/lib/x86_64-linux-gnu/libpanelw.so.6",host-name="/lib/x86_64-linux-gnu/libpanelw.so.6",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff63f8100",to="0x00007ffff63f9723"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libdb-5.3.so",target-name="/lib/x86_64-linux-gnu/libdb-5.3.so",host-name="/lib/x86_64-linux-gnu/libdb-5.3.so",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff625d4c0",to="0x00007ffff63a4620"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libstdc++.so.6",target-name="/lib/x86_64-linux-gnu/libstdc++.so.6",host-name="/lib/x86_64-linux-gnu/libstdc++.so.6",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff6069240",to="0x00007ffff618d79e"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libicuuc.so.72",target-name="/lib/x86_64-linux-gnu/libicuuc.so.72",host-name="/lib/x86_64-linux-gnu/libicuuc.so.72",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff5e244c0",to="0x00007ffff5f23b78"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libz.so.1",target-name="/lib/x86_64-linux-gnu/libz.so.1",host-name="/lib/x86_64-linux-gnu/libz.so.1",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff5d9e340",to="0x00007ffff5db1113"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/liblzma.so.5",target-name="/lib/x86_64-linux-gnu/liblzma.so.5",host-name="/lib/x86_64-linux-gnu/liblzma.so.5",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff5d6c5c0",to="0x00007ffff5d8a146"}]
GDB notify async: library-loaded,id="/lib/x86_64-linux-gnu/libicudata.so.72",target-name="/lib/x86_64-linux-gnu/libicudata.so.72",host-name="/lib/x86_64-linux-gnu/libicudata.so.72",symbols-loaded="0",thread-group="i1",ranges=[{from="0x00007ffff3f97040",to="0x00007ffff3f970f9"}]
From client: threads(undefined)
To client: {"seq":0,"type":"response","request_seq":7,"command":"threads","success":true,"body":{"threads":[{"id":1,"name":"1","running":true}]}}
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"[Thread debugging using libthread_db enabled]\n"}}
[Thread debugging using libthread_db enabled]
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Using host libthread_db library \"/lib/x86_64-linux-gnu/libthread_db.so.1\".\n"}}
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"[Inferior 1 (process 1571) exited normally]\n"}}
[Inferior 1 (process 1571) exited normally]
GDB notify async: thread-exited,id="1",group-id="i1"
GDB notify async: thread-group-exited,id="i1",exit-code="0"
GDB exec async: stopped,reason="exited-normally"
To client: {"seq":0,"type":"event","event":"terminated"}
From client: disconnect({"restart":false})
GDB command: 11 -gdb-exit
GDB result: 11 exit
To client: {"seq":0,"type":"response","request_seq":8,"command":"disconnect","success":true}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working moreinfoneeded For issues where more information is needed before we can proceed on this issue.
Projects
None yet
Development

No branches or pull requests

3 participants