File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -1043,17 +1043,18 @@ class PyFramePtr:
10431043
10441044 def __init__ (self , gdbval ):
10451045 self ._gdbval = gdbval
1046+ if self .is_optimized_out ():
1047+ return
1048+ self .co = self ._f_code ()
1049+ if self .is_shim ():
1050+ return
1051+ self .co_name = self .co .pyop_field ('co_name' )
1052+ self .co_filename = self .co .pyop_field ('co_filename' )
10461053
1047- if not self .is_optimized_out ():
1048- self .co = self ._f_code ()
1049- if not self .is_shim ():
1050- self .co_name = self .co .pyop_field ('co_name' )
1051- self .co_filename = self .co .pyop_field ('co_filename' )
1052-
1053- self .f_lasti = self ._f_lasti ()
1054- self .co_nlocals = int_from_int (self .co .field ('co_nlocals' ))
1055- pnames = self .co .field ('co_localsplusnames' )
1056- self .co_localsplusnames = PyTupleObjectPtr .from_pyobject_ptr (pnames )
1054+ self .f_lasti = self ._f_lasti ()
1055+ self .co_nlocals = int_from_int (self .co .field ('co_nlocals' ))
1056+ pnames = self .co .field ('co_localsplusnames' )
1057+ self .co_localsplusnames = PyTupleObjectPtr .from_pyobject_ptr (pnames )
10571058
10581059 @staticmethod
10591060 def get_thread_state ():
You can’t perform that action at this time.
0 commit comments