0

所以我有这个来源gdb-1515。我在 Snow Leopard 上使用 Xcode 3.2.6 命令行工具(这个 gdb 源是其中包含的 gdb 的源)。

尝试运行(内部/private/var/root/Downloads/gdb-1515/src/gdb/gdbserver):

gcc -I. -I. -I./../regformats -I./../macosx -I./../../include -I../../bfd -I./../../bfd -I/private/var/root/Downloads/gdb-1515/src/bfd ./../macosx/macosx-nat.c

失败:

./../macosx/macosx-nat.c:34:17: error: bfd.h: No such file or directory
./../macosx/macosx-nat.c:35:18: error: defs.h: No such file or directory
./../macosx/macosx-nat.c:36:21: error: gdbcore.h: No such file or directory
./../macosx/macosx-nat.c:37:20: error: serial.h: No such file or directory
./../macosx/macosx-nat.c:38:22: error: ser-base.h: No such file or directory
./../macosx/macosx-nat.c:39:22: error: ser-unix.h: No such file or directory
./../macosx/macosx-nat.c:40:22: error: inferior.h: No such file or directory
./../macosx/macosx-nat.c:41:23: error: objc-lang.h: No such file or directory
./../macosx/macosx-nat.c:42:21: error: infcall.h: No such file or directory
In file included from ./../macosx/macosx-nat-dyld.h:5,

等等。

事情是文件夹内没有bfd.h任何地方。gdb-1515

find /private/var/root/Downloads/gdb-1515 -name bfd.h

不返回任何输出。

我想从而不是 ptrace 调用attach_to_classic_process(在内部定义macosx/macosx-nat.cgdbserver/macosx_low.c:476- 这就是我尝试macosx/macosx-nat.cgdbserver目录构建的原因。

目前在它的位置,它使用了 ptrace,但它对于 Rosetta 进程失败了。

好的,所以我想通过使用远程 gdb 连接来调试在 Snow Leopard 上运行的经典(Rosetta)进程。在所有 Rosetta 应用程序都使用远程连接进行调试之后,这应该是显而易见的原因。此外,gdb 应用程序可以成功连接到提到的 PowerPC 应用程序。我正在尝试从这个苹果源编译 gdbserver但是这是辅助工具-似乎此软件包中包含的 gdbserver 的方式从根本上是错误的,因为原始 gdb 正在使用特殊功能来建立与经典进程的连接,而 gdbserver 正在尝试使用 ptrace 显然失败了。我想到的另一件事是为什么 gdbserver 必须如此复杂 - 为什么不直接与功能性 gdb 命令行应用程序(可能是某种包装器)合作?

4

0 回答 0