我的意图如下。我正在调试一个用gcc从.c脚本编译的对象文件。让我们把这个编译好的脚本称为"foo“。当我在mac上的终端上运行命令时:
gdb -q ./foo
我得到的输出是:
Reading symbols from ./foo...Reading symbols from /Users/john/Documents....done.
done.
我立刻从shell中得到一个提示符如下所示:
(gdb) "Shell waiting for my input command here from keyboard"
在这一点上,我想自动化某些命令的输入,例如: br
它应该被称为.gdbinit或者gdb.ini 我想我会试着这个文件。 我正在使用Vectorcast进行测试,它使用MinGw。我复制了具有这两个名称的文件(.gdbinit和gdb.ini)添加到Vectorcast目录和它的MinGW中bin目录,其中gdb.exe是,因为我不确定哪一个是the current working directory,但是我没有从该文件中看到任何我所期望的东西。那么,我应该把它放在哪里,我应该叫它什么呢?
我在装有Nsight Eclipse的Ubuntu 11.10上使用带有两块GPU卡的Cuda 5.0。
当我尝试在Eclipse中调试一个程序时,我得到
Error in final launch sequence
Failed to execute MI command:
source .cuda-gdbinit
Error message from debugger back end:
.cuda-gdbinit: No such file or directory.
.cuda-gdbinit: No such file or directory.
我研究了Eclipse调试配置,我已
这是一个看似微不足道的问题,但我找不到一种简单的方法来实现这一点。
我在gdb.exe所在的目录中定义了我的bin文件--也就是我的编译器的.gdbinit目录。然而,当我运行gdb时,我得到了这样的结果:
GNU gdb (GDB) 7.5.50.20120804-cvs
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you a
系统: mac osx catalina (10.15.5)
gfortran 9.3.0 (from homebrew)
gdb 9.2 (from homebrew) 查看并遵循以下说明:https://sourceware.org/gdb/wiki/PermissionsDarwin 试着在这个程序上调试只是为了学习: ! test.f90
program main
integer :: val
val = 1
print *, val
val = 2
print *, val
end program main 使用以下命令编译: gfortran test.f90
我想知道linux gdb调试。
我有一个执行文件,一个核心转储文件。所以,我在linux中像这样打开了它,
gdb exefilename -c exefuilename.core
但是,我只显示错误消息。
warning: Could not load shared library symbols for 44 libraries, e.g. /usr/local/lib/libboost_system.so.1.55.0.
Use the "info sharedlibrary" command to see the complete listing.
Do you ne
我在Windows7下安装了MSYS2和MinGW64。
gdb报告"ImportError:没有名为libstdcxx.v6打印机的模块“:
$ gdb
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 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 redis
下面是要放在~/.gdbinit中的断点列表,这些断点对调试内存问题非常有帮助:
fb -[NSException raise]
fb -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
fb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
#define NSZombies
# this will give you help messages. Set to NO to turn
这些说明很好,但是我应该把下面的代码放在哪里(从上面的文章中抓取)?在我的default.js文件中,在app.addEventListener("activated", function (args) {代码行上面?低于那条线?其他地方?谢谢微软,但是告诉我把代码放在哪里!
var notifications = Windows.UI.Notifications;
var recurrence = notifications.PeriodicUpdateRecurrence.hour;
var url = new Windows.Foundation.Uri("ht
我在mac和linux上进行开发,并且有一个在它们之间共享的网络挂载的主目录。在linux上,在我的.gdbinit中包含以下内容是很有用的:
set print thread-events off
不幸的是,这是mac上的错误:
(gdb) set print thread-events off
Undefined set print command: "thread-events off". Try "help set print".
在.gdbinit中有没有办法让这个命令只在linux上执行?
与Linux相比,如果在Windows上构建程序,我可以获得更多的调试信息。这是我的代码:
#include <iostream>
#include <vector>
using namespace std;
class Base
{
public:
Base() = default;
virtual ~Base() = default;
};
class Derived : public Base
{
public:
Derived() = default;
~Derived() = default;
private:
i