I am using mac Mojave 10.14.5.
Previously I had codesign issue, and resolved from link.
After resolving codesign issue, when I run gdb, the program just stops like below.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from CIRMERGE...
Reading symbols from /Users/___/Project/CIRMERGE.dSYM/Contents/Resources/DWARF/CIRMERGE...
(gdb) run
Starting program: /Users/___/Project/CIRMERGE
[New Thread 0x1703 of process 601]
[New Thread 0x1903 of process 601]
First, I followed the same instruction given in the above link, removing
set startup-with-shell enable from
~/.gdbinit. (It was empty and I tried disable option too)
Secondly, I found someone having similar problem with me, so tried to reinstall gdb head, but installing gdb with --HEAD fails like below
==> make
Last 15 lines from /Users/sean/Library/Logs/Homebrew/gdb/02.make:
darwin-nat-info.c:620:25: error: use of undeclared identifier 'target_gdbarch'
if (gdbarch_addr_bit (target_gdbarch ()) <= 32)
^
darwin-nat-info.c:657:35: error: use of undeclared identifier 'target_gdbarch'
uiout->field_core_addr ("start", target_gdbarch (), r_start);
^
CXX disasm.o
darwin-nat-info.c:658:33: error: use of undeclared identifier 'target_gdbarch'
uiout->field_core_addr ("end", target_gdbarch (), r_start + r_size);
Here is my gdb configuration.
This GDB was configured as follows:
configure --host=x86_64-apple-darwin18.5.0 --target=x86_64-apple-darwin18.5.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/8.3/share/gdb (relocatable)
--with-jit-reader-dir=/usr/local/Cellar/gdb/8.3/lib/gdb (relocatable)
--without-libunwind-ia64
--without-lzma
--without-babeltrace
--without-intel-pt
--disable-libmcheck
--without-mpfr
--with-python=/System/Library/Frameworks/Python.framework/Versions/2.7
--without-guile
--disable-source-highlight
--with-separate-debug-dir=/usr/local/Cellar/gdb/8.3/lib/debug (relocatable)
I am trying to debug my cpp code for hours, so any help would be appreciated.