gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with gdb needed


From: David Chisnall
Subject: Re: Help with gdb needed
Date: Thu, 24 Jan 2013 10:16:39 +0000

On 24 Jan 2013, at 10:12, Marcus Müller wrote:

> Hi David,
> 
>> A crash in objc_msgSend() usually means that the object that is being sent a 
>> message is an invalid pointer.  Try enabling zombies and see if it reports 
>> an object being deallocated.
> 
> that's clear - but why can't I print it in gdb? I just want to inspect the 
> pointer, but even that fails.
> 
>>> (gdb) frame 1
>>> #1  0x0000000800d6ade9 in -[GSRunLoopCtxt pollUntil:within:] (
>>>    self=0x806d5e248, _cmd=0x80113b990 <.objc_selector_list+544>, 
>>>    milliseconds=0, contexts=0x806c3bfa8) at GSRunLoopCtxt.m:639
>>> 639                   [watcher->receiver receivedEvent: watcher->data
>>> (gdb) p watcher
>>> $1 = (struct GSRunLoopWatcher *) 0x8071b8d68
>>> (gdb) p watcher->receiver
>>> Cannot set lwp 100877 registers: Invalid argument
>>> An error occurred while in a function called from GDB.
>>> Evaluation of the expression containing the function
>>> (malloc) will be abandoned.
>>> When the function is done executing, GDB will silently stop.

Hmmm, maybe watcher is an invalid pointer.  Did you try valgrind?

>> P.S. On FreeBSD, it's usually best to use gdb from ports, as the one in base 
>> doesn't understand DWARF4, which modern clang and gcc both generate.
> 
> I'm using [GDB v7.5.1 for FreeBSD], should be good?

Yup, should be fine.

David


reply via email to

[Prev in Thread] Current Thread [Next in Thread]