| 858 | |
| 859 | |
| 860 | class InternalGetArray(InternalThreadCommand): |
| 861 | def __init__(self, seq, roffset, coffset, rows, cols, format, thread_id, frame_id, scope, attrs): |
| 862 | self.sequence = seq |
| 863 | self.thread_id = thread_id |
| 864 | self.frame_id = frame_id |
| 865 | self.scope = scope |
| 866 | self.name = attrs.split("\t")[-1] |
| 867 | self.attrs = attrs |
| 868 | self.roffset = int(roffset) |
| 869 | self.coffset = int(coffset) |
| 870 | self.rows = int(rows) |
| 871 | self.cols = int(cols) |
| 872 | self.format = format |
| 873 | |
| 874 | def do_it(self, dbg): |
| 875 | try: |
| 876 | frame = dbg.find_frame(self.thread_id, self.frame_id) |
| 877 | var = pydevd_vars.eval_in_context(self.name, frame.f_globals, frame.f_locals, py_db=dbg) |
| 878 | xml = pydevd_vars.table_like_struct_to_xml(var, self.name, self.roffset, self.coffset, self.rows, self.cols, self.format) |
| 879 | cmd = dbg.cmd_factory.make_get_array_message(self.sequence, xml) |
| 880 | dbg.writer.add_command(cmd) |
| 881 | except: |
| 882 | cmd = dbg.cmd_factory.make_error_message(self.sequence, "Error resolving array: " + get_exception_traceback_str()) |
| 883 | dbg.writer.add_command(cmd) |
| 884 | |
| 885 | |
| 886 | def internal_change_variable(dbg, seq, thread_id, frame_id, scope, attr, value): |