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


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



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