Qiling gdbserver not handling stepi instruction
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- devtools, reverse-engineering
Direzione di ricerca
Start in gdb.py at handle_s and reproduce the issue by using the si command against an example. Check the gdbserver response after single-stepping and verify that an active emulation returns SIGTRAP rather than SIGTERM. Also investigate whether the same condition affects breakpoint handling, as reported but not confirmed in the issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
The gdbserver is sending a SIGTERM each time I perform the si command and this cause my gdbclient to consider the program exited although it's not.
Sample Code
Not related to any particular code, would happen with all examples.
Expected behavior
I think that the gdbserver should send the SIGTRAP signal instead.
Addtionnal context
I debugged a bit the gdbserver and I think that the cause is below : in gdb.py
def handle_s(subcmd: str) -> Reply:
"""Perform a single step.
"""
self.gdb.resume_emu(steps=1)
# if emulation has been stopped, signal program termination
# ===== The condition is always True ===
if self.ql.emu_state is QL_STATE.STOPPED:
return f'S{SIGTERM:02x}'
# ====================================================================
# otherwise, this is just single stepping
return f'S{SIGTRAP:02x}'
Wonder if this condition is useful in a particular case that is not related to mine. I've tested to comment these two lines and everything works perfectly fine after that. I think it also causes other bugs with breakpoint but not so sure and didn't have the time to verify this point.
Additional context
I worked with the dev branch.
- Lingua principale
- Python
- Stelle
- 6.2k
- Fork
- 806
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
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 qilingframework/qiling
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
qilingframework/qiling#1690 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
qilingframework/qiling#1689 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
qilingframework/qiling#1688 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
qilingframework/qiling#1686 ·
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 82/100
qilingframework/qiling#1640 ·
Tutte le issue di qilingframework/qiling
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
huggingface/datasets#9128 ·
I maintainer di solito rispondono entro 1 giorno
-
priority:low ready-for-dev
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenHands/extensions#975 ·
I maintainer di solito rispondono entro 1 giorno
-
Function/dict state handlers can't supply provider-state injected values (`generate.provider_state`)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pact-foundation/pact-python#1789 ·
I maintainer di solito rispondono entro 9 giorni
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
juandresrodca/AdminForge#66 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno