【问题标题】:Why am I getting this error when trying to open a file with DDD?为什么在尝试使用 DDD 打开文件时出现此错误?
【发布时间】:2013-02-02 17:41:49
【问题描述】:

调试器:DDD。

64 位 Ubuntu Precise Pangolin 系统。

每当我尝试在 ddd 中打开一个非常简单的 C 程序时,我都会收到以下错误:

Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
Warning: Cannot convert string "%s" to type %s
Warning: Could not load font "-*-lucidatypewriter-medium-*-*-*-*-120-*-*-*-*-iso8859-*", using font "fixed" instead
Warning: Could not load font "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-iso8859-*", using font "fixed" instead
Warning: Could not load font "-*-lucidatypewriter-bold-*-*-*-*-120-*-*-*-*-iso8859-*", using font "fixed" instead
Warning: XmStringGetNextComponent: unknown type 26933216

Warning: XmStringGetNextComponent: unknown type 26664160

Warning: XmStringGetNextComponent: unknown type 26721536

Warning: XmStringGetNextComponent: unknown type 27713552

Warning: XmStringGetNextComponent: unknown type 26719456

Warning: XmStringGetNextComponent: unknown type 26994752

Warning: XmStringGetNextComponent: unknown type 27761616

此外,所有这些错误都显示在终端上后,ddd 可以正常打开,但没有我要调试的源文件。我在网上找不到解决方案!谢谢。

编辑:

以 root 身份运行时出现上述错误。以普通用户身份运行时,我得到以下信息:

Warning: Cannot convert string "-*-helvetica-medium-r-*-*-*-100-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-lucidatypewriter-bold-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-medium-*-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-bold-*-*-*-*-120-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-*-180-*-*-*-*-iso8859-*" to type FontStruct
Warning: Cannot convert string "-*-symbol-*-*-*-*-*-120-*-*-*-*-adobe-*" to type FontStruct
Warning: Could not load font "-*-lucidatypewriter-medium-*-*-*-*-120-*-*-*-*-iso8859-*", using font "fixed" instead
Warning: Could not load font "-*-lucidatypewriter-medium-r-*-*-*-120-*-*-*-*-iso8859-*", using font "fixed" instead
Warning: Could not load font "-*-lucidatypewriter-bold-*-*-*-*-120-*-*-*-*-iso8859-*", using font "fixed" instead
Warning: XmStringGetNextComponent: unknown type 27122480

Warning: XmStringGetNextComponent: unknown type 27125120

Warning: XmStringGetNextComponent: unknown type 27119296

Warning: XmStringGetNextComponent: unknown type 27109856

Warning: XmStringGetNextComponent: unknown type 27150160

Warning: XmStringGetNextComponent: unknown type 27132208

【问题讨论】:

  • 你用什么命令来启动 DDD?
  • 我正在使用以下内容:ddd prac1.c &.
  • ...和whoami的输出? (因为看起来您尝试以 root 身份运行 ddd,这可能不是您想要的)
  • 我以 root 身份运行。我尝试以普通用户身份运行,但我遇到了同样的问题,虽然不是 suid-bit 部分。
  • 你不要在源代码上运行ddd,试试ddd a.out(或任何你称之为可执行文件的东西)。

标签: c debugging ddd-debugger


【解决方案1】:

我想我是在 @Fredrik 的帮助下弄明白的。

UTF-8 不兼容似乎是 ddd 中长期存在的错误。许多人报告了它,但似乎没有人修复它。

我的代码没有显示在 ddd 中的原因是因为我在编译时没有使用-g 选项。

【讨论】:

    猜你喜欢
    • 2013-03-07
    • 1970-01-01
    • 1970-01-01
    • 2021-09-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-17
    • 1970-01-01
    相关资源
    最近更新 更多