gdb - 如何使用 macports 在 Mac Mountain Lion 上配置我的 GDB 版本

标签 gdb macports configure

我刚刚使用 macports 通过 sudo port install gdb 在我的 Mac 上安装了最新的 gdb。问题是当我在命令行中输入 gdb 时,它仍然显示旧版本。如何切换到刚刚安装的新版本? 谢谢。

最佳答案

类型:

port contents gdb

它告诉您端口所在的位置

 /opt/local/bin/ggdb
  /opt/local/include/ansidecl.h
  /opt/local/include/bfd.h
  /opt/local/include/bfdlink.h
  /opt/local/include/dis-asm.h
  /opt/local/include/gdb/jit-reader.h
  /opt/local/include/symcat.h
  /opt/local/lib/libbfd.a
  /opt/local/lib/libbfd.la
  /opt/local/lib/libopcodes.a
  /opt/local/lib/libopcodes.la
  ...

正如您在下面看到的,当您使用 MacPorts 安装它时,它被命名为 ggdb,而不是 gdb

ggdb
GNU gdb (GDB) 7.6
Copyright (C) 2013 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 redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin11.4.2".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) 

关于gdb - 如何使用 macports 在 Mac Mountain Lion 上配置我的 GDB 版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19167279/

相关文章:

python - os x python 2.6 总线错误

makefile - 你如何 "echo"源目录中的最后一个 configure/make build --options?

php - 在 Mac 上安装 ImageMagick for XAMPP

c++ - 在 GDB 中,在非调试二进制文件中的 namespace 或类中调用 C++ 函数的正确方法是什么?

gdb - 在 eclipse CDT 中使用步骤过滤器进行调试

C++ 应用程序崩溃

haskell - Haskell 中的负 double 或 float (macports)

c++ - 将源文件列表放入 Makefile 的最佳方法

haskell - 如何在 ./configure 中检查 haskell 包版本?

linux - 如何获取gdb调用堆栈跟踪?