This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: pathmap or dir command on drugs


    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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]