Sysprogs forums › Forums › VisualGDB › Debugging only with gdbserver
- This topic has 3 replies, 2 voices, and was last updated 8 years, 11 months ago by support.
-
AuthorPosts
-
December 3, 2015 at 20:44 #7294SchodMCParticipant
Hi,
I’ve a problem that I don’t understand. I made a project with a completly custom Build chain. Meanwhile everything works. Even debugging. But only if I use gdbserver. If I don’t use gdbserver (I want VisualGDB to use GDB directly), debugging works, but I wont see any output from my app. When I start the debugging process with Start Quick Debug, everything works fine. Whats wrong?
Here is my configuration (within the VisualGDB Properties Dialog):
- Project Settings
- Remote Computer used for building and debugging: (local computer)
- Deploy executable on a different machine
- Deployment machine: My remote system
- Allow choosing build/clean/debug commands host independently (checked)
- Buildsystem (custom build)
- Buildsettings
- My build commands (calls to GNU make; building works without problems)
- Debug Settings:
- Use custom GDB Executable (selected the on on my remote system)
- Start GDB in the following mode: Debug a new instance
- Programm output forward to Visual Studio
The Rest is default (except an after build command to copy the executable to my remote machine). With this configuration, VisualGDB uses gdbserver even if that checkbox is not checked. When I use a change to custom command and deactivate gdbserver, I won’t get the printf output of the application. However, the rest (checking variables, stepping through the code) work’s fine. And as said at the beginning, using QuickDebug works without problems and without gdbserver.
What have I made wrong within my configuration? (Using Visual GDB 5r6, Visual Studio 2013, GDB 7.10).
Thanks for help and have a nice day
Marc
December 6, 2015 at 03:32 #7297supportKeymasterHi,
When you are not using gdbserver, VisualGDB opens a separate SSH console within the main SSH session and redirects your program output to that console using the ‘tty’ command in GDB. Perhaps something about this mechanism is broken? You can see the tty name by switching the GDB Session window to the “All GDB Interaction” mode. Can you reproduce the problem on a clean “Hello, World” project for the same target?
December 7, 2015 at 13:25 #7310SchodMCParticipantWell, I look to the output and realized, that this command won’t be executed. Setting it manually won’t work (got an file not found error). The configuraion of Visual GDB tells me, that it wants to use GDBServer. But I also think that I have a completley missconfigurated visuagdbproject file.
What I whant is the following (as told in an other thread):
- Use an existing project
- Add a new configuration
- Copy a visual gdb project file to my source and set it as output file in the Visual Studio settings, to acticiate VisualGDB.
- Then I want to tell VisualGDB to execute my make command line to compile the project like already configured in Visual Studio
- After that, VisualGDB has to copy the file to my remote machine to an directory I want
- And than, VisualGDB should start gdb on the remote machine (using SSH) and debug the previously copied application without sending a copy of the source file, just like Quick Debug do. That said, Visual GDB should simply start a debugging session like it will work when I call the Quick Debug menu command.
I don’t know why, but I won’t get it work. Quick Debug always works like a charme (compiling with my own tool chain (with has no cross GDB or cross GDBSERVER on windows), copying the file manually to my remote machien and start quick debug – works without a problem. Even if I let VisualGDB compile the file and copy it to my remote machien I can use Quick Debug without a problem. Visual GDB always finds the sources, uses SSH, shows me the output of my app, shows any local variable, etc. Work, like it should work.
And exactly that I whant to do with an VisualGDB project file, so that I simply have to press F5 and everything is fine. And this with an existing project using a seperate configuration, so that other developers in my company only have to change the configuration in Visual Studio to continue work on that project like the always did, without the need of VisualGDB. We need that, because the build chain we are using will be called by a chrone job for our release builds, that also includes other types of projects. So I don’t have the luxus to change all projects to build like a new Visual GDB will do with it own tools chains.
Please, could you help me to make that work? Because the fact that Quick Debug works like a charme shows me, that there has to be a way to work like this, simply by addign a visual gdb project file to my existing projects and activating it with a new configuration.
Have a nice day
Marc
December 9, 2015 at 20:09 #7318supportKeymasterOK, let’s try to simplify things and do them step-by-step. When you create a new Linux project with VisualGDB targeting the same machine (not using gdbserver), does the output work as expected?
- Project Settings
-
AuthorPosts
- You must be logged in to reply to this topic.