Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Vladimir Prus <vladimir@codesourcery.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org,  Eli Zaretskii <eliz@gnu.org>,
	 Marc Khouzam <marc.khouzam@ericsson.com>
Subject: Re: [v4 2/2] multi-executable support (new v5 patch included)
Date: Wed, 09 Sep 2009 06:40:00 -0000	[thread overview]
Message-ID: <200909091040.23991.vladimir@codesourcery.com> (raw)
In-Reply-To: <200909081616.18200.pedro@codesourcery.com>

On Tuesday 08 September 2009 Pedro Alves wrote:

> OTOH, if this sounds confusing to you, it's almost certain
> it will sound confusing to most users too.  I'm one of those that
> needs to try and get a feel for things, so, i've spent a bit
> reworking things around to implement that add-inferior model, and
> here's what we have now:
> 
> >./gdb ./gdb
> (top-gdb) info inferiors
>   Num  Description       Executable
> * 1    <null>            /home/pedro/gdb/sspaces/build/gdb/gdb
> 
> (top-gdb) info inferiors
>   Num  Description       Executable
> * 1    process 1429      /home/pedro/gdb/sspaces/build/gdb/gdb
> 
> (top-gdb) kill
> Kill the program being debugged? (y or n) y
> (top-gdb) info inferiors
>   Num  Description       Executable
> * 1    <null>            /home/pedro/gdb/sspaces/build/gdb/gdb
> 
> (top-gdb) add-inferior
> Added inferior 2
> 1 inferiors added.
> 
> (top-gdb) info inferiors
>   Num  Description       Executable
>   2    <null>
> * 1    <null>            /home/pedro/gdb/sspaces/build/gdb/gdb
> 
> (top-gdb) inferior 2
> [Switching to inferior 2 [process 0] (<noexec>)]
> 
> (top-gdb) file /home/pedro/gdb/tests/threads
> Reading symbols from /home/pedro/gdb/tests/threads...done.
> 
> (top-gdb) info inferiors
>   Num  Description       Executable
> * 2    <null>            /home/pedro/gdb/tests/threads
>   1    <null>            /home/pedro/gdb/sspaces/build/gdb/gdb
> 
> (top-gdb) start
> Temporary breakpoint 4 at 0x400640: file threads.c, line 35.
> Starting program: /home/pedro/gdb/tests/threads
> [Thread debugging using libthread_db enabled]
> 
> Temporary breakpoint 4, main () at threads.c:35
> 35          long i = 0;
> (top-gdb) info inferiors
>   Num  Description       Executable
> * 2    process 1526      /home/pedro/gdb/tests/threads
>   1    <null>            /home/pedro/gdb/sspaces/build/gdb/gdb
> 
> 
> The symbol-spaces concept is still needed and is still there, but
> the user doesn't see them anymore.  I've moved "info symbol-spaces"
> to "maintenanced info symbol-spaces".
> 
> This is similar, yet different from what was in the
> multiprocess-20081120-branch.  In that branch, you'd have
> proto-inferiors (inferiors with pid == 0, like that <null>
> above), but, when you issued a "run", that would still created
> yet another inferior.  That turned out to be a bad idea.
> 
> So, in this new version, an inferior ID is stable across
> a "run" or "attach".  This probably makes things simpler
> for python scripting.
> 
> 
> I've tweaked things around so that MI's thread-groups are
> created at the same time as before, but obviously, MI needs to
> be extended to be able to support multi-exec + multi-inferiors
> properly.

What do you mean precisely. I have no comment about the above behaviour
in CLI, but I think that for MI it is important that the 'thread-group-created'
notification is emitted only when you have "real" inferiour that frontend
can interact with, and not some "fake" one that is associated with a
file but is otherwise dead. 

Also, what is exactly requires to support multi-exec/multi-inferiours?
Is there any reason why thread groups are not sufficient to represent this?

- Volodya


  parent reply	other threads:[~2009-09-09  6:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-03  2:49 [v4 0/2] multi-executable support Pedro Alves
2009-09-03  2:51 ` [v4 1/2] " Pedro Alves
2009-09-03  2:53 ` [v4 2/2] " Pedro Alves
2009-09-03 18:31   ` Eli Zaretskii
2009-09-03 18:40     ` Pedro Alves
2009-09-03 20:37       ` Eli Zaretskii
2009-09-05 18:41     ` Pedro Alves
2009-09-05 20:16       ` Eli Zaretskii
2009-09-05 21:15         ` Pedro Alves
2009-09-06  3:16           ` Eli Zaretskii
2009-09-08 15:16             ` [v4 2/2] multi-executable support (new v5 patch included) Pedro Alves
2009-09-08 19:16               ` Eli Zaretskii
2009-10-05 15:22                 ` Pedro Alves
2009-09-09  6:40               ` Vladimir Prus [this message]
2009-09-09 10:28                 ` Pedro Alves
2009-09-03  2:56 ` [v4 0/2] multi-executable support (.gz) Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200909091040.23991.vladimir@codesourcery.com \
    --to=vladimir@codesourcery.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=marc.khouzam@ericsson.com \
    --cc=pedro@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox