GDB错误:所选架构i386与报告的目标架构i386:x86-64不兼容

时间:2022-06-14 16:38:26

Does anyone know what this error means?

有谁知道这个错误意味着什么?

GDB错误:所选架构i386与报告的目标架构i386:x86-64不兼容

I'm working with Netbeans 8.0, gdb 7.8.1 on Linux Machine. Everything was good until two days ago, then I suddenly started to get this error when i'm starting t debug and I have no clue what it means.
So far, I'm trying to clean and reset everything I could think about: reinstall netbeans, clean all local files, rebase my code again, unset all breakpoints and so on and so on.
Could anyone please help me to understand what this error means? I've never set those breakpoints, where does Netbeans take themfrom?

我在Linux机器上使用Netbeans 8.0,gdb 7.8.1。两天前一切都很好,然后当我开始调试时我突然开始出现这个错误,我不知道这意味着什么。到目前为止,我正在尝试清理和重置我能想到的所有内容:重新安装netbeans,清理所有本地文件,重新设置我的代码,取消设置所有断点等等。谁能帮助我理解这个错误意味着什么?我从来没有设置过那些断点,Netbeans从哪里拿走它们?

Thanks in advance,
Rachel

谢谢,雷切尔

EDIT

编辑

So now I have a bit more details: When I'm trying to debug my app directly with GDB, without netbeans I'm getting the following error:

所以现在我有更多细节:当我尝试使用GDB直接调试我的应用程序时,没有netbeans我收到以下错误:

Starting program: ....
warning: Selected architecture i386 is not compatible with reported target architecture i386:x86-64
warning: Architecture rejected target-supplied description
Warning:
Cannot insert breakpoint -1. Temporarily disabling shared library breakpoints: breakpoint #-1 Cannot insert breakpoint 1. Cannot access memory at address 0x8081527

启动程序:....警告:所选体系结构i386与报告的目标体系结构i386不兼容:x86-64警告:体系结构拒绝目标提供的描述警告:无法插入断点-1。暂时禁用共享库断点:断点#-1无法插入断点1.无法访问地址0x8081527处的内存

how can I figure out what code\flag in compilation makes my app to be i386? how can I force it to be x86_64?

我如何弄清楚编译中的代码\标志使我的应用程序成为i386?我怎么能强迫它成为x86_64?

Thanks again.

再次感谢。

2 个解决方案

#1


6  

OK, the gdb installation on my machine was screwed. There's no chance anyone could imagine it. I moved to another machine and everything is good now.

好的,我的机器上的gdb安装被搞砸了。任何人都无法想象它。我搬到另一台机器,一切都很好。

#2


0  

I think you updated the system and the latest version of the glib is not supporting 32bit applications.

我认为您更新了系统,并且最新版本的glib不支持32位应用程序。

Can you do a find to find out which files in all the bin and lib directories on your system were changed within the last 2 days? If it used to support it, but the upgraded version doesn't, then the application which was (probably without your knowledge) compiled to be 32-bit will not be a valid target for all the standard tools on the box.

你能找到一个发现,找出你系统中所有bin和lib目录中的哪些文件在过去2天内发生了变化?如果它曾经支持它,但升级版本没有,那么编译为32位的应用程序(可能在您不知情的情况下)将不是该框上所有标准工具的有效目标。

You specify the target architecture with -m32 or -m64. See if you can specify it explicitly if you are compiling and debugging on different machines.

使用-m32或-m64指定目标体系结构。如果要在不同的计算机上进行编译和调试,请查看是否可以显式指定它。

#1


6  

OK, the gdb installation on my machine was screwed. There's no chance anyone could imagine it. I moved to another machine and everything is good now.

好的,我的机器上的gdb安装被搞砸了。任何人都无法想象它。我搬到另一台机器,一切都很好。

#2


0  

I think you updated the system and the latest version of the glib is not supporting 32bit applications.

我认为您更新了系统,并且最新版本的glib不支持32位应用程序。

Can you do a find to find out which files in all the bin and lib directories on your system were changed within the last 2 days? If it used to support it, but the upgraded version doesn't, then the application which was (probably without your knowledge) compiled to be 32-bit will not be a valid target for all the standard tools on the box.

你能找到一个发现,找出你系统中所有bin和lib目录中的哪些文件在过去2天内发生了变化?如果它曾经支持它,但升级版本没有,那么编译为32位的应用程序(可能在您不知情的情况下)将不是该框上所有标准工具的有效目标。

You specify the target architecture with -m32 or -m64. See if you can specify it explicitly if you are compiling and debugging on different machines.

使用-m32或-m64指定目标体系结构。如果要在不同的计算机上进行编译和调试,请查看是否可以显式指定它。