bugs happen when building in darwin

Li Hua boredcola@outlook.com
Sat Feb 1 00:29:50 GMT 2025


1:GDB VERSION: GNU gdb (GDB) 16.1 (the latest release downloaded from https://ftp.gnu.org/gnu/gdb/)
2:Configure SETTING:
   configure --host=x86_64-apple-darwin19.6.0 --target=x86_64-apple-darwin19.6.0
    --with-auto-load-dir=:${prefix}/share/auto-load
    --with-auto-load-safe-path=:${prefix}/share/auto-load
    --with-expat
    --with-gdb-datadir=/usr/local/Cellar/gdb/share/gdb (relocatable)
    --with-jit-reader-dir=/usr/local/Cellar/gdb/lib/gdb (relocatable)
    --without-libunwind-ia64
    --without-lzma
    --without-babeltrace
    --without-intel-pt
    --without-xxhash
    --without-python
    --without-python-libdir
    --without-debuginfod
    --with-curses
    --with-guile
    --without-amd-dbgapi
    --enable-source-highlight
    --enable-threading
    --enable-tui
    --without-system-readline
    --with-separate-debug-dir=/usr/local/Cellar/gdb/lib/debug (relocatable)

("Relocatable" means the directory can be moved with the GDB installation
tree, and GDB will still find it.)

GNU Readline library version: 8.2 (internal)

3:Error(happen when do the 'make' processs):
darwin-nat.c:1949:21: error: use of undeclared identifier 'command_style'
                   styled_string (command_style.style (), "run"),
                                  ^
darwin-nat.c:1950:21: error: use of undeclared identifier 'command_style'
                   styled_string (command_style.style (),
                                  ^
darwin-nat.c:1959:20: error: use of undeclared identifier 'command_style'
                  styled_string (command_style.style (), "run"),


To this problem, I have personally tried to fix it. And I found the reason causing this error is that the header file "cli/cli-style.h" doesn't been included in "darwin-nat.c". When I add the line '#include "cli/cli-style.h"'
, the error disappears.

Thank you for reading this. Looking forward your reply.



More information about the Gdb mailing list