ó
    „ñ:iw!  ã                   óŽ  • S SK r S SKrS SKJr  S SKJrJrJrJrJ	r	  S SK
JrJrJr  S SKJrJr  \ R"                  R%                  \5      r\R*                  r\R/                  S5      =(       d    \R/                  S5      =(       d    S\;   rSS	 jr\" \5      S
 5       r\" \5      S 5       r SS jrS r\" \5      S 5       rS rg)é    N)Úir)ÚtypesÚutilsÚconfigÚcgutilsÚerrors)ÚgdbÚgdb_initÚgdb_breakpoint)ÚoverloadÚ	intrinsicÚlinuxÚdarwinÚbsdc                 ó¦  • [         (       d  Sn[        R                  " U5      e[        R                  n[
        R                  R                  U5      (       a$  [
        R                  R                  U5      (       d  Sn[        U[        R                  -  5      e[
        R                  R                  [
        R                  SSSSS5      n[
        R                  R                  U5      nU(       aO  [        US5       nUR                  5       R                  5       nS	S	S	5        U (       a  WS
;  a  Sn[        U5      eg	g	g	! , (       d  f       N+= f)a.  
Set need_ptrace_attach to True/False to indicate whether the ptrace attach
permission is needed for this gdb use case. Mode 0 (classic) or 1
(restricted ptrace) is required if need_ptrace_attach is True. See:
https://www.kernel.org/doc/Documentation/admin-guide/LSM/Yama.rst
for details on the modes.
z2gdb support is only available on unix-like systemsz¸Is gdb present? Location specified (%s) does not exist. The gdb binary location can be set using Numba configuration, see: https://numba.readthedocs.io/en/stable/reference/envvars.htmlÚprocÚsysÚkernelÚyamaÚptrace_scopeÚrtN)Ú0Ú1a  gdb can launch but cannot attach to the executing program because ptrace permissions have been restricted at the system level by the Linux security module 'Yama'.

Documentation for this module and the security implications of making changes to its behaviour can be found in the Linux Kernel documentation https://www.kernel.org/doc/Documentation/admin-guide/LSM/Yama.rst

Documentation on how to adjust the behaviour of Yama on Ubuntu Linux with regards to 'ptrace_scope' can be found here https://wiki.ubuntu.com/Security/Features#ptrace.)Ú
_unix_liker   ÚNumbaRuntimeErrorr   Ú
GDB_BINARYÚosÚpathÚexistsÚisfileÚRuntimeErrorÚjoinÚsepÚopenÚreadlineÚstrip)Úneed_ptrace_attachÚmsgÚgdblocÚptrace_scope_fileÚhas_ptrace_scopeÚfÚvalues          ÚV/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/numba/misc/gdb_hook.pyÚ_confirm_gdbr/      s  € ÷ Š:ØBˆÜ×&Ò& sÓ+Ð+Ü×Ñ€FÜ�G‰G�N‰N˜6×"Ñ"¤r§w¡w§~¡~°f×'=Ñ'=ðOˆô ˜3¤×!2Ñ!2Ñ2Ó3Ð3ô Ÿ™Ÿ™¤R§V¡V¨V°U¸HÀfØ%3ó5Ðä—w‘w—~‘~Ð&7Ó8ÐÞÜÐ# TÔ*¨aØ—J‘J“L×&Ñ&Ó(ˆE÷ +æ %¨zÓ"9ð
GˆCô ˜sÓ#Ð#ð #:Ðð ß*Õ*ús   Ã>EÅ
Ec                  ó@   ^• [        5         [        U S5      mU4S jnU$ )NTc                  ó   >• T" 5         g ©N© ©ÚargsÚgdbimpls    €r.   ÚimplÚhook_gdb.<locals>.implA   ó   ø€ Ù�	ó    ©r/   Úgen_gdb_impl©r5   r7   r6   s     @r.   Úhook_gdbr>   <   s   ø€ ä„NÜ˜4 Ó&€Gõà€Kr:   c                  ó@   ^• [        5         [        U S5      mU4S jnU$ )NFc                  ó   >• T" 5         g r2   r3   r4   s    €r.   r7   Úhook_gdb_init.<locals>.implK   r9   r:   r;   r=   s     @r.   Úhook_gdb_initrB   F   s   ø€ ä„NÜ˜4 Ó'€Gõà€Kr:   c           	      ó~  • [         R                  " S5      n[         R                  " S5      n[         R                  " [        R                  5      n[         R                  " [         R                  " S5      5      n	U" S5      n
UR
                  n[        R                  " XSS9n[        R                  " XSS9nU R                  US5      nU R                  U[        R                  5      nU R                  US5      n/ nUR                  S	[        R                  R                  [        S
5      /5        UR                  SS/5        [!        U Vs/ s H"  n[#        U[$        R&                  5      (       + PM$     sn5      (       a  [(        R*                  " U5      eUR                  U Vs/ s H  nUR,                  PM     sn5        U Vs/ s H  nU R                  UU5      PM     nn[         R.                  " U[1        5       5      n[        R2                  " UUS5      n[         R.                  " XyX‰4SS9n[        R2                  " UUS5      n[         R.                  " U[1        5       5      n[        R2                  " UUS5      n[         R.                  " XyU	4SS9n[        R2                  " UUS5      n[         R.                  " Xw45      n[        R2                  " UUS5      n[         R.                  " [         R4                  " 5       [1        5       5      n[        R2                  " UUS5      nUR7                  U[1        5       5      nUR9                  UU5        UR;                  XÚ/SS9nUR=                  U5      nUR7                  UUU" S5      UU45      nUR?                  SUU" S5      5      nURA                  USS9   Sn U RB                  RE                  U[F        U 45        S S S 5        UR7                  U[1        5       5      n!UR?                  SU!U" S5      5      n"URA                  U"SS9   Sn U RB                  RE                  U[F        U 45        S S S 5        UR?                  SU!U
5      n#URI                  U#5       u  n$n%U$   [         RJ                  " U	S 5      n&UR;                  Xú/SS9n'UR;                  UU
/SS9n([        RL                  " USU5        U'U'U(U4n)U)[1        U5      -   U&4-   n)UR7                  UU)5        S S S 5        U%   UR7                  UU" S5      45        USL a  UR7                  U[1        5       5        S S S 5        S S S 5        g s  snf s  snf s  snf ! , (       d  f       GN‰= f! , (       d  f       GN+= f! , (       d  f       N�= f! , (       d  f       N[= f! , (       d  f       g = f)Né   é    r   é   )Úsizeé   z%dÚattachz-xzcmdlang.gdbz-exÚcÚgetpidT)Úvar_argÚsnprintfÚforkÚexeclÚsleepÚnumba_gdb_breakpoint)ÚinboundsÚ>F)Úlikelyz8Internal error: `snprintf` buffer would have overflowed.z==éÿÿÿÿzInternal error: `fork` failed.zAttaching to PID: %s
é
   )'r   ÚIntTyper   ÚMACHINE_BITSÚPointerTypeÚmoduler   Úalloca_onceÚinsert_const_stringr   r   Úextendr   r   r"   Ú_pathÚanyÚ
isinstancer   ÚStringLiteralr   ÚRequireLiteralValueÚliteral_valueÚFunctionTypeÚtupleÚget_or_insert_functionÚVoidTypeÚcallÚstoreÚgepÚloadÚicmp_signedÚif_thenÚ	call_convÚreturn_user_excr!   Úif_elseÚConstantÚprintf)*ÚcgctxÚbuilderÚ	signaturer5   Ú
const_argsÚdo_breakÚint8_tÚint32_tÚintp_tÚchar_ptrÚ	zero_i32tÚmodÚpidÚpidstrÚintfmtÚgdb_strÚ
attach_strÚnew_argsÚxÚcmdlangÚfntyrK   rM   rN   rO   rP   Ú
breakpointÚ
parent_pidÚ
pidstr_ptrÚpid_valÚstatÚinvalid_writer(   Ú	child_pidÚfork_failedÚis_childÚthenÚorelseÚnullptrÚgdb_str_ptrÚattach_str_ptrÚbufs*                                             r.   Úinit_gdb_codegenr–   P   sº  € ô �ZŠZ˜‹]€FÜ�jŠj˜‹n€GÜ�ZŠZœ×*Ñ*Ó+€FÜ�~Š~œbŸjšj¨›mÓ,€HÙ˜“
€Ià
�.‰.€CÜ
×
Ò
˜g°QÑ
7€Cô × Ò  °rÑ:€Fð ×&Ñ& s¨DÓ1€FØ×'Ñ'¨¬V×->Ñ->Ó?€GØ×*Ñ*¨3°Ó9€Jà€Hð
 ‡O�O�Tœ2Ÿ7™7Ÿ<™<¬¨}Ó=Ð>Ô?à‡O�O�U˜C�LÔ!ä
¹JÓGºJ°q”
˜1œe×1Ñ1Ó2×2¹JÑG×HÑHÜ×(Ò(¨Ó4Ð4Ø‡O�O©jÓ9ªj¨�Q—_”_©jÑ9Ô:Ù:BÓCº(°Qˆu×(Ñ(¨¨aÖ0¹(€GÐCô �?Š?˜7¤E£GÓ,€DÜ×+Ò+¨C°°xÓ@€Fô �?Š?Ø˜FÐ-°tñ=€Dä×-Ò-¨c°4¸ÓD€Hô �?Š?˜7¤E£GÓ,€DÜ×)Ò)¨#¨t°VÓ<€Dô �?Š?˜7¨xÐ$8À$ÑG€DÜ×*Ò*¨3°°gÓ>€Eô �?Š?˜7 JÓ/€DÜ×*Ò*¨3°°gÓ>€Eô �?Š?œ2Ÿ;š;›=¬%«'Ó2€DÜ×/Ò/°°TØ0FóH€Jð —‘˜f¤e£gÓ.€JØ‡M�M�*˜cÔ"Ø—‘˜V [¸4�Ð@€JØ�l‰l˜3Ó€Gð �<‰<Ø�:™v b›z¨6°7Ð;ó=€Dà×'Ñ'¨¨T±7¸2³;Ó?€MØ	�‰˜¨uˆÒ	5ØHˆØ�‰×'Ñ'¨´À¸vÔF÷ 
6ð
 —‘˜T¤5£7Ó+€IØ×%Ñ% d¨I±w¸r³{ÓC€KØ	�‰˜¨UˆÒ	3Ø.ˆØ�‰×'Ñ'¨´À¸vÔF÷ 
4ð ×"Ñ" 4¨°IÓ>€HØ	�‰˜Ô	"¡n t¨VÚä—k’k (¨DÓ1ˆGØ!Ÿ+™+Ø˜¨tð &ð 5ˆKà$Ÿ[™[Ø˜Y˜K°$ð )ð 8ˆNä�NŠNØÐ1°6ô;ð ØØØð	ˆCð
 œ˜g›Ñ&¨'¨Ñ3ˆCØ�L‰L˜ Ô$÷ ò  à�L‰L˜¡¨£ Ô/à˜4ÒØ—‘˜Z¬«Ô1÷ ÷# 
#Ð	"ùòm Hùâ9ùÚC÷N 
6Ö	5ú÷ 
4Ö	3ú÷ �Tú÷  �Vú÷# 
#Õ	"úsg   Å)UÆ*UÇU#Ï%U(Ð1%U:ÒV.ÒA=VÔ
V.Ô9VÕV.Õ(
U7Õ:
V	Ö
V	ÖV.Ö
V+	Ö'V.Ö.
V<c                 ó*   ^ ^• [         U U4S j5       nU$ )Nc                 óB   >• [         R                  " 5       nUU4S jnX4$ )Nc           	      ó\   >• [        XX#TTS9  U R                  [        R                  S 5      $ )N)rw   )r–   Úget_constantr   Únone)rs   rt   ru   r5   rv   rw   s       €€r.   ÚcodegenÚ3gen_gdb_impl.<locals>.gdb_internal.<locals>.codegenÁ   s+   ø€ Ü˜U¨Y¸jØ&.ò0à×%Ñ%¤e§j¡j°$Ó7Ð7r:   ©r   Úvoid)ÚtyctxÚfunction_sigrœ   rv   rw   s      €€r.   Úgdb_internalÚ"gen_gdb_impl.<locals>.gdb_internal½   s   ø€ ä—z’z“|ˆö	8ð Ð$Ð$r:   ©r   )rv   rw   r¢   s   `` r.   r<   r<   ¼   s   ù€ Üõ%ó ð%ð Ðr:   c                  ó†   ^• [         R                  R                  S5      (       d  [        S5      e[	        5       mU4S jn U $ )z,
Adds the Numba break point into the source
r   zgdb is only available on linuxc                  ó   >• T " 5         g r2   r3   )Úbp_impls   €r.   r7   Ú!hook_gdb_breakpoint.<locals>.implÒ   r9   r:   )r   ÚplatformÚ
startswithr!   Úgen_bp_impl)r7   r§   s    @r.   Úhook_gdb_breakpointr¬   É   s7   ø€ ô
 �<‰<×"Ñ" 7×+Ñ+ÜÐ;Ó<Ð<Ü‹m€Gõà€Kr:   c                  ó   • [         S 5       n U $ )Nc                 ó8   • [         R                  " 5       nS nX4$ )Nc                 ó   • UR                   n[        R                  " [        R                  " 5       [	        5       5      n[
        R                  " XES5      nUR                  U[	        5       5        U R                  [        R                  S 5      $ )NrQ   )rZ   r   rd   rg   re   r   rf   rh   rš   r   r›   )rs   rt   ru   r5   r}   r†   r‡   s          r.   rœ   Ú1gen_bp_impl.<locals>.bp_internal.<locals>.codegenÜ   s`   € Ø—.‘.ˆCÜ—?’?¤2§;¢;£=´%³'Ó:ˆDÜ ×7Ò7¸Ø8NóPˆJà�L‰L˜¤U£WÔ-Ø×%Ñ%¤e§j¡j°$Ó7Ð7r:   rž   )r    r¡   rœ   s      r.   Úbp_internalÚ gen_bp_impl.<locals>.bp_internalØ   s   € ä—z’z“|ˆò	8ð Ð$Ð$r:   r¤   )r±   s    r.   r«   r«   ×   s   € Üñ
%ó ð
%ð Ðr:   )T)F) r   r   Úllvmliter   Ú
numba.corer   r   r   r   r   Únumbar	   r
   r   Únumba.core.extendingr   r   r   ÚdirnameÚ__file__r^   r©   Ú	_platformrª   r   r/   r>   rB   r–   r<   r¬   r«   r3   r:   r.   Ú<module>rº      sÑ   ðÛ 	Û 
å ç <Õ <ß /Ñ /ß 4à
�‰�‰˜Ó!€à�L‰L€	Ø×"Ñ" 7Ó+÷ #Ø×"Ñ" 8Ó,÷#à˜	Ñ!ð ô
'$ñT 
ˆ#ƒñó ðñ 
ˆ(Óñó ðð +0ôi2òX
ñ 
ˆ.Óñ
ó ð
ór:   