can't find method
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 30/100
Direzione di ricerca
Start by reproducing pyc-xasm --pyc-file test .\compiled_code.pyasm with the supplied Python 3.9 bytecode and inspect how the method and constant entries are handled. Done means the greet method is recognized rather than reported as bogus and the sample disassembly is processed successfully.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I got this problem: can't find method greet
appending bogus greet to list of constants
when running pyc-xasm --pyc-file test .\compiled_code.pyasm
this is the code that generated compiled_code.pyasm
source_code = """
def greet():
print("Hello, world!")
"""
compiled_code = compile(source_code, "<string>", "exec")
pyc_file = "compiled_code.pyasm"
with open(pyc_file, "w") as file:
xdis.std.disassemble(compiled_code, file=file)
and this is the compiled_code:
# pydisasm version 6.0.5
# Python bytecode 3.9 ()
# Disassembled from Python 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)]
# Method Name: <module>
# Filename: <string>
# Argument count: 0
# Position-only argument count: 0
# Keyword-only arguments: 0
# Number of locals: 0
# Stack size: 2
# Flags: 0x00000040 (NOFREE)
# First Line: 2
# Constants:
# 0: <code object greet at 0x000002028CC845B0, file "<string>", line 2>
# 1: 'greet'
# 2: None
# Names:
# 0: greet
2: 0 LOAD_CONST (<code object greet at 0x000002028CC845B0, file "<string>", line 2>)
2 LOAD_CONST ('greet')
4 MAKE_FUNCTION (Neither defaults, keyword-only args, annotations, nor closures)
6 STORE_NAME (greet)
8 LOAD_CONST (None)
10 RETURN_VALUE
# Method Name: greet
# Filename: <string>
# Argument count: 0
# Position-only argument count: 0
# Keyword-only arguments: 0
# Number of locals: 0
# Stack size: 2
# Flags: 0x00000043 (NOFREE | NEWLOCALS | OPTIMIZED)
# First Line: 2
# Constants:
# 0: None
# 1: 'Hello, world!'
# Names:
# 0: print
3: 0 LOAD_GLOBAL (print)
2 LOAD_CONST ('Hello, world!')
4 CALL_FUNCTION 1
6 POP_TOP
8 LOAD_CONST (None)
10 RETURN_VALUE
- Lingua principale
- Python
- Stelle
- 119
- Fork
- 13
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rocky/python-xasm
-
Volunteer wanted to fix
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
rocky/python-xasm#5 ·
Tutte le issue di rocky/python-xasm
Issue simili
-
triage/confirmed
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
apache/cloudstack#14222 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100