@@ -764,33 +764,33 @@ static int
764764send_exec_to_proc_handle (proc_handle_t * handle , int tid , const char * debugger_script_path )
765765{
766766 uintptr_t runtime_start_address ;
767- struct _Py_DebugOffsets local_debug_offsets ;
767+ struct _Py_DebugOffsets debug_offsets ;
768768
769- if (read_offsets (handle , & runtime_start_address , & local_debug_offsets )) {
769+ if (read_offsets (handle , & runtime_start_address , & debug_offsets )) {
770770 return -1 ;
771771 }
772772
773- uintptr_t interpreter_state_list_head = local_debug_offsets .runtime_state .interpreters_head ;
773+ uintptr_t interpreter_state_list_head = debug_offsets .runtime_state .interpreters_head ;
774774
775- uintptr_t address_of_interpreter_state ;
775+ uintptr_t interpreter_state_addr ;
776776 Py_ssize_t bytes = read_memory (
777777 handle ,
778778 runtime_start_address + interpreter_state_list_head ,
779779 sizeof (void * ),
780- & address_of_interpreter_state );
780+ & interpreter_state_addr );
781781 if (bytes == -1 ) {
782782 return -1 ;
783783 }
784784
785- if (address_of_interpreter_state == 0 ) {
785+ if (interpreter_state_addr == 0 ) {
786786 PyErr_SetString (PyExc_RuntimeError , "No interpreter state found" );
787787 return -1 ;
788788 }
789789
790790 int is_remote_debugging_enabled = 0 ;
791791 bytes = read_memory (
792792 handle ,
793- address_of_interpreter_state + local_debug_offsets .debugger_support .remote_debugging_enabled ,
793+ interpreter_state_addr + debug_offsets .debugger_support .remote_debugging_enabled ,
794794 sizeof (int ),
795795 & is_remote_debugging_enabled );
796796 if (bytes == -1 ) {
@@ -802,22 +802,22 @@ send_exec_to_proc_handle(proc_handle_t *handle, int tid, const char *debugger_sc
802802 return -1 ;
803803 }
804804
805- uintptr_t address_of_thread ;
805+ uintptr_t thread_state_addr ;
806806 pid_t this_tid = 0 ;
807807
808808 if (tid != 0 ) {
809809 bytes = read_memory (
810810 handle ,
811- address_of_interpreter_state + local_debug_offsets .interpreter_state .threads_head ,
811+ interpreter_state_addr + debug_offsets .interpreter_state .threads_head ,
812812 sizeof (void * ),
813- & address_of_thread );
813+ & thread_state_addr );
814814 if (bytes == -1 ) {
815815 return -1 ;
816816 }
817- while (address_of_thread != 0 ) {
817+ while (thread_state_addr != 0 ) {
818818 bytes = read_memory (
819819 handle ,
820- address_of_thread + local_debug_offsets .thread_state .native_thread_id ,
820+ thread_state_addr + debug_offsets .thread_state .native_thread_id ,
821821 sizeof (pid_t ),
822822 & this_tid );
823823 if (bytes == -1 ) {
@@ -830,33 +830,33 @@ send_exec_to_proc_handle(proc_handle_t *handle, int tid, const char *debugger_sc
830830
831831 bytes = read_memory (
832832 handle ,
833- address_of_thread + local_debug_offsets .thread_state .next ,
833+ thread_state_addr + debug_offsets .thread_state .next ,
834834 sizeof (void * ),
835- & address_of_thread );
835+ & thread_state_addr );
836836 if (bytes == -1 ) {
837837 return -1 ;
838838 }
839839 }
840840 } else {
841841 bytes = read_memory (
842842 handle ,
843- address_of_interpreter_state + local_debug_offsets .interpreter_state .threads_main ,
843+ interpreter_state_addr + debug_offsets .interpreter_state .threads_main ,
844844 sizeof (void * ),
845- & address_of_thread );
845+ & thread_state_addr );
846846 if (bytes == -1 ) {
847847 return -1 ;
848848 }
849849 }
850850
851- if (address_of_thread == 0 ) {
851+ if (thread_state_addr == 0 ) {
852852 PyErr_SetString (PyExc_RuntimeError , "No thread state found" );
853853 return -1 ;
854854 }
855855
856856 uintptr_t eval_breaker ;
857857 bytes = read_memory (
858858 handle ,
859- address_of_thread + local_debug_offsets .debugger_support .eval_breaker ,
859+ thread_state_addr + debug_offsets .debugger_support .eval_breaker ,
860860 sizeof (uintptr_t ),
861861 & eval_breaker );
862862 if (bytes == -1 ) {
@@ -866,16 +866,16 @@ send_exec_to_proc_handle(proc_handle_t *handle, int tid, const char *debugger_sc
866866 eval_breaker |= _PY_EVAL_PLEASE_STOP_BIT ;
867867
868868 // Ensure our path is not too long
869- if (local_debug_offsets .debugger_support .debugger_script_path_size <= strlen (debugger_script_path )) {
869+ if (debug_offsets .debugger_support .debugger_script_path_size <= strlen (debugger_script_path )) {
870870 PyErr_SetString (PyExc_ValueError , "Debugger script path is too long" );
871871 return -1 ;
872872 }
873873
874874 if (debugger_script_path != NULL ) {
875875 uintptr_t debugger_script_path_addr = (
876- address_of_thread +
877- local_debug_offsets .debugger_support .remote_debugger_support +
878- local_debug_offsets .debugger_support .debugger_script_path );
876+ thread_state_addr +
877+ debug_offsets .debugger_support .remote_debugger_support +
878+ debug_offsets .debugger_support .debugger_script_path );
879879 bytes = write_memory (
880880 handle ,
881881 debugger_script_path_addr ,
@@ -888,9 +888,9 @@ send_exec_to_proc_handle(proc_handle_t *handle, int tid, const char *debugger_sc
888888
889889 int pending_call = 1 ;
890890 uintptr_t debugger_pending_call_addr = (
891- address_of_thread +
892- local_debug_offsets .debugger_support .remote_debugger_support +
893- local_debug_offsets .debugger_support .debugger_pending_call );
891+ thread_state_addr +
892+ debug_offsets .debugger_support .remote_debugger_support +
893+ debug_offsets .debugger_support .debugger_pending_call );
894894 bytes = write_memory (
895895 handle ,
896896 debugger_pending_call_addr ,
@@ -903,7 +903,7 @@ send_exec_to_proc_handle(proc_handle_t *handle, int tid, const char *debugger_sc
903903
904904 bytes = write_memory (
905905 handle ,
906- address_of_thread + local_debug_offsets .debugger_support .eval_breaker ,
906+ thread_state_addr + debug_offsets .debugger_support .eval_breaker ,
907907 sizeof (uintptr_t ),
908908 & eval_breaker );
909909
@@ -913,7 +913,7 @@ send_exec_to_proc_handle(proc_handle_t *handle, int tid, const char *debugger_sc
913913
914914 bytes = read_memory (
915915 handle ,
916- address_of_thread + local_debug_offsets .debugger_support .eval_breaker ,
916+ thread_state_addr + debug_offsets .debugger_support .eval_breaker ,
917917 sizeof (uintptr_t ),
918918 & eval_breaker );
919919
0 commit comments