Re: [Qemu-devel] [PATCH] scripts/qemugdb: support coroutine backtrace in coredumps
Stefan Hajnoczi <[email protected]>
| Newsgroups | gmane.comp.gdb.devel,gmane.comp.emulators.qemu |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Apr 22, 2018 at 09:37:52PM -0400, Simon Marchi wrote: > On 2018-04-09 10:08 PM, Stefan Hajnoczi wrote: > > I wonder what the point of select-frame is then... > > > > I have CCed the GDB mailing list. Maybe someone can help us. Context: > > > > QEMU implements coroutines using jmpbuf. We'd like to print coroutine > > call stacks in GDB and have a script that works when a process is being > > debugged (it sets the registers). > > > > Now we'd like to extend the script to work on core dumps where it's not > > possible to set registers (since there is no process being debugged). > > > > Is there a way to backtrace an arbitrary call stack in a core dump? > > Not that I know of. The "frame <stack-addr> <pc-addr>" form of the frame > command sounds like it should be usable to achieve that, but it doesn't > seem to work in that way. I really wonder if it's working as it was > intended initially. I guess using that form of the frame command should > override/mask the real current values of $sp and $pc? Yes, that is what I was expecting. Vladimir has a script to copy the coredump file and manipulate the registers on disk, but it would be nicer to do stack-switching inside the GDB session without needing to create another coredump file. Vladimir: Would you like to write a GDB patch? If GDB is fixed then workaround won't be necessary. Stefan
signature.asc
(application/pgp-signature, 455 B)
-----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJa3ahuAAoJEJykq7OBq3PIuW8H/1yx3zAPxYSQ6//Huef03zxK E5ewTnfJ17XpGtRPnZWycNHLHNpS2vxi8mWG84pDy2xwUldT1x5+6zZclX5F6EoV w+CXdhlRN4UkezHFex2NyxTCscAMkU1TG5kgRni2PYV1LFVfI650+7WsnnaII+DL M0/9q78YGlh3AX+2Pnh+hwpRpTrElIo2cLsR4Mn7hek9zynF2cAb5P4r6iS+AzLG E+fNOyqjcKqOkgJzU650y0xipToNFWHHv4vADeLNm+Ud/EkJlY2aHTj/dCbWYj/d ZQ/Rf26Li0pLJpS/nOhlYd+Z1iBJRnSiqYkqgwKb/SLHBNnabVxKBRXC45TFtdI= =NA7j -----END PGP SIGNATURE-----