2

When I try to scroll the source window with the arrow keys, the previously outputted lines are not properly overwritten, resulting in a weird looking:

enter image description here

My ~/.gdbinit only contains set startup-with-shell off.

I installed gdb by brew install gdb. Here is the version info:

[sunqingyao@192.168.0.111 ~/Projects/play_ground]$ gdb --version
GNU gdb (GDB) 8.0
Copyright (C) 2017 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-darwin16.6.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

I'm using iTerm2 under Sierra 10.12.6 (16G29), if it's relevant.

  • Can you please explain what the actual issue is (what is wrong)? – nohillside Aug 29 '17 at 13:07
  • @patrix Question edited, please take a look. (sorry, I thought the problem is obvious to tell from the screenshot...) – nalzok Aug 29 '17 at 13:41
3

Yes, I came with the same problem. TUI is useless when debugging with gdb and src layout. It's a bug of iterm2 which can't fully support complicate output. Sometimes, TUI crashes too when using vim and multi-windows setting. Apple likely has left gcc and gdb behind. So my suggestion is switching to clang and lldb. Both work fine so far on Mac command line and they are advanced tools. At the mean time, switching wouldn't cost you much time if you could use gdb well. Good luck. And by the way, Xcode is a gread tool for your peace of mind.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .