[RFA] new command: maintenance print target-stack

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[RFA] new command: maintenance print target-stack

Joel Brobecker
Hello,

I proposed the addition of a new maintenance command a few months ago:
    http://www.sourceware.org/ml/gdb-patches/2006-10/msg00204.html

Only a couple of people answered, but both were positive. So I now
more formally propose the inclusion of this patch.

|While working to "auto-solib-add", I found that I was very frequently
|in need to dumping the current target stack (I just need the names),
|to see if the multi-thread layer has been pushed or not. So I
|implemented a new "maintenance" command, hoping that others might
|find it useful.
|
|        (gdb) maintenance print target-stack
|        The current target stack is:
|          - multi-thread (multi-threaded child process.)
|          - child (Unix child process)
|          - exec (Local exec file)
|          - None (None)
|
|Opinions? Eventually, we might want to actually dump more
|information if that's useful to others, but that's a start.
|

2007-01-24  Joel Brobecker  <[hidden email]>

        * target.c (maintenance_print_target_stack): New function.
        (initialize_targets): Add new "maintenance print target-stack"
        command.

Tested on x86-linux just to make sure, no regression. I will of course
provide documentation for this if the idea is accepted.

OK to apply?

Thanks,
--
Joel

target.c.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] new command: maintenance print target-stack

Eli Zaretskii
> Date: Tue, 23 Jan 2007 20:12:55 -0500
> From: Joel Brobecker <[hidden email]>
>
> I proposed the addition of a new maintenance command a few months ago:
>     http://www.sourceware.org/ml/gdb-patches/2006-10/msg00204.html
>
> Only a couple of people answered, but both were positive. So I now
> more formally propose the inclusion of this patch.

At the time, you also promised to write a suitable patch for the
manual.  What happened to that promise now? ;-)
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] new command: maintenance print target-stack

Joel Brobecker
> > I proposed the addition of a new maintenance command a few months ago:
> >     http://www.sourceware.org/ml/gdb-patches/2006-10/msg00204.html
> >
> > Only a couple of people answered, but both were positive. So I now
> > more formally propose the inclusion of this patch.
>
> At the time, you also promised to write a suitable patch for the
> manual.  What happened to that promise now? ;-)

Did I really promise some doco as well? Must have been a moment of
weakness... ;-)

No worries about the documentation. I promise (again!) that I will write
something as soon as the patch is finalized and checked in (that way,
I'm sure I document what gets checked in).

--
Joel
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] new command: maintenance print target-stack

Eli Zaretskii
> Date: Wed, 24 Jan 2007 11:20:36 -0500
> From: Joel Brobecker <[hidden email]>
> Cc: [hidden email]
>
> Did I really promise some doco as well? Must have been a moment of
> weakness... ;-)

Yes, it did sound strange ;-)

> No worries about the documentation. I promise (again!) that I will write
> something as soon as the patch is finalized and checked in (that way,
> I'm sure I document what gets checked in).

I'd really, really ask not to check in code without the docs to
accompany it.  I'd like to avoid even the slightest chance that a
snapshot gets tarred and fetched by someone between the code and the
documentation checkins.

If you want to wait with the documentation until the code is approved,
it's fine by me, but please at that time post a unified patch that
includes both the code and doco, and commit both after my approval.

TIA
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] new command: maintenance print target-stack

Joel Brobecker
> If you want to wait with the documentation until the code is approved,
> it's fine by me, but please at that time post a unified patch that
> includes both the code and doco, and commit both after my approval.

Sure, you got it.

--
Joel
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] new command: maintenance print target-stack

Daniel Jacobowitz-2
In reply to this post by Joel Brobecker
On Tue, Jan 23, 2007 at 08:12:55PM -0500, Joel Brobecker wrote:
> 2007-01-24  Joel Brobecker  <[hidden email]>
>
>         * target.c (maintenance_print_target_stack): New function.
>         (initialize_targets): Add new "maintenance print target-stack"
>         command.

OK, with documentation.

--
Daniel Jacobowitz
CodeSourcery
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] new command: maintenance print target-stack

Joel Brobecker
> > 2007-01-24  Joel Brobecker  <[hidden email]>
> >
> >         * target.c (maintenance_print_target_stack): New function.
> >         (initialize_targets): Add new "maintenance print target-stack"
> >         command.
>
> OK, with documentation.

Thanks, Daniel.

Eli,

Here is a first cut at documenting this new command.

2007-01-25  Joel Brobecker  <[hidden email]>

        * gdb.texinfo (Maintenance Commands): Add documentation for
        the new "maint print target-stack" command.

Would that be ok?

Thanks,
--
Joel

targ.diff (772 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] new command: maintenance print target-stack

Eli Zaretskii
> Date: Thu, 25 Jan 2007 18:58:57 -0500
> From: Joel Brobecker <[hidden email]>
>  
> +@kindex maint print target-stack
> +@cindex target stack description
> +@item maint print target-stack
> +Print a short description of each layer that was pushed on the target stack,
> +starting from the top stack down to the bottom one.

This is okay, except that the term "target stack", and what is pushed
onto it, is not explained anywhere in the manual, not even in
gdbint.texinfo.  Can you add a sentence or two saying what it is?

Also, the first usage of "target stack" should be in @dfn, which is
our way of saying that this is a new term.

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] new command: maintenance print target-stack

Joel Brobecker
> This is okay, except that the term "target stack", and what is pushed
> onto it, is not explained anywhere in the manual, not even in
> gdbint.texinfo.  Can you add a sentence or two saying what it is?
>
> Also, the first usage of "target stack" should be in @dfn, which is
> our way of saying that this is a new term.

Good points. I was lucky to find something in target.h, so I shamelessly
copied it. How does this look?

2007-01-26  Joel Brobecker  <[hidden email]>

        * gdb.texinfo (Maintenance Commands): Add documentation for
        the new "maint print target-stack" command.

--
Joel

doco.diff (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] new command: maintenance print target-stack

Eli Zaretskii
> Date: Fri, 26 Jan 2007 16:59:17 -0500
> From: Joel Brobecker <[hidden email]>
> Cc: [hidden email]
>
> Good points. I was lucky to find something in target.h, so I shamelessly
> copied it. How does this look?

This is okay, thanks.
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] new command: maintenance print target-stack

Joel Brobecker
In reply to this post by Daniel Jacobowitz-2
> > 2007-01-24  Joel Brobecker  <[hidden email]>
> >
> >         * target.c (maintenance_print_target_stack): New function.
> >         (initialize_targets): Add new "maintenance print target-stack"
> >         command.
>
> OK, with documentation.

Thanks Daniel. Both code and documentation checked in.

--
Joel
Reply | Threaded
Open this post in threaded view
|

Re: [RFA] new command: maintenance print target-stack

Joel Brobecker
In reply to this post by Eli Zaretskii
> > Good points. I was lucky to find something in target.h, so I shamelessly
> > copied it. How does this look?
>
> This is okay, thanks.

Thanks Eli. Checked in.

--
Joel