renodino has asked for the wisdom of the Perl Monks concerning the following question:
Ideally, I'd be able to use something akin to $DB::fork_TTY/get_fork_TTY(). I've been casting about on Google, MailArchives, perldoc, and here, for a couple hours now, and can't find anything explicit.
And FWIW I can't even remember how to apply $DB::fork_TTY to fork()'ing on Win32, tho I'm certain I've used it somehow a year or so ago (middle age and homebrew beer is apparently taking a toll on my synapses).
So I guess I've got multiple questions:
Update: After some more study (mostly of perl5db), I've answered most of my own questions (tho most were not the answers I wanted...<sigh/>):
1) Nope, no DB::fork_TTY/get_fork_TTY() for threads
2) Sorry, can't. (I must've been running on cygwin or SFU before)
3) Sorry, no. I tried Komodo and it was actually worse (in some respects) at handling threads than regular command line debugging.
I also learned that the e/E commands were just introduced in 5.8.6.
So...since my only options are to move the entire project to Java or (god forbid) C++, or to solve this sticky issue, I guess I'll be spending the next few days hacking up perl5db.pl to try to solve some of these issues.
I'm likely to try to permit Win32 support via Win32::Process opening a new command prompt window ala xterm_get_fork_TTY().
As to opening a new window, I'm thinking of keeping a shared hash mapping tid's to IN/OUT handles, tho the threading issue may be more challenging than that, as perl5db indicates that once a thread is running, it runs to completion without permitting another thread to run. (However, I've noticed that when I omit -dt, and just use -d, it does switch between threads, tho unpredictably, similar to the behavior when fork()'ed processes use the same TTY.
I'm also hoping to figger out the Perl/Tk hooks so this might be applied to ptkdb, but thats probably wishful thinking at this point.
Anyhow, if any monks (saints?) can shed light on the right way to do this, and exactly where in perl5db to make the incisions, I'd be much obliged.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32, $DB::fork_TTY, and a threads equivalent
by BrowserUk (Patriarch) on Sep 19, 2005 at 05:56 UTC | |
by renodino (Curate) on Sep 19, 2005 at 16:19 UTC |