[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnustep on FreeBSD and how to use the debugger
From: |
David Chisnall |
Subject: |
Re: gnustep on FreeBSD and how to use the debugger |
Date: |
Sat, 2 Sep 2017 11:02:37 +0100 |
On 2 Sep 2017, at 05:07, David Wetzel <address@hidden> wrote:
>
>
> I gave gdb80 a try but it looks like we are not having the debug info?
> Do we need some additional flags when compiling the libs or app?
>
> Or is it just not working with the new runtime?
As Riccardo said, you probably need debug=yes to get debug info. That said, I
don’t believe that either lldb or gdb handles the GNUstep non-fragile ABI
symbols very well, so if you want to inspect an instance variable then you’re
better off calling the runtime introspection functions from the debugger prompt
than trusting the debugger’s attempt to interpret them. For object ivars, use
object_getIvar(obj, class_getInstanceVariable(object_getClass(obj,
“ivar_name”)). For other types, use ivar_getOffset and some pointer casts to
get the address of the ivar and then dereference it.
If anyone has time to work on the lldb side, I’d be happy to help,
David