我想在vscode中使用gdb。我想在vscode中使用gdb调试我的c代码,但是我得到了以下错误:
无法从命令环境cd开始调试意外的gdb输出,我已经在wsl上安装了我的gdb。
这是我的lauch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
我已经安装了WSL( Windows上的Ubuntu)和gcc/gdb,在Visual Studio Code中打开一个目录,然后点击Debug Menu | add configuration,选择C/C++:(gdb) Bash on Windows launch,按F5,得到消息:
无法开始调试,无法建立到GDB的连接,...
调试控制台中的输出:
启动:"C:\Windows\sysnative\bash.exe“"/usr/bin/gdb --解释器=mi”
"C:\Windows\sysnative\bash.exe“已退出,代码为-1 (0xFFFFFFF
我的应用程序运行良好,但gdb无法对其进行调试,出现以下错误
(gdb) run
Starting program: /path/to/app
Unable to find Mach task port for process-id 83767: (os/kern) failure (0x5).
我使用的是OS X Lion。GDB版本为
$ gdb --version
GNU gdb 6.3.50-20050815 (Apple version gdb-1752) (Sat Jan 28 03:02:46 UTC 2012)
Copyright 2004 Free Software Fou
我遇到了一个核心,无法从它得到回溯。我有两个问题。
我可以从list命令输出中找出导致崩溃的行或崩溃发生的位置吗?
否则该如何处理。为了获得一些有意义的数据,我应该设置什么启发栅栏柱。我试着把它设置为0,但没有运气。
(gdb) bt
0x00e67a24 in?()
警告: GDB无法在0xe67a24找到函数的启动。
GDB is unable to find the start of the function at 0xe67a24
因此无法确定该函数的堆栈帧的大小。这意味着GDB可能无法访问该堆栈帧或其下面的框架。此问题很可能是由无效的程序计数器或堆栈指针引起的。但是,
我在Mac系统上编译了GDB7。在单步执行C程序时,GDB无法单步执行'printf()‘语句,这些语句可能没有相关的调试信息,并开始打印“无法找到当前函数的界限”。
下面是一些输出:
$ /usr/local/bin/gdb try1
GNU gdb (GDB) 7.1
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: yo
我的gdb版本是与我的系统python链接的,但是我目前正在使用python的一个特殊的调试版本。因此,gdb无法正确启动,出现如下错误:
$ gdb
gdb: Symbol `_Py_ZeroStruct' has different size in shared object, consider re-linking
gdb: Symbol `PyBool_Type' has different size in shared object, consider re-linking
gdb: Symbol `_Py_NotImplementedStruct' has
我有一个用MinGW32 (Gcc)编译的Ada应用程序(GHDL)。我想在gdb中调试它,但是gdb报告Ada运行时没有调试信息,所以我无法捕获异常:
(gdb) catch exception
Your Ada runtime appears to be missing some debugging information.
Cannot insert Ada exception catchpoint in this configuration.
(gdb)
有没有办法用调试信息扩展Ada运行时?
我在将共享库文件加载到gdb时遇到了一些问题。我已经尝试了我能想到的每种排列。我也尝试了在线建议的文件命令,但我仍然无法加载库...
(gdb) file app/src/main/obj/local/armeabi/libUseTBT.so
Reading symbols from app/src/main/obj/local/armeabi/libUseTBT.so...done.
(gdb) info sharedlibrary
No shared libraries loaded at this time.
(gdb) file ~/system_lib/
/home/sansari
我正在调试一个编译好的(c++) python模块,它在端口容器中的导入时神秘地崩溃。当我在python3内部运行gdb时,然后导入,然后尝试打印回跟踪,我只得到
# gdb /usr/bin/pyton3
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.
...
(gdb) run -c 'import myModule'
warning: Error disabling address space randomization: Operation not permitted
During startup program termina
在尝试调试一些简单的代码时,我无法让GDB用info symbol从内存地址中识别局部变量。
代码是使用g++ -g3 -Wall -Wextra编译的。
int main()
{
int foo = 1234;
return foo;
}
(gdb) p foo
$1 = 1234
(gdb) p &foo
$2 = (int *) 0x7fffffffd7c4
(gdb) info symbol 0x7fffffffd7c4
No symbol matches 0x7fffffffd7c4.
(gdb) info address foo
Symbol "fo
我已经为ARM平台交叉编译了/bin/ls NetBSD实用程序。在执行相同的命令时,我发现应用程序崩溃了。尝试使用gdb解码相同的代码。我看到以下错误。
GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.2)版权所有(C) 2009 Free Software Foundation,Inc. License GPLv3+:GNU GPL version 3或更高版本这是自由软件:您可以自由更改和重新分发它。在法律允许的范围内,没有任何担保。键入"show Type“和"show warranty”查看详细信息。这个G
帮帮忙,我该怎么解决这个问题?我无法将命令从stdin重定向到gdb。
我得到了这个错误:
charmae@charmae-pc:~/workspace/AVT$ echo "list" | gdb a.out
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
Thi
我制作了一个别名ff,并从~/.zsh/aliases.zsh获得了它。
别名本身运行良好:
alias ff
ff='firefox --safe-mode'
而且按预期运行。
但是,当我尝试在gdb下运行它时,我得到:
> gdb ff
GNU gdb (Debian 7.12-6+b1) 7.12.0.20161007-git
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/
I want to use gdb to see my GDTR/LDTR/TTR and segment register
不可见部分(X86)所以在gdb中我输入"p/x $gdtr"....etc,但结果是"$6 =值无法转换为整数“,而在gdb中我输入"p/x $cs”,唯一的结果是CS,只是可见部分。
can anyone tell me how to view these value??
谢谢你的回答
我正在尝试让漂亮的打印在Qt5下工作,但是在RHEL6.6上使用它的gdb版本:
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-75.el6)
我找到了链接到的,它似乎提供了在Qt5上进行漂亮打印的代码。但当我在RHEL6.6上我的gdb版本上尝试它时,我得到了这样的结果:
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/home/myusername/gdb/printers/qt5pr