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 Thu, Dec 27, 2018 at 05:36:04PM +0000, Vladimir Sementsov-Ogievskiy wrote:
> 23.04.2018 16:28, Pedro Alves wrote:
> > On 04/23/2018 02:37 AM, 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?
> > 
> > Yeah, "frame <args>" has a lot of problems.
> > 
> > This series was working toward sorting out the "frame" command:
> > 
> >    https://sourceware.org/ml/gdb-patches/2015-09/msg00248.html
> > 
> > Follow the urls there for more background.
> > 
> > To me, the important questions to answer are here:
> >   https://sourceware.org/ml/gdb-patches/2015-09/msg00658.html
> > 
> > Unfortunately, I don't think the series moved past that point.
> > 
> > Thanks,
> > Pedro Alves
> > 
> 
> 
> Hi Pedro!
> 
> Hmm, returned to this topic. I've spent this day digging in gdb code, and found it much
> more difficult than qemu)..
> 
> I've failed to find something like
> 
> create_frame_with_registers, or create_thread_with_registers.. Looks like registers comes
> from some register caches, backed by different sources of registers or something like this.
> 
> So, I'd like to ask several questions:
> 
> 1. Any news on the topic since April?

Not on my side, sorry.

Stefan
signature.asc (application/pgp-signature, 455 B)
-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJcLMRDAAoJEJykq7OBq3PIzr0H/3JgxuOiiDz1UQqFYGH0k/Uk
2h78ERlQku+DoQJOZGOnip/btanxeFAUHEAdRK5Dr68wx/3rcDzQc/xW8Eq5TvIY
D0aiZItMluSJjhXS002k9otMZcrpcKnma4ztGFdJjlnrjq7+5dV/iAqKj7hulmTR
xkV6lnzsvNE1XxMWJmVxWxGA4mD9F0NI/j4nlh92qKQvdmigjlCyn4qfVGQifTYc
T70Pdm15XayROMuE0+f+9K+LecTrOJhHUAWDL3C5R9OpJRCzCar5DX6f9j6pIBAT
2CE6Kn0IYldoSIqcNgP7JgLwtzLRUKZmx7CuOZsiwt2g3u2o3+Rk2SjwDhu97h4=
=1cbv
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.