Author Topic: Slickedit GDB in MacOS broken  (Read 424 times)

tim_k

  • Senior Community Member
  • Posts: 141
  • Hero Points: 11
  • -Tim
Slickedit GDB in MacOS broken
« on: May 31, 2019, 10:24:00 pm »
I tried debugging 'hello world' using the Slickedit debugger on MacOS, and it fails with the following dialog:
Code: [Select]
Error starting debugger: GDB returned an error opening the executable
"<path to executable>"
not in executable format: File format not recognized.

It's dirt simple to reproduce:
  • create a new project, selecting GNU C/C++ as the type, and create new workspace.
  • Select 'Executable' as the project type, and 'C' as the source type in the next dialog
  • Select 'A "Hello World" application' from the next dialog
  • Select Build without a makefile in the next dialog
  • Once the project is created, set a breakpoint at the first executable line - 'printf("hello world\n");'
  • select start from the Debug menu

This will throw the same error every time.

Performing the exact same steps on my Redhat machines works fine.

The executable is present, and if I run it from the command line, it works.

What's going on?

Thanks,

-Tim.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2747
  • Hero Points: 420
Re: Slickedit GDB in MacOS broken
« Reply #1 on: June 14, 2019, 12:24:49 am »
LLDB is the preferred debugger on macOS.

Project > Project Properties... > Run / Debug > LLDB

We plan on updating the version of GDB we ship on macOS in the next release in hopes of it resolving the issues the current build has. 

https://stackoverflow.com/questions/52529838/gdb-8-2-cant-recognized-executable-file-on-macos-mojave-10-14/53592143

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2747
  • Hero Points: 420
Re: Slickedit GDB in MacOS broken
« Reply #2 on: June 14, 2019, 08:50:44 pm »
You can try replacing the "gdb" in /Applications/SlickEditPro2018.app/Contents/MacOS/" with the attached GDB 8.3 build.

You may need to follow this process to codesign the executable and set up entitlements to make macOS happy.

https://sourceware.org/gdb/wiki/PermissionsDarwin

This version of GDB will be shipped with the next release of SlickEdit.