From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephane Carrez To: gdb@sourceware.cygnus.com Cc: Stephane.Carrez@france.sun.com Subject: Re: pathmap or dir command on drugs Date: Tue, 07 Nov 2000 03:11:00 -0000 Message-id: <200011071111.MAA06856@sunchorus.France.Sun.COM> X-SW-Source: 2000-11/msg00032.html 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/ 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 > pathmap list > pathmap delete 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