* Markus Armbruster (arm...@redhat.com) wrote: > "Dr. David Alan Gilbert" <dgilb...@redhat.com> writes: > > > * Markus Armbruster (arm...@redhat.com) wrote: > >> Suraj Jitindar Singh <sjitindarsi...@gmail.com> writes: > >> > >> > Add a monitor command "dump-stack" to be used to dump the stack for the > >> > current cpu. > >> > >> I guess this is just for debugging. Correct? > >> > >> Shouldn't this be "info stack", to match "info registers" and "info > >> cpustats"? > > > > Since this is primarily about walking the guests stack frames and not > > walking qemu internal data structures, I think it's probably OK to be > > a dump-stack rather than an info subcommand. > > Well, "info registers" is also about the guest's state and not QEMU > internal state. Arguably, so are "info pic", "info tlb", ...
When doing an 'info registers' you don't have to interpret or parse much guest state, you just print it, and it's guest state that's held separately (similarly a separate piece of state for info pic, info tlb etc). You might check the register state a little when you decide which bits to print or how to format them, but that's about as far as it goes. So each of the 'info's (or query for qmp) correspond to one logical chunk of qemu and/or guest state. Printing a stack is a much hairier thing, with knowledge of guest stack layout and potentially some heuristics. > We have a long-standing tradition of using "info" for "pure" > information-retrieving commands. I rather like that pattern. > > Ultimately your choice as the HMP maintainer, of course. Dave -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK