Re: Support for sys._current_frames

"Stefan Richthofer" <[email protected]>
Newsgroups gmane.comp.lang.jython.devel
Message-ID <trinity-46689bb9-79b4-4607-bdd0-06049f0cba42-1490805040719@3capp-gmx-bs23>
I suggest this could be implemented in ThreadStateMapping like this:

(on top of that an implementation in PySystemState is straight forward)

public static PyObject _current_frames() {

@SuppressWarnings("unchecked")

Map.Entry<Thread, ThreadState>[] entries = new Map.Entry[globalThreadStates.size()];

entries = globalThreadStates.entrySet().toArray(entries);

PyObject elements[] = new PyObject[entries.length];

int pos = 0;

for (Map.Entry<Thread, ThreadState> entry: entries) {

elements[pos++] = Py.newInteger(entry.getKey().getId());

elements[pos++] = entry.getValue().frame;

}

return new PyDictionary(elements);

}

Opinions?

-Stefan

Gesendet: Mittwoch, 29. März 2017 um 17:30 Uhr

Von: "Fabio Zadrozny" <[email protected]>

An: "Jython Developers" <[email protected]>

Betreff: [Jython-dev] Support for sys._current_frames

Hi Jython devs,

I've just updated the PyDev debugger to drop support for older Python versions and it seems I ended up breaking debugging in the current Jython version because of it...

The issue is that PyDev now requires sys._current_frames to be implemented by the interpreter (available since Python 2.5), but it seems this is not available for Jython -- this is needed so that the debugger can be faster (i.e.: it runs with untraced frames until some breakpoint is actually added -- at that point it gets the current frames and sets the tracing in them).

So, I'd like to check how feasible it'd be to have this support in Jython.

Thanks,

Fabio

------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________ Jython-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jython-dev

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Jython-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.