Even on a PC I tend to use cgdb…an ncurses based front end to gdb. I also use vi a lot, so this may not be to your taste…but it works in plain text terminals and the highlighting I believe is superior to most GUI editors (and uses far less disk space and memory):
Note that what this does is give a separate source code window and gdb window instead of intermixing gdb commands and source code. cgdb can be installed directly via apt-get, but I use the version 0.7 because it allows me to split the window left/right for wide screens instead of top/bottom (the version available in Ubuntu 16 predates that feature). This makes a huge difference for me, so I recommend just going straight to the 0.7 version and starting with this in “~/.cgdb/cgdbrc”:
I consider the syntax highlighting superior. There are also some interesting commands for intermixing assembler.
A list of some window commands:
By default you can hit the escape key to get to the cgdb window, or “i” to get back to gdb (when you start hit “ESCAPE :help”, then “i”). The “-” or “=” key (when in cgdb window after hitting escape) will change the split location.