Here's a similar patch with PERL5DB_THREADED enabled - a much better implementation, thanks Yitzchak! Threads are now only used, (require'd in the debugger), if asked for explicitly via this environment variable.
I'll take a look at perl.c and -dt soon as per your suggestion.
In the meantime you can use this with:
PERL5DB_THREADED=1 threadedperl -d threadedprog ...
Ciao
Richard Foley
http://www.oreilly.com/catalog/perldebugpr/
>-----Original Message-----
>From: Yitzchak Scott-Thoennes [mailto:[EMAIL PROTECTED]
>Sent: Mittwoch, 13. Oktober 2004 08:50
>To: Foley, Richard
>Cc: [EMAIL PROTECTED]
>Subject: Re: [PATCH] debugger handles threads [perl #31666]
>
>
>On Wed, Oct 13, 2004 at 08:30:39AM +0200, [EMAIL PROTECTED] wrote:
>> Aha. I thought someone might want this...
>>
>> It doesn't 'use threads' (or rather require), of course,
>unless ithreads has been configured.
>>
>> The issue I see, where you have a choice, is that someone
>might wish to use threads further down the line, and the
>debugger simply needs to have this setup right early on. Just
>like using Term::ReadLine or IO::Socket or Term::Rendezvous,
>etc. , these need to be setup on at the start, and imho (very
>small o ;), doing this later will be a real bucket of worms.
>>
>> Or do you think it might be ok to just complain if there is
>an attempt to use threads, when it has been explicitly turned
>off? Perhaps it could be a runtime (commandline) option to
>turn it on in the first place? Thoughts?
>
>Random thoughts:
>
>If a commandline option would do it, that sounds good.
>Otherwise, perhaps
>skip the use threads (and complain if there's a later attempt) unless
>$ENV{PERL5DB_THREADED} is true (and have perl.c set PERL5DB_THREADED if
>you say -dt).
>
perl5db.pl.diff
Description: perl5db.pl.diff
Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments.
