Comments (20)
remove the '-' at the start of the command. If commands are starting with '-' it thinks they are a MI command
from code-debug.
Still not working.
It connects to the GDB server. But nothing else works.
from code-debug.
Are you running gdbserver on localhost on port 4444?
from code-debug.
Yes. That's my GDB bridge which relays to my target over a CAN bus. So when I say it connects, I mean to my GDB bridge running locally on my computer. No monitor commands are patched through (it worked in 0.2.0)
from code-debug.
your configuration misses executable
and cwd
. For me gdbserver works with cwd and executable.
executable
loads the symbols and cwd
makes the source paths available
from code-debug.
Didn't make a difference. Now says that symbols have been read, but same error.
{
"version": "0.3.1",
"configurations": [
{
"name": "Debug GDB",
"type": "gdb",
"request": "attach",
"target": ":4444",
"remote": true,
"autorun": ["monitor interface=0"],
"executable": "${workspaceRoot}/Sw/A_XMC/out/use/A_Myriad_A_5_6.elf",
"cwd": "${workspaceRoot}"
}
]
}
from code-debug.
What os are you on?
Also im not sure if this is a code-debug issue. Does it work from the console?
from code-debug.
also i uploaded a new release. You dont need to prefix executable with workspaceRoot anymore.
from code-debug.
Updated and reconfigured. (I'm on Win7 btw)
{
"version": "0.3.3",
"configurations": [
{
"name": "Debug GDB",
"type": "gdb",
"request": "attach",
"target": ":4444",
"remote": true,
"autorun": ["monitor interface=0"],
"executable": "../use/A_Myriad_A_5_6.elf",
"cwd": "${workspaceRoot}/Sw/A_XMC/out/obj"
}
]
}
from code-debug.
it will now assume all source code is in [...]/out/obj
I think its a bug with GDB because cannot execute this command while the target is running
can't possibly be caused by the extension. It happens with GDB in other places too: https://stackoverflow.com/questions/16900615/gdb-step-not-working-as-expected
Does it work if you debug it manually from the console?
from code-debug.
Yes, that was my intent. I have my .c/.h/.o in out/obj and my elf file in out/use.
I got it working now but I had to manually run target remote localhost:4444
which I didn't had to do before.
from code-debug.
hm, the extension actually calls the MI command of that. See mi2.ts:169
from code-debug.
Yes. But it works when my first autorun
command is target remote localhost:4444
from code-debug.
Any way to debug which messages are being sent?
from code-debug.
I can let it print all input to the console
from code-debug.
Yeah. Maybe a debug boolean that lets you "debug the debugger" :) 👍
from code-debug.
ok there is now an option to print GDB calls
from code-debug.
{
"version": "0.3.4",
"configurations": [
{
"name": "Debug GDB",
"type": "gdb",
"request": "attach",
"target": "localhost:4444",
"remote": true,
"cwd": "${workspaceRoot}/Sw/A_XMC/out/obj",
// "executable": "../use/A_Myriad_A_5_6.elf",
"printCalls": true,
"autorun": [
"target remote localhost:4444",
"monitor interface=0",
"monitor port=0",
"monitor speed=500000",
"monitor type=0",
"monitor protocol=0",
"monitor unit=2",
"monitor unlockcode=xxx",
"monitor connect"
// "symbol-file",
// "exec-file C:/dev/xxx/xxx_Myriad/Sw/A_XMC/out/use/A_Myriad_A_5_6.elf",
"add-symbol-file C:/dev/xxx/xxx_Myriad/Sw/A_XMC/out/use/A_Myriad_A_5_6.elf 0x8020000"
]
}
]
}
Note that most of the errors are due to the limited command support of my GDB bridge (failed stack-list-frames
, etc).
For some reason, it seems to send everything twice...
monitor port=0
monitor speed=500000
monitor type=0
monitor protocol=0
monitor unit=2
monitor unlockcode=xxx
monitor connect
add-symbol-file C:/dev/xxx/xxx_Myriad/Sw/A_XMC/out/use/A_Myriad_A_5_6.elf 0x8020000
Can't send signals to this remote system. SIGILL not sent.
target remote localhost:4444
A program is being debugged already. Kill it? (y or n) [answered Y; input not from terminal]
Cannot execute this command while the target is running.
5-stack-list-frames 0 20
Remote debugging using localhost:4444
0x0000a408 in ?? ()
Not implemented stop reason (assuming exception): undefined
monitor interface=0
monitor port=0
6-stack-list-frames 0 20
monitor speed=500000
monitor type=0
monitor protocol=0
monitor unit=2
monitor unlockcode=xxx
monitor connect
add-symbol-file C:/dev/xxx/xxx_Myriad/Sw/A_XMC/out/use/A_Myriad_A_5_6.elf 0x8020000
add symbol table from file "C:/dev/xxx/xxx_Myriad/Sw/A_XMC/out/use/A_Myriad_A_5_6.elf" at
.text_addr = 0x8020000
(y or n) [answered Y; input not from terminal]
Reading symbols from C:\dev\xxx\xxx_Myriad\Sw\A_XMC\out\use\A_Myriad_A_5_6.elf...
done.
Failed to run command `stack-list-frames 0 20`: Cannot access memory at address 0xa404
An error occured: Cannot access memory at address 0xa404
Failed to run command `stack-list-frames 0 20`: Cannot access memory at address 0xa404
An error occured: Cannot access memory at address 0xa404
from code-debug.
Im not sure how I can fix that without having such a GDB bridge myself as everything works with gdbserver. Considered forking this project and editing it? All you need to change would be in src/backend/mi2/mi2.ts in function connect: https://github.com/WebFreak001/code-debug/blob/master/src/backend/mi2/mi2.ts#L155-L177
from code-debug.
Perhaps this issue should be closed if I'm the only one experiencing this. I could fork and patch to suit my needs, but I wouldn't know if I broke normal debugging for everybody else.
Reopen if somebody else experiences this.
from code-debug.
Related Issues (20)
- Paths mismatch in clearBreakPoints HOT 8
- Load core file - how to disable `exec-run`? HOT 6
- [Feature Request] Is it possible to use this in vim/neovim with nvim-dap HOT 1
- Launch the program as root (with sudo) HOT 3
- Possibility to add a KexAlgorithms option or let user enter wanted custom options in an "args" field HOT 3
- creation of debug configuration does not work HOT 4
- support input variables `gdbpath` setting HOT 3
- Debug this plugin HOT 3
- [enhancement] Support source file browsing HOT 5
- bad error message if `cwd` points to non-existing directory HOT 2
- UI out of sync with gdb status HOT 11
- Dynamically choose PID to attach HOT 2
- not finding the source files despite setting the sourceFileMap correctly HOT 5
- missing checks for debug attributes lead to TypeErrors on Execution
- how to do mix debug with python and c++ HOT 19
- F10(step over) end of main function, 'crtexe.c' The editor could not be opened because the file was not found. HOT 1
- Variables Evaluate is NOT Working for Struct Pointer of Function Variable HOT 1
- How pass multiple args to debug_args?
- My breakpoints are completely ignored
- Ignore unfetchable registers HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from code-debug.