[Top][All Lists]

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

Re: [Gcl-devel] SGC debugging

From: Camm Maguire
Subject: Re: [Gcl-devel] SGC debugging
Date: 19 Jul 2004 09:58:32 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2


Aurelien Chanudet <address@hidden> writes:

> Hi,
> I'm currently trying to debug SGC on MacOS X using
> gdb. I'm having difficulties setting up the debugger
> to handle stratified segfaults. Whenever a segfault
> occurs, gdb stops and reports the segfault. I've tried
> modifying this default behaviour using the "handle"
> command :
> handle <name of signal> nostop pass

Yes, I think pass is the default.  What I usually do is 

handle SIGSEGV nostop noprint

> in order to trace execution through the signal
> handler. However, this does not produce the expected
> behaviour. Indeed, setting up this behaviour causes
> the program to go into an infinite loop, the signal
> being never called.

If you are in an infinite loop, and if our earlier discussion was
correct, the segfault signals are being trapped.  Your loop should be
repeated calls to memprotect_handler.  You should be able to place a
break point at this function (b memprotect_handler), and step through
the loop.

But the real problem if memory serves is why the sgc_type_map array is
not being marked permanently writable.  I suppose you are also
stepping through this part of sgc_start, yes?

If you want to see a segfault trap in its full glory, don't issue any
handle commands.  Gdb will then pause and show the location of the
first fault in the code.  You should then (or prior) be able to set 'b
memprotect_handler', 'c', and wind up in the handler.

> Any clue ? How are you guys setting up gdb to debug
> stratified segfaults ?

Thanks for looking at this.  Please let me know if there are any other

Take care,

> Thanks,
> Aurelien
> Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
> Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
> Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez 
> Yahoo! Messenger sur http://fr.messenger.yahoo.com
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gcl-devel

Camm Maguire                                            address@hidden
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

reply via email to

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