This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 180244 - pathmap for localhost as well?
Summary: pathmap for localhost as well?
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Remote (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
: 180243 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-02-03 19:46 UTC by ivan
Modified: 2011-02-24 18:40 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ivan 2010-02-03 19:46:46 UTC
Here's a scenario I ran into while working with adding of 
pathmap support to dbxgui. The Summary is a likley solution but
I'm primarily interested in documenting the problematic scenario
which would appear as a bug.

Change development platform to a remote host of type, say, Solaris-Sparc
using NFS.
Build it, debug it ... alls cool.
Now switch development to localhost and debug it ... things fail, pathmaps
don't work, bpts won't work etc.

Here's why. When building 'there' pathmaps will be automatically set up to
map /export/home to /net/here/export/home. When the project is built there
the working directory of the build will be /net/here/export/home/...
This information is encoded in the compiler, fed to the debugger and thence
to the IDE which pathmaps it to /export/home and accesses it here.

Then, when you switch to localhost and debug you end up debugging the same
executable that was built there 
    dist/Debug/SunStudio-Solaris-Sparc/pctposixexport
and has embedded in it paths of the from
/net/here/export/home/...
As a result breakpoints which are now on /export/home get rejected by 
dbx which expects paths to begin with /net/here/export/home.

The problem will fix itself if one does a full rebuild 'here', but given
that for debugging of large programs automatic "Build before run" is
impractical there's a window where things will mysteriously not work.

One possible solution is to have localhost have a redundant pathmap as well.
It's the same pathmap which would be generated if files were being
exported from 'here'. In a sense the machine 'here' becomes a remote
machine and indistinguishable from any other remote machine. 

Another approach that may only work for dbx is to drop any leading /
from paths sent to dbx. Then dbx will utilize a right-anchored best-match algorithm which was designed for helping differentiate between
    stop at         main/file.c:50
    stop at jill/project/file.c:20
But it's hard to evaluate all the implications of this.
Comment 1 ivan 2010-02-03 19:50:19 UTC
*** Bug 180243 has been marked as a duplicate of this bug. ***
Comment 2 Vladimir Kvashin 2010-04-26 12:53:57 UTC
As I understand, if you open such project as /net/here/export/home/ (instead of just /export/home), everything works ok. Is this correct?
Comment 3 ivan 2010-04-26 18:32:48 UTC
I don't think opening the project as /net/here will help.
The problem is stale information encoded in the debugging information
of a.out's and shared libraries which were built over there.
Only a rebuild here will reset that information.