Debugging 10.6 on Xcode 4.4 - c++

I've been recently trying to compile a static library for a game engine in Xcode. I'm using OS X 10.8 and Xcode 4.4. I managed to copy the 10.6 platform from an old installation of Xcode. After a bit of copying stuff, I managed to get a runnable 10.6 SDK with appropriate headers and stuff. I had to use GDB for debugging, as LLDB doesn't like 10.6 any more. Debugging went OK for a bit, until I touched one build setting, no clue which. Doing a snapshot restore fixed nothing. Anyway, now debugging is really shakey. What will happen is this: The first time I run the application, everything works normally. It launches the game, loads the static library, breakpoints work, everything is fine. But after that, the next attempt at running, and all future attempts result in this error message:
Unable to find Mach task port for process-id 49069: (os/kern) failure (0x5).
A crash report reports this:
Thread 0 Crashed:
0 dyld 0x8fe01030 _dyld_start + 0
The debugger output shows no information other than what's normal.
Is there a way to get Xcode 4.4 to compile for 10.6 and run 100% of the time?
Edit: I tried using the technique described at http://sourceware.org/gdb/wiki/BuildingOnDarwin but the error still remains.

Related

First time using SFML-2.5.1 in NetBeans IDE 8.2 I ran into the problem

After the setup I've done in the properties of the project: at C++Compiler and Linker in both Release and Debug configurations I tried to build the project, which went successful.
Then I decided to run it and had some difficulties: using External Terminal, that did absolutely nothing, Standard output, that showed some text related to dll files I've clue about, Internal Terminal, that showed the very same text.
After that didn't work I went for cmd execution and what I saw was this.
Could you explain what that means and what I'm supposed to do. I'm new to all that kind of stuff, so I apologise if I did something stupid.
Cheers
EDIT: If not seen, I'm using Windows 10 and the version of SFML is GCC 7.3.0 MinGW (DW2) - 32-bit

Debugging fails with QtCreator on OSX

I have OSX Yosemite 10.10.5, QtCreator 4.1.0, Qt 5.7.0 and Xcode 7.2.1.
If I write any native C++ program in QtCreator (console, gui - anything) I am unable to debug that program from QtCreator. Breakpoints get ignored, the program executes without pause and runs to completion no matter what I try.
I have tried the Xcode's LLDb, system GDB and Homebrew GDB as debuggers. the versions of GDB fail to start. Homebrew GDB has been codesigned.
This all used to (a few year back) just work beautifully and I am at a loss as to what might have changed.
Curiously, if I generate an exception inside the program - like accessing through a null pointer, the debugger shows me where this happens in just the way I would expect so, presumably, the debugger is running but simply treating me with complete disdain.
I know there are many versions of this question but none seem to address the problem adequately or offer workable solutions, or they apply to much older versions of the products.
Any suggestions?
This version of qtCreator (4.1.0) saw the return of the warning about having the build directory at the same level as the project directory. In Windows, this is done automatically. My mac installation does not get it right. (I may have messed a while back - cannot remember).
So - if the build directory is inside the project directory, debugging fails. Move the build directory up to the same level as the project directory and everything seems to work fine.
You can set the default build directory in the preferences/Build & Run dialogue. The path should start with ../
You will need to think about the folder structure before setting up the project unless you want build folders appearing in awkward places. So, a project folder structure like this is OK:
But one like this is not:
If this was already obvious to you, great. I have been messing with this for ages.
Many thanks to those who replied and anyone else who took the time to read the question. What helped e find it was the suggestion by #AlexanderVX that his setup was the same as mine but his worked. The only bit of my setup he could not see in the screenshots was the start of the build path. So that was the clue.

SFML - Applications has stopped Responding

So, I'm using CodeLite on Windows, building with Mingw64 on 64 bit system. Everything builds, but when i run the application, it crashes with "Client.exe" has stopped responding. Client.exe being my application. I'm literally running the default example code off the SFML website. When I've googled around for quite some time now and I honestly have no idea as what to even look at for this error.
Sometimes my console will output
Application has exited with error code: 255
But most of the time it outputs:
Program exited with return code: -1073740940
Using help from the comments on my question.
As stated by Satus, The issue was, first, my libraries were statically linked, using the Dynamic libraries, instead, seemed to have fixed my issue. My second issue was that my SFML libraries were built using the wrong version of MingW. Recompiling this was simple enough. I downloaded the SFML source code. Used CMake to set everything up as displayed on the official SFML compiling and building tutorials, and built it using my version of MinGW. After copying the newly compiled DLL's and Debug DLL's, everything worked perfectly.
Be sure if you're using two different version of MingW (64bit and 32bit) to compile each version in CMake accordingly, otherwise you may get issues.

"Program File does not exist" while trying to debug with Eclipse/OpenOCD

I recently got a nrf51 bluetooth module and I am trying to debug it with Eclipse Mars. I installed the required toolchain as well as OpenOCD (I am using STLink v2 to debug the board).
While running openOCD and arm-none-eabi-gdb in console, everything works fine. The OpenOCD server starts up and I am able to connect with the gdb tool.
However, when trying to start a debug session with Eclipse, it throws the error "Exception occurred during launch. Reason: Program file does not exist". The build process finishes normally. It's the first time I used Eclipse for C/C++ development and the first time after years I used Eclipse at all so I don't even have an idea what could be wrong.
I tried messing around with the project settings without luck. Can anyone give me a hint?
I should mention, I used an already existing Makefile since I tried compiling one of the nordic SDK examples. I Changed it so the resulting files are ready for debugging.
In past I've used Segger's Jlink programmer and the JlinkExe (A pre-built binary) for Linux platform to program Nordic Bluetooth module such as NRF51 and it worked seamlessly. There are some very good documentation on using GNU toolchain with NRF51 series SOC and in case you get your hands on Segger's Jlink, I would recommend you to use that for programming. Meanwhile, this thread in the Nordic's developer zone seem to be very much similar to your problem. Maybe you'll be find some clues there.

Stepping through the debbuger in qtcreator causes gdb crash after a couple seconds

After I step through any code in this file in particular in a static library, gdb crashes after a couple of seconds.
I can step through other parts of the static library and shared libs that I have loaded and it works fine. The program runs fine and does not crash after gdb crashes.
gdb version 7.5.91.20130417-cvs-ubuntu on linux mint 15
How do I stop gdb from crashing in qtcreator?
If GDB is crashing, that sounds like a bug in GDB, from their docs:
If the debugger gets a fatal signal, for any input whatever, that is a gdb bug.
Reliable debuggers never crash.
Which version are you running/does upgrading to a newer version help?
provided as a supplementation:
I also encounter this gdb crash with qtcreator 5.0,after upgrade to qtcreator 6.0.1 ,error still existed with
"gdb crashed unexpectedly exit"
run the qt project is ok,when debugging ,and the qtcreator hit a breakpoint ,gdb will crash in about 3 seconds.
how I fix it:
remove cached QtProject folder under current user.
find . -name QtProject
in current user directory.
and remove the folder.