summaryrefslogtreecommitdiffstats
path: root/scripts/qemugdb/coroutine.py
Commit message (Collapse)AuthorAgeFilesLines
* qemugdb/coroutine: fix arch_prctl has unknown return typeVladimir Sementsov-Ogievskiy2019-02-121-1/+1
| | | | | | | | | | | | | | | | | | qemu coroutine command results in following error output: Python Exception <class 'gdb.error'> 'arch_prctl' has unknown return type; cast the call to its declared return type: Error occurred in Python command: 'arch_prctl' has unknown return type; cast the call to its declared return type Fix it by giving it what it wants: arch_prctl return type. Information on the topic: https://sourceware.org/gdb/onlinedocs/gdb/Calling.html Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190206151425.105871-1-vsementsov@virtuozzo.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-gdb: add $qemu_coroutine_sp and $qemu_coroutine_pcPaolo Bonzini2015-10-291-0/+16
| | | | | | | | | These can be useful to manually get a stack trace of a coroutine inside a core dump. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1444636974-19950-4-git-send-email-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-gdb: extract parts of "qemu coroutine" implementationPaolo Bonzini2015-10-291-29/+27Star
| | | | | | | | Provide useful Python functions to reach and decipher a jmpbuf. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1444636974-19950-3-git-send-email-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qemu-gdb: allow using glibc_pointer_guard() on core dumpsPaolo Bonzini2015-10-291-2/+16
| | | | | | | | | | | | | | | | | get_fs_base() cannot be run on a core dump, because it uses the arch_prctl system call. The fs base is the value that is returned by pthread_self(), and it would be nice to just glean it from the "info threads" output: * 1 Thread 0x7f16a3fff700 (LWP 33642) pthread_cond_wait@@GLIBC_2.3.2 () ^^^^^^^^^^^^^^ but unfortunately the gdb API does not provide that. Instead, we can look for the "arg" argument of the start_thread function if glibc debug information are available. If not, fall back to the old mechanism. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1444636974-19950-2-git-send-email-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* scripts/qemu-gdb: Split CoroutineCommand into its own filePeter Maydell2015-09-111-0/+91
Split the implementation of CoroutineCommand into its own file. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1439574392-4403-3-git-send-email-peter.maydell@linaro.org