gdb

James Linder jam at tigger.ws
Wed Jan 9 03:48:41 UTC 2019



> On 9 Jan 2019, at 12:48 am, Ken Cunningham <ken.cunningham.webuse at gmail.com> wrote:
> 
> fyi
> 
> I updated gdb last night, to the current version.
> 
> so it might be worth trying again
> 
> gdb and lldb are both good debuggers, but they are different, and it takes a while to get facile with either.
> 
> K
> 
> 
> On 2019-01-08, at 6:34 AM, Ryan Schmidt wrote:
> 
>> I don't know why gdb isn't working for you. From what I've been able to find, it should be able to debug programs built by clang.
>> 
>> But have you considered trying lldb instead?

I suspect the codesign but I am confused:

I am using 10.13.6 and have seen the warnings that 8.1 is not compatable, is 8.2 ok?

[Haycorn] /Users/jam [517]% sudo codesign -s gdb-cert /opt/local/bin/ggdb
Password:
/opt/local/bin/ggdb: is already signed


[Haycorn] /Users/jam [518]% ggdb a.out
GNU gdb (GDB) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin17.7.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from a.out...Reading symbols from /Users/jam/a.out.dSYM/Contents/Resources/DWARF/a.out...done.
done.
(gdb) l
1	#include <stdio.h>
2	int main ()
3	{
4	    printf ("Hello world\n");
5	}
(gdb) r
Starting program: /Users/jam/a.out
Unable to find Mach task port for process-id 771: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))

James

PS Ryan I will use lldb as a last resort, but baby-duck symdrome does rear it’s head. Thanks.


More information about the macports-users mailing list