Sublime Forum

SublimeGDB not working (does nothing) (Ubuntu)

#1

I just installed SublimeGDB to debug my C++ project.
I am on Ubuntu using Sublime Text 3.

When I press F5 it seems to load gdb and three windows appear in Sublime Text.
Typing in b main or run does nothing. Manually setting breakpoints in the source files via F9 or the context menu freezes Sublime Text for like 10 seconds, then continues without actually setting a breakpoint.

The code was compiled using the -g flag. The binary file called “extended” sits in the same path as the project.

This are my project settings:

[code]{
“folders”:

	{
		"path": "."
	}
],
"settings":
{
	"sublimegdb_commandline": "gdb --interpreter=mi ./extended",
	"sublimegdb_workingdir": "${folder:${project_path:extended}}"
},

}[/code]

I tried putting the entire path instead of the dot at folders above too, no change.

The gdb session window reads this:

1-gdb-show interpreter =thread-group-added,id="i1" ~"GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9\n" ~"Copyright (C) 2015 Free Software Foundation, Inc.\n" ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n" ~"This GDB was configured as \"x86_64-linux-gnu\".\nType \"show configuration\" for configuration details." ~"\nFor bug reporting instructions, please see:\n" ~"<http://www.gnu.org/software/gdb/bugs/>.\n" ~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n" ~"For help, type \"help\".\n" ~"Type \"apropos word\" to search for commands related to \"word\"...\n" ~"Reading symbols from ./extended..." ~"done.\n" (gdb) 1^error,msg="Undefined show command: \"interpreter\". Try \"help show\"." (gdb) 2-inferior-tty-set /tmp/tmpwflkjg 2^done (gdb) 3-gdb-set target-async 1 4-gdb-set pagination off 3^done (gdb) 4^done 5-gdb-set disassembly-flavor intel (gdb) 5^done (gdb) 6-exec-run =thread-group-started,id="i1",pid="8172" =thread-created,id="1",group-id="i1" =library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-group="i1" 6^running *running,thread-id="all" (gdb) =library-loaded,id="/lib/x86_64-linux-gnu/libgcc_s.so.1",target-name="/lib/x86_64-linux-gnu/libgcc_s.so.1",host-name="/lib/x86_64-linux-gnu/libgcc_s.so.1",symbols-loaded="0",thread-group="i1" =library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-loaded="0",thread-group="i1"

The gdb console window reads this:

GNU gdb (Ubuntu 7.9-1ubuntu1) 7.9 Copyright (C) 2015 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-linux-gnu". 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"... Reading symbols from ./extended...done. &"warning: GDB: Failed to set controlling terminal: Inappropriate ioctl for device\n"

The other windows are empty.

I would submit this as an issue on the Github page but the dev disabled issues.

0 Likes

#2

I recently started getting the same console message:

I tried reverting to an older version of GDB (7.9 >> 7.4) but I got the same message.

0 Likes

#3

Okay I fixed it…

I used package control to update SublimeGDB and my debugger is working again with GDB 7.9, I still get that ioctl warning but everything works.

0 Likes