Sublime Forum

SublimeGDB interpreter issue

#1

Please help me with SublimeGDB interpreter issue.

OS: CentOS 6.5 x64
gdb: GNU gdb (GDB) Red Hat Enterprise Linux (7.2-64.el6_5.2)
SublimeText 3, build 3065
No user settings to the SublimeGDB plugin

setting of my project:

[code]{
“settings”:
{
“sublimeclang_options”:

     "-I${folder:${project_path:core.sublime-project}}/common/",
  ],

     "sublimegdb_sourcedir": "/home/yuri/projects/core/regression/cpp",
     "sublimegdb_workingdir": "/home/yuri/projects/core/regression/cpp",
     "sublimegdb_commandline": "gdb --interpreter=mi ./exists_b",
     "sublimegdb_exec_cmd": "run -m 10.24.2.111 -o exist.txt ",

}
}
[/code]

I get an error from plugin each time when trying to start debug session. Here the error message:
“It seems you’re not running gdb with the “mi” interpreter. Please add #”–interpreter=mi" to your gdb command line"

I tried to start command from “GDB session” window: “2-gdb-show interpreter” in the gdb terminal and here the output:

code
2-gdb-show interpreter
2^error,msg=“Undefined show command: “interpreter”. Try “help show”.”
(gdb)
[/code]

Seems like sublimeGDB plugin doesn’t support my version of the gdb.

Any ideas/workarounds/solutions?

Thanks,
Yurii

0 Likes

GDB You have not configured the plugin correctly
#2

I have the same issue. Is there any fix?

0 Likes

#3

Try this: Open sublimegdb.py, lookup for Popen, and add bufsize=0 as one of the parameters.

I was having a similar problem with the newer versions of Sublime, and this change fixed it.

0 Likes

#4

[quote=“Ivan171”]Try this: Open sublimegdb.py, lookup for Popen, and add bufsize=0 as one of the parameters.

I was having a similar problem with the newer versions of Sublime, and this change fixed it.[/quote]

Still the same error

. “–interpreter=mi” IS on my command line, and it also seems that “gdb-show interpreter” is not a valid command.

0 Likes

#5

Okay so I think I have a workaround for this. Open sublimegdb.py and comment out the whole section where “gdb-show interpreter” is called. This basically fixed it for me, but as I don’t know what “gdb-show interpreter” is supposed to do, I can’t say what effect removing it has.

0 Likes

#6

I’ve tried this method, unfortunately it doesn’t help. The message from plugin disappeared but I still can’t debug. Execution of the program does not stop at the breakpoints. I see output in the “GDB Window” code
4-exec-next[/code] after press F10.

0 Likes

#7

I, as well, have this issue. My sublime project file is as follows :

"settings":
	{
		"sublimegdb_workingdir": "${folder:${project_path:../bin/debug/}}",
		"sublimegdb_commandline": "gdb --interpreter=mi0 ~/Projects/dummy/bin/debug/dummy"
	}

That would just prevent the plugin to explain that it has failed.

Thanks in advance !

0 Likes

#8

Heres working fine. I’m using the latest beta, and GDB 7.7.1. The only modification i made, that could influence the debugging, was the ‘bufsize=0’ one.

I don’t know if it’s against the rules (i actually didn’t read it), but i can upload my SublimeGDB somewhere, if you guys want to try it.

0 Likes

#9

I should add that I’m using Sublime Text 2.

And, by checking my gdb version, noticed that it was wrongly installed and redownloaded it on Arch repos. Works fine now.

Sorry for the trouble and thanks for the help !

0 Likes

#10

I had the same problem recently, but in my case the problem was solved by changing “gdb_timeout” setting from 20 to 120 (depends on the size of a project).

0 Likes