When I try to Debug on STM32CubeIde my mac blocks the dylib it use, I go to preferences and security and allow it to run, but there are so many dylib and the Debug mode fails
Solved the problem.
When an Application blocks dylib you can try this:
type 'sudo spctl --master-disable' on Terminal.
Then go to settings->Privacy and click on allow apps downloaded from any site.
Then restart the STM32CubeIDE and it works on Debug mode.
Related
I'm trying to install the omnetpp simulator abut I was not able to use its graphic interface. To run it properly I have to install Qt5 which I did through homebrew. My Qt version is 5.15.0 and my MacOS is Catalina (10.15.5 (19F101)).
When running the ./configure command to install omnetpp, I got the following error:
“qmake” cannot be opened because the developer cannot be verified.
In summary I had problems with the omnetpp when trying to run the graphic interface Qt, then I've installed Qt5 and now I get an error telling me that qmake cannot be verified.
Thanks,
The problem is that this will come many times... It has something to do with the new security settings for MacOS Catalina.
I found another work-around, which worked very well for me. Go to Systems Preferences -> Security and Privacy -> Privacy. Scroll down the left menu to Developer Tools and allow Terminal to run software locally (tick the box).
I was able to circumvent this problem by opening System Preferences, Security & Privacy, General, and then allowing the file to be executed. When I ran make again the Qmake command ran without any warnings or windows popping up.
According to Apple's website, you need to find qmake in the Finder, CTRL+click on it and press "Open". After that, qmake will be marked as an authorized app and you can run ./configure again.
I am a Windows user and could find the official Apple support page (https://support.apple.com/de-de/guide/mac-help/mh40616/mac) within a minute of googling, by the way.
You can run the following command to "un-quarantine" your binary (assuming its path is /usr/bin/qmake):
xattr -w com.apple.quarantine "00c1;$(xattr -p com.apple.quarantine /usr/bin/qmake | cut -d";" -f2-4)" /usr/bin/qmake
I used homebrew installed gdb, and created code sign for it. It seems I have installed it completed. But when I use gdb command to debug the app in /Applicaions, it always prompted me no such file or directory, I have no idea about it. My system is 10.9.4, and GDB version is 7.7.1.
Wait for your help!
GDB does not automatically load application bundle directories. You need to give it the path to the main Mach-O executable. Something like /Applications/Reveal.app/Contents/MacOS/....
I don't know what the main executable for Reveal.app is named, but if it is named Reveal your command would look like this.
gdb /Applications/Reveal.app/Contents/MacOS/Reveal
today I installed LiteIDE on my mac with OSX 10.9. I tried to compile simple source code and it worked fine, however debugger doesn't work because of missing GDB. I installed it from MacPorts, changed darwin64.env file, and now LiteIDE runs debugger and shows tabs with variables, call stack and etc, but they are empty and I can't run my code line to line! If I click Debug->Continue or Debug->Step Over nothing changes. There is my darwin64.env file:
# native compiler drawin amd64
GOROOT=/usr/local/go
#GOBIN=
GOARCH=amd64
GOOS=darwin
CGO_ENABLED=1
PATH=$GOROOT/bin:$PATH
LITEIDE_GDB=/opt/local/bin/ggdb
LITEIDE_MAKE=make
LITEIDE_TERM=/usr/bin/open
LITEIDE_TERMARGS=-a Terminal
LITEIDE_EXEC=/usr/X11R6/bin/xterm
LITEIDE_EXECOPT=-e
I've got a solution. My ggdb, which was downloaded via MacPorts was unsigned. You must create a key in your keychain to allow ggdb sign code
This worked for me:
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/gdb.rb
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have had terrible problems making an Application Debug using Eclipse C/C++ project with XCode 5.0 and I have finally made it. I have finally been able to successfully debug my application and that's why I decided to make this little tutorial hoping to save time to others.
When trying to debug and application written in C/C++ on Eclipse on Mavericks OS it comes up with "Error gdb -- version".
This is because Eclipse cannot find GDB debug on new Mac OSX because Apple discontinues GDB support in place of LLDB. To check if this is your case simply try to run from Terminal gdb and it will show up as file not found.
The problem is that LLDB is not configured for Eclipse yet (or the other way around). So how to make your Eclipse debug the application again as in previous 10.8 OS?
First get and compile the GDB. You have two possible options:
Macports (Unfortunately, the Mavericks release got stuck in Building getext library)
Homebrew
My suggestion is to get it from Homebrew. Check on their web site the download link and install using
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/hebrew/go)"
Let it install. After it successfully installed GDB you need to sign a certificate to make Eclipse able to use GDB otherwise it will show up the error:
Unable to find Mach task port for process-id 28885: (os/kern) failure
(0x5). (please check gdb is codesigned - see taskgated(8))
This means Eclipse can find the GDB now but cannot run it because of the Apple certificates issue.
To sign the GDB application and make it possible that Eclipse runs it follow the guide here:
https://sourceware.org/gdb/wiki/BuildingOnDarwin
which can be summarized in:
Start Keychain Access application (/Applications/Utilities/Keychain Access.app)
Open menu /Keychain Access/Certificate Assistant/Create a Certificate (TOP MENU BAR)
Choose a name (gdb-cert in the example)
3.1 Set "Identity Type" to "Self Signed Root"
3.2 Set "Certificate Type" to "Code Signing"
3.3 Check the flag "Let me override defaults"
3.4 Click several times on "Continue" until you get to the "Specify a Location For The Certificate screen" then set Keychain to "System"
3.5 If you can't store the certificate in the "System" keychain, create it in the "login" keychain, then export it. You can then import it into the "System" keychain.
3.6 Make sure you have the "gdb-cert" in your "System" (left top window)
Select "Get Info" by pressing twice on the fresh made certificate (gdb-cert),
Open the "Trus"t item, and set "Code Signing to Always Trust"
Close Keychain Access application
Restart "taskgated" application from activity monitor
Now you need to sign the Certificated by doing from terminal
$ codesign -s gdb-cert ../path of GDB
Example:
$ codesign -s gdb-cert /usr/local/bin/gdb
You are all set now.... ready to debug you C/C++ application on Eclipse on MacOSX Mavericks
Make sure you have all set properly once again double check on Eclipse Menu Run->Debug Configuration->Debugger the line :
GDB Debugger -> /usr/local/bin/gdb (or your local path, check it with "$ which gdb" to get the correct path)
GDB Command file-> .gdbinit
Apple let GDB installed on the Mavericks but they like people squash their heads on the wall before doing a simple Hallo World program. No comment.
Have Fun and I hope to have saved you time!
I have a XCode which builds and runs under XCode.
I would like to know if it is possible to debug it using a gdb I build under Mac OSX (gdb 7 to be specified). If yes, can you please tell me how can I do that?
Thank you.
gdb-7.0 reverse debugging currently can only work with two classes of targets:
1) a remote simulator/emulator/virtual-machine that supports going backwards, or
2) the built in "process record" target, which at present has only been ported to x86-linux, x86-64 linux, and moxie linux.
Well, now -- I take that back. I recently discovered that process record can work with any remote x86 target, so if you're connecting with your macintosh target via "target remote", you might just be able to do it!
There is an online tutorial for process record here:
http://www.sourceware.org/gdb/wiki/ProcessRecord/Tutorial
More info about process record here:
http://www.sourceware.org/gdb/wiki/ProcessRecord
And about gdb reverse debugging here:
http://www.sourceware.org/gdb/wiki/ReverseDebug
So you want to use your own version of gdb to debug your executable? Easy!
Open Terminal, and do something like this:
$ cd <directory where Xcode project lives>
$ cd build/Debug (for example - depends on project configuration)
$ /usr/local/bin/my-gdb ./MyExecutable
Of course, specifying the actual path to your custom gdb version.
XCode's debugger is gdb (likely with Apple-specific modifications.) When you debug an application you can get to the gdb command line by opening the Console from the Run menu.
What requirements are imposed on your application that would require you to debug with your own version of gdb?