我想用 vscode 做远程 C/C++ gdb 调试。我在进行配置时使用“本机调试”扩展。这是我的launch.json配置
{
"type": "gdb",
"request": "launch",
"name": "Launch Program (SSH)",
"target": "./hello",
"cwd": "/home/root/test1/",
"ssh": {
"host": "192.168.15.130",
"cwd": "/home/root/test1/",
"password": "",
"user": "root"
}
Run Code Online (Sandbox Code Playgroud)
在目标我跑
gdbserver localhost:2000 ./hello
Run Code Online (Sandbox Code Playgroud)
不幸的是,在我无法连接远程设备进行调试之后。有没有人有这方面的配置经验?
我正在尝试调试helloworld项目
#include <stdio.h>
int
main (void)
{
printf ("Hello, world!\n");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
它是使用clang构建的。我使用 vs-code 来执行这些操作。这是我的task.json
文件:
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: clang.exe build active file",
"command": "C:\\msys64\\mingw64\\bin\\clang.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": "build"
}
]
}
Run Code Online (Sandbox Code Playgroud)
作为构建任务,它可以工作,但随后使用 launch.json 进行调试似乎没有任何进展。这是我的
launch.json 文件:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing …
Run Code Online (Sandbox Code Playgroud) 通过使用VSCode(Visual Studio代码),我在本地Python(Anaconda)解释器上执行了Python代码。现在,我想对其进行设置,以便能够在远程Python解释器上执行该代码。我有一个具有自己的Python且可以通过ssh访问的Linux设备。
可以配置吗?如果可以,怎么办?谢谢。
我尝试远程使用 gdbserver 进行调试,如下所示
在目标机器上启动 gdbserver
$ gdbserver localhost:2000 hello -l 20 -b 10 --enable-targets=all
Run Code Online (Sandbox Code Playgroud)
主机具有启用调试的程序二进制文件
"copied binary from ARM target to host"
Run Code Online (Sandbox Code Playgroud)
在主机上运行 gdb
$ gdb -q --args hello --enable-target=all
Run Code Online (Sandbox Code Playgroud)
连接到目标
(gdb) target remote 192.168.15.132
192.168.15.132: No such file or directory.
(gdb) target remote 192.168.15.132:2000
Remote debugging using 192.168.15.132:2000
warning: while parsing target description (at line 11): Target description specified unknown architecture "aarch64"
warning: Could not load XML target description; ignoring
Remote register badly formatted: T051d:0000000000000000;1f:80fcffffffff0000;20:403cfdb7ffff0000;thread:pd60.d60;core:1;
here: 00000000;1f:80fcffffffff0000;20:403cfdb7ffff0000;thread:pd60.d60;core:1;
(gdb) q …
Run Code Online (Sandbox Code Playgroud) 亲爱的,
我使用可视化代码编辑器进行 opencv 应用程序开发,我想知道是否有一些类似于OpenCV 的 Image Watch 的扩展可用。它可以方便开发。
通过构建 Yocto 映像,我在填充 Yocto SDK 期间遇到了这个问题。有人知道在哪里以及如何修复它吗?
ERROR: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:extend_recipe_sysroot(d)
0003:
File: '/yocto/warrior/sources/poky/meta/classes/staging.bbclass', lineno: 557, function: extend_recipe_sysroot
0553: dest = newmanifest[l]
0554: if l.endswith("/"):
0555: staging_copydir(l, targetdir, dest, seendirs)
0556: continue
*** 0557: staging_copyfile(l, targetdir, dest, postinsts, seendirs)
0558:
0559: bb.note("Installed into sysroot: %s" % str(msg_adding))
0560: bb.note("Skipping as already exists in sysroot: …
Run Code Online (Sandbox Code Playgroud) 我在Windows下使用此命令时遇到问题
dd if=*file* of=/dev/sdx bs=512 seek=2 conv=fsync
Run Code Online (Sandbox Code Playgroud)
使用cygwin shell:
$ dd if = 文件的= / cygdrive / f bs = 512 seek = 2 conv = fsync
dd:无法打开“ / cygdrive / f”:是目录
F:是我的SD卡映射的字母。用什么方式访问它?