gdb声称它不知道如何运行 [英] gdb claims it doesn't know how to run

查看:1383
本文介绍了gdb声称它不知道如何运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac Pro上使用Mac OS X 10.6.6上的Xcode 3.2.3,从 the growl-development repository

I'm using Xcode 3.2.3 on Mac OS X 10.6.6 on a Mac Pro to build revision 5fd480ef577f of GrowlTunes from the growl-development repository.

从处女结帐中清理构建,这是我得到的:

With a clean build from a virgin checkout, this is what I get:

% gdb build/Debug/GrowlTunes.app/Contents/MacOS/GrowlTunes 
GNU gdb 6.3.50-20050815 (Apple version gdb-1469) (Wed May  5 04:41:34 UTC 2010)
[blah blah blah]
This GDB was configured as "--host=x86_64-apple-darwin --target=powerpc-apple-darwin"...Reading symbols for shared libraries ......... done

(gdb) run
Starting program: /Volumes/RAM Disk/growl-development/Extras/GrowlTunes/build/Debug/GrowlTunes.app/Contents/MacOS/GrowlTunes 
Don't know how to run.  Try "help target".

当我在Xcode中尝试它时,它显然做了一些内部测试失败,因为它不甚至列出GDB作为选项。由于对于Cocoa应用程序没有其他调试器(在这个版本的Xcode中),与目标Info窗口中的调试相关的弹出菜单为空,并且尝试运行应用程序什么也不做,运行按钮切换回立即运行按钮。

When I try it in Xcode, it apparently does some internal test that fails, because it doesn't even list GDB as an option. Since there are no other debuggers (in this version of Xcode) for Cocoa applications, the pop-up menus related to debugging in the target Info window are empty, and attempting to run the app does nothing—the Run button switches back to being the Run button immediately.

目标是为32位PowerPC和64位Intel构建的:

The target is built for 32-bit PowerPC and 64-bit Intel:

% file build/Debug/GrowlTunes.app/Contents/MacOS/GrowlTunes 
build/Debug/GrowlTunes.app/Contents/MacOS/GrowlTunes: Mach-O universal binary with 2 architectures
build/Debug/GrowlTunes.app/Contents/MacOS/GrowlTunes (for architecture ppc7400):        Mach-O executable ppc
build/Debug/GrowlTunes.app/Contents/MacOS/GrowlTunes (for architecture x86_64): Mach-O 64-bit executable x86_64

我可以直接从终端或从Finder ,但这不会帮助我一步一步调试。

I can run it directly, either from the terminal or from Finder, but that doesn't help me step-by-step debug.

这不是一个交叉编译场景;我的意思是运行64位的英特尔架构,这是我的机器的本机架构,而不是PowerPC架构。

This isn't a cross compilation scenario; I mean to run the 64-bit Intel architecture, which is my machine's native architecture, not the PowerPC architecture.

我猜这是一些建立错误配置在某处项目,但我没有线索什么或在哪里。任何建议?

I'm guessing this is some build misconfiguration somewhere in the project, but I've no clue what or where. Any suggestions?

推荐答案

在相关的构建设置中切换架构的顺序解决了gdb和Xcode中的问题。这是一个跛脚的解决方案,我仍然欢迎一个更好的,但至少它的工作原理。

Switching the order of the architectures in the relevant build setting fixed the problem both in gdb and in Xcode. This is a lame solution, and I'd still welcome a better one, but at least it works.

这篇关于gdb声称它不知道如何运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆