I am trying to debug a few C++ applications with KDevelop 4.0.1(on KDE 4.4.5 and gdb 7.0.1) on Debian 6.0.6. Irrespective of what part of the code I break into, the debugger detaches automatically after stepping through a few instructions. I didn't find anything on this topic on any forums. I tried a few things below.
Debugging using gdb on shell works perfectly fine.
Tried debugging multiple applications, but the issue is seen.
Reinstalling KDevelop did not help.
Am I missing some configuration that could cause this behavior?
(I am new to kdevelop)
Thanks for any help.
My guess is that is related to pretty printing of an uninitialized variable.
Lots of fixes have been applied to KDevelop and gdb, you should consider updating to a more recent version.
Related
I am using cubeIDE version 1.8.0 and NucleoF746ZG microcontroller for my project. I have made the codes and when I compile and run they work properly without errors and warnings. But the problem is that when I try to debug, It doesn't work. I mean the debug code uploads to the board but no cursor shows up at the breakpoints. I have tried to make some breakpoints and hault the program at them but no cursor comes to them.
I have opened a trace control tab and it says "Tracing is not supported". I don't know why that happens. The only thing that I know is that after installing the software, It didn't recognized my st-link. It was fixed after replacing the libusb-1.0.dll to a newer version of it. That was the thing that I have changed. But I don't think that it will affect since compiling and running works properly.
If anyone has encountered this issue or if you have any clues about a cause for this matter, please let me know. And request me if you need any more details from my side. I have attached two screenshots for reference.
Thanks and Kind Regards...
Screnshot1
Screenshot2
I am running Qt5.11.1 with the MSCV2017 32bit compiler. For debugging I have the CDB x86 and everything compiles and runs well.
The problem is with the debugger. When I run it, it behaves like it's a normal run. So my program just starts, but doesn't stop at breakpoints or any other debugger related thing. It looks like it's freezing:
So I cannot pause, step over etc. and it only shows that it's starting..forever.
I have seen several people who complained about the CDB being slow (see here, here and here, there is also a bug report about it.), but mine is not working at all!
Does anyone have any idea why it behaves like this?
I had the same problem and tried to install a different SDK version and it worked for me.
Debugger shows me dissassembler code, while i am trying to step over the instructions of my program.
Using lldb under QtCreator.
Interesting thing is: debugging works fine, if i use it without QtCreator (via terminal)
Small projects seems to debug normally... So I've try to add peaces of my project gradually to small one.
I've found a peace of code, that resulting to crash:
QVector<myClass>::contains();
But if i try to make an empty project only with this realisation, problem disappeared.
I've lost about a week, trying to solve it.
Any ideas, what can go wrong?
EDIT:
Well, QtCreator still using GDB instead of LLDB, that i refer it to...
Looks like bug
I'm trying to use mono d to develop some vibe.d applications and I'm having trouble with the debugger. Sometimes I can't see the content of some variables. Also, in order to have any symbols at all, I need to remove my complete "buildTypes" configuration in my dub.json.
Also, when starting a debug session, I get this:
"&"warning: GDB: Failed to set controlling terminal: Operation not permited\n""
Finally, I cannot stop my application using the mono d "stop" command. I always need to use the kill -9 on my application or else it keeps running.
Any idea how to solve these issues?
In general I'm struggling to find a confortable working environment. Tried Visual Studio+VisualD, Eclipse+DDT, and Monodevelop+Mono-D, but all have their issues, almost always related to debugging. What is everyone else using?
Thanks a lot,
Mario
GBD based debugging is not that good in Mono-D. Eclipse can understand more of D constructs by my opinion, but the best option there is to use VisualD w/ Mago. Unfortunatelly current version of Mago makes VS 2013 very unstable.
Could you please put there your failing dub.json configuration?
I'm assuming you are using an Ubuntu with a recent version of GDB. You can ignore this warning, it's beacuse of some GDB 7.x vs GNOME terminal thing, I'm sure that will be fixed soon. As a workaround you can use Mono's integrated terminal for debugging.
I ain't have this "stop" issue. Which version of Monodevelop and Mono-D are you using? It is advised to use a recent beta instead of the stable release, I'm using Monodevelop 5.6 right now without any issues.
I think Mono-D + Linux is by far the best option that you could have for D development right now despite it's issues.
I'm working on writing an OS and I'm running into problems trying to debug my code. I'm using GDB to connect to Bochs' GDB stub to "remotely" debug my kernel. Connecting works fine, as does loading debugging symbols from the kernel file. I set a breakpoint for the kmain function, which is successfully located, and the debugger breaks correctly (inside my kernel). However, I can't "step" or "next" through my code, nor can GDB apparently determine which line of code is the current line.
When I try to "step", I get the following message: "Cannot find bounds of current function". This is the only error message I get at any point.
My code is being compiled in GCC with the -g flag (I've tried other types of debugging information using GCC options; none have worked.) I have tried looking through the GDB manual , as well as searching for the answer, and I'm totally stumped. Any help would be amazing.
Thanks!
Well, I got debugging working, but I had to switch emulators. I was able to get GDB working with Qemu, even though I also had problems doing that. To get GDB to connect to the Qemu gdbserver, I had to pass the following option to Qemu: "-gdb tcp::1234,ipv4". Took me forever to figure that out... Debugging works perfectly now!
Googling throws up "This is because when you attached to gdbserver, the process under
debug has not completed the C start-up code" http://www.cygwin.com/ml/gdb/2005-03/msg00237.html... http://www.bravegnu.org/gnu-eprog/c-startup.html describes the process for when you are coding for embedded devices, maybe this will help?
If you find the answer please post here as I'd like to know what the solution to the problem is too.
I don't know why but bochs with gdb-stub enabled seems to be picky with the config options. On some system following options will break it:
--enable-x86-64, --enable-vmx