Unclear that you need to reanalyze between setting a property and getting it back
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- documentation
Direzione di ricerca
Inizia con docs/dev/concepts.md e docs/guide/index.md, poi esamina l’esempio citato nell’issue #2295 per capire cosa resta poco chiaro. Chiarisci come si comporta la lettura delle proprietà dopo una scrittura e prima dell’esecuzione dell’analisi, soprattutto negli script Python, e spiega quando chiamare bv.update_analysis_and_wait() o current_function.reanalyze(). Il lavoro è completato quando i lettori riescono a capire perché una lettura può restituire il valore precedente e come ottenere quello aggiornato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is this a general concept that needs to be documented or a specific API?
Large set of API properties/functions
What concept or API needs more documentation?
In many cases, if you set a property and then read it back, you get the old value; the new value only shows up after running analysis.
For example, if I run this as a single console command:
>>> print(current_function.type); current_function.type = 'int(void *)'; print(current_function.type)
I get the same type twice:
void(int32_t arg1, char** arg2) __noreturn
void(int32_t arg1, char** arg2) __noreturn
After running the command, the UI automatically reanalyzes, so if I then run:
>>> print(current_function.type)
I get the new one:
int32_t(void* arg1)
This is apparently by design, and it is documented, but the documentation is very vague.
docs/dev/concepts.md says:
This is a convenience the UI does for you just like if you were to change a type or create a function, you almost always want the analysis to be updated. However, in scripts you run yourself as plugins or via the "Run Script" command, you may not get the same results mid-execution until after the entire script is finished running.
This says you "want the analysis to be updated" and "may not get the same results", but it doesn't say how the results differ. I would have expected that updating the analysis would be necessary for the change to propagate to other parts of the binary, perhaps necessary for it to appear in the decompilation; I wouldn't have expected it to be necessary merely to read the thing I just wrote.
Likewise, docs/guide/index.md says:
When you run commands in the scripting console, the UI will automatically update analysis. This is because quite often when you make a change in the console you expect it to be immediately reflected in the UI. The same is not true when running a script where you must trigger
bv.update_analysis_and_wait()orcurrent_function.reanalyze()to experience the same behavior.
This makes it sound like skipping reanalysis only prevents changes from appearing "in the UI".
I don't know if there is other documentation I'm missing, but if not, this should be clarified.
Is this documentation related to a specific API?
Affects all, but especially Python where these properties are getters and setters (affecting user expectations).
Are there any known examples of people using this API/concept?
#2295 is an example of someone getting confused by this.
- Lingua principale
- C++
- Stelle
- 1.3k
- Fork
- 304
- Merge medio
- 2g 20h
- PR unite (30g)
- 10
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 Vector35/binaryninja-api
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
Vector35/binaryninja-api#8715 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Vector35/binaryninja-api#8714 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
Vector35/binaryninja-api#8713 ·
I maintainer di solito rispondono entro 2 giorni
-
Component: Python API
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Vector35/binaryninja-api#8649 ·
I maintainer di solito rispondono entro 2 giorni
-
Hexagon lifting issuesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Vector35/binaryninja-api#8621 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di Vector35/binaryninja-api
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
ESPresense/ESPresense#2680 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 75/100
stew675/llama-cpp-rdna-boosts#348 ·
I maintainer di solito rispondono entro 1 giorno
-
Documentation: Add comprehensive newcomer onboarding guide, project structure, and local usage to READMEForse già presa @Ash-Blanc l’ha presa oggi. Apertaarea/other status/bot-triaged status/need-triage
Difficoltà 2/5 Mezza giornata Idoneità per principianti 85/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno