User forums > Using Code::Blocks

[MacOSX 10.15][svn-r12240]zsh: no such file or directory

<< < (3/3)

Suryavarman:
Ooo now i understand the meaning of what you have say Codesigned

https://stackoverflow.com/questions/13913818/how-to-get-a-codesigned-gdb-on-osx
https://stackoverflow.com/questions/18423124/please-check-gdb-is-codesigned-see-taskgated8-how-to-get-gdb-installed-w

 I have not anymore codesign problem with gdb:
 

--- Code: ---codesign -fs gdb-cert /usr/local/bin/gdb
codesign -fs gdb-cert "/usr/local/Cellar/gdb/10.1/bin/gdb"

--- End code ---


--- Code: ---/dev/??: No such file or directory.
--- End code ---

May be that can help:

codesign --entitlements gdb.xml -fs gdb-cert /usr/local/bin/gdb

Where content of gdb.xml is:


--- Code: ---<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.cs.allow-jit</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
    <key>com.apple.security.cs.allow-dyld-environment-variables</key>
    <true/>
    <key>com.apple.security.cs.disable-library-validation</key>
    <true/>
    <key>com.apple.security.cs.disable-executable-page-protection</key>
    <true/>
    <key>com.apple.security.cs.debugger</key>
    <true/>
    <key>com.apple.security.get-task-allow</key>
    <true/>
</dict>
</plist>

--- End code ---


But it's not enough to work with gdb : The errors are:


--- Code: ---Termination notification request failed, mach_port_request_notification
--- End code ---


--- Code: ---Using sleep command’s PID as console PID 3088

[debug]> set confirm off

Debugger name and version: GNU gdb (GDB) 10.1

[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 200
[debug]>>>>>>cb_gdb:
[debug]> set filename-display absolute
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory /…/Test_App/
[debug]Source directories searched: /…/Test_App:$cdir:$cwd
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/??
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]/dev/??: No such file or directory.
[debug]Starting program: /…/Test_App/bin/Debug/Test_App
[debug]Termination notification request failed, mach_port_request_notification
[debug]returned: 4
[debug]>>>>>>cb_gdb:
--- End code ---

i can't stop the gdb.


--- Code: ---Trying to interrupt process with pid: 3084; child pid: 0 gdb pid: 3084

[debug]Quit
[debug]>>>>>>cb_gdb:
--- End code ---

The pid of the gdb and the PID of the console is 3088.

Suryavarman:
I have say something wrong. Codelite do not use GDB. Codelite seem to use only lldb and not the custom paths to use GDB.

Lot's of people say to use lldb becouse lldb have no certifaciton/codesign problems.

Here the error with lldb and CB.

--- Code: ---ctive debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /.../Test_App/
Adding source dir: /.../Test_App/
Adding file: /.../Test_App/bin/Debug/Test_App
Changing directory to: /.../Test_App/.
Set variable: DYLD_LIBRARY_PATH=.:

[debug]Command-line: /usr/bin/lldb -fullname -quiet  -args /.../Test_App/bin/Debug/Test_App
[debug]Working dir : /.../Test_App

Starting debugger: /usr/bin/lldb -fullname -quiet  -args /.../Test_App/bin/Debug/Test_App
Setting SHELL to ‘/bin/sh’
done

[debug](lldb) target create « /.../Test_App/bin/Debug/Test_App »
[debug]> set prompt >>>>>>cb_gdb:

Setting breakpoints

[debug]invalid command ‘settings prompt’.
[debug]Current executable set to ‘/.../Test_App/bin/Debug/Test_App’ (x86_64).
[debug](lldb) set prompt >>>>>>cb_gdb:
[debug]> show version
[debug]error: ‘show’ is not a valid command.
[debug](lldb) show version
[debug]Using terminal’s PID as console PID 3842, TTY /dev/??
[debug]Queued:[tty /dev/??]

--- End code ---

I think we are no choice we have to modify the CB code to add the gestion of lldb?

oBFusCATed:
This is partly true. In the long run we'll have to port to lldb, but this would require a separate debugger plugin. Hopefully I'll be able to do this in the first half of 2021...

This is the ultimate guide to codesign gdb: https://sourceware.org/gdb/wiki/PermissionsDarwin I don't know why search engines don't find it, but lead to some old interpretations of this. :(
With this I'm able to debug in a terminal, unfortunately C::B doesn't know how to handle the terminal and ttys.

Navigation

[0] Message Index

[*] Previous page

Go to full version