Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Re: pathmap or dir command on drugs
@ 2000-11-07  3:11 Stephane Carrez
  2000-11-07  5:01 ` Fernando Nasser
  0 siblings, 1 reply; 4+ messages in thread
From: Stephane Carrez @ 2000-11-07  3:11 UTC (permalink / raw)
  To: gdb; +Cc: Stephane.Carrez

Hi!

This idea of pathmap comes from dbx.  It is very useful for dealing with
the automounter.  When you build on one host, and debug on another host,
you may have different paths to get your sources. In general, adding
a /net/<build-host> is sufficient. The pathmap really helps in that context.


J.T. Conklin wrote:
> How do you envision multiple mappings work?  Does GDB process mappings
> in order and terminate when the first successful substitution?  This
> seems to be the only sane behavior to me, but it requires the ability
> to maintain an ordered list from the CLI.

In dbx, each pathmap is indexed and there is a precedence (first one to
last one). You can operate on one pathmap using the index to delete,
change the 'to' path or insert it at the good position. I suggest to do that,
or something similar.


J.T. Conklin wrote:
> David> [Though I have yet to hear a convincing argument for the need to have
> David> enable and disable options.]

In my experience in using pathmap, both in dbx and in ChorusOS-Gdb, you
don't need such enable/disable. It is not like breakpoints that you want
to momentarily disable. It is rather some configuration that you have to
setup before debugging (like the file or directory commands).


David Taylor wrote:
> The other camp is
> 
>    pathmap add <from-prefix> <to-prefix>
>    pathmap list <optional-list>
>    pathmap delete <optional-list>

Looks good,

As for dbx, I suggest to give numbers to each pathmap so that deletion is
made on the index rather than on some path.

I guess we need some optional argument to 'add' to tell the position of
the new pathmap in the list. After that, the old pathmaps after the new
one, will have their index incremented. Well, like dbx :-)


My 2-euro-cents,

	Stephane

-	-	-	-	-	-	-	-	-	-
Stephane |Sun Microsystems			|
 Carrez	 |Network Service Provider Division	| http://www.sun.com
	 |6 avenue Gustave Eiffel		|
	 |F-78182, St-Quentin-en-Yvelines-Cedex |

email: Stephane.Carrez@France.Sun.COM



^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: pathmap or dir command on drugs
@ 2000-11-07 10:19 David Taylor
  2000-11-07 10:37 ` Fernando Nasser
  0 siblings, 1 reply; 4+ messages in thread
From: David Taylor @ 2000-11-07 10:19 UTC (permalink / raw)
  To: Fernando Nasser; +Cc: Stephane Carrez, gdb

    Date: Tue, 07 Nov 2000 12:59:54 +0000
    From: Fernando Nasser <fnasser@cygnus.com>

    Stephane Carrez wrote:
    > 
    > David Taylor wrote:
    > > The other camp is
    > >
    > >    pathmap add <from-prefix> <to-prefix>
    > >    pathmap list <optional-list>
    > >    pathmap delete <optional-list>
    > 
    > Looks good,
    > 
    > As for dbx, I suggest to give numbers to each pathmap so that deletion is
    > made on the index rather than on some path.

When I last used dbx it didn't have a pathmap command.  And my current
system doesn't have dbx on it -- would you be willing to summarize the
current dbx pathmap command?

    Yes, the idea is that you can have

    pathmap delete 3
    pathmap delete 4-6
    pathmap delete all

    Deletions on the path are not very practical.

When I said <optional-list> I was thinking of the way breakpoints and
displays are handled -- you give the numbers you want deleted.

    > I guess we need some optional argument to 'add' to tell the position of
    > the new pathmap in the list. After that, the old pathmaps after the new
    > one, will have their index incremented. Well, like dbx :-)
    > 

    I suggest an "insert" subcommand:

    pathmap insert <index> <from> <to>

    It is like add but it lets the user specify after which entry it 
    should be added.

Actually, if there is an insert, then either it should be an insert
before or that should be an option or you need to allow <index> to
be 0 -- otherwise you cannot insert before the first element.

    This way there will be no parsing madness trying to decide if something
    is a path or a number.

This could also be done based on 2 vs 3 arguments, but I prefer an
approach of having you say what you mean... so I like 'insert' better.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-11-07 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-07  3:11 pathmap or dir command on drugs Stephane Carrez
2000-11-07  5:01 ` Fernando Nasser
2000-11-07 10:19 David Taylor
2000-11-07 10:37 ` Fernando Nasser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox