Berikut ini tahapan install gdb di macos high sierra :
brew install gdb
brew link gdb
Kalau terdapat error ditengah jalan, silakan amati perintah dibawah ini :
Triawans-MacBook-Pro:~ triawan$ brew install gdb ==> Downloading https://homebrew.bintray.com/bottles/gdb-8.1.high_sierra.bottle. ######################################################################## 100.0% ==> Pouring gdb-8.1.high_sierra.bottle.tar.gz Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink share/man/man5/gdbinit.5 /usr/local/share/man/man5 is not writable. You can try again using: brew link gdb ==> Caveats gdb requires special privileges to access Mach ports. You will need to codesign the binary. For instructions, see: https://sourceware.org/gdb/wiki/BuildingOnDarwin On 10.12 (Sierra) or later with SIP, you need to run this: echo "set startup-with-shell off" >> ~/.gdbinit ==> Summary /usr/local/Cellar/gdb/8.1: 53 files, 9.9MB Triawans-MacBook-Pro:~ triawan$ brew link gdb Linking /usr/local/Cellar/gdb/8.1... Error: Could not symlink share/man/man5/gdbinit.5 /usr/local/share/man/man5 is not writable. Triawans-MacBook-Pro:~ triawan$ sudo chown -R "$USER":admin /usr/local chown: /usr/local: Operation not permitted Triawans-MacBook-Pro:~ triawan$ brew link gdb Linking /usr/local/Cellar/gdb/8.1... 11 symlinks created Triawans-MacBook-Pro:~ triawan$ gdb GNU gdb (GDB) 8.1 Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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-darwin17.3.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". (gdb) help List of classes of commands: aliases -- Aliases of other commands breakpoints -- Making program stop at certain points data -- Examining data files -- Specifying and examining files internals -- Maintenance commands obscure -- Obscure features running -- Running the program stack -- Examining the stack status -- Status inquiries support -- Support facilities tracepoints -- Tracing of program execution without stopping the program user-defined -- User-defined commands Type "help" followed by a class name for a list of commands in that class. Type "help all" for the list of all commands. Type "help" followed by command name for full documentation. Type "apropos word" to search for commands related to "word". Command name abbreviations are allowed if unambiguous. Triawans-MacBook-Pro:~ triawan$