![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| calling current working dir from script | chandra004 | Shell Programming and Scripting | 3 | 07-31-2006 05:11 PM |
| Listing only directories in the current working directory using the "ls" command | igandu | UNIX for Dummies Questions & Answers | 2 | 05-12-2006 01:47 AM |
| Change to a new working directory... | jagannatha | UNIX for Dummies Questions & Answers | 5 | 06-29-2005 07:38 PM |
| change my current IP address | tamemi | IP Networking | 4 | 03-10-2004 01:58 AM |
| Finding current working dir path | liteyear18 | UNIX for Dummies Questions & Answers | 6 | 09-10-2001 04:43 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
How to change current working directory for dbx on UNIX?
means I'll run pgm from one directory , but getcwd() should return path which I want to be, which is not d current dir |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
dbx
U can try cd .. thats shud work
else try using USE |
|
#3
|
|||
|
|||
|
In VC++ we can set the path in project =>swttings=>working directory.
What if we want 2 do same in UNIX. i.e. our source files are at diff location. We have to copy executable to required diff location and run it. |
|
#4
|
|||
|
|||
|
make file
if u r trying to execute the file, u can use makefiles where u can define the paths of different files and corresponding executables to be formed.
|
|
#5
|
|||
|
|||
|
Thanks a lot Swarna
|
|
#6
|
|||
|
|||
|
Adding to Swarna's comment,
I guess your application is built in some location and your are trying to run the same binary in dbx in a different directory. As the actual binary is built in some other location,the references to your source files will be that of the build location. Assume i have a build machine,with source,include,make,bin directory, /user/builds/src /user/builds/inlcude /user/builds/make /user/builds/bin The binary so built will have references the /user/builds/src & /user/builds/inlcude directories. In case u want to debug the actual binary in some other location say by copying it to /home/test/bin As the actual binary still has references to the /user/builds/src and /user/builds/include You require the pathmapping, In the dbx initialization file ie ~/.dbxrc Add the below lines, Code:
pathmap /user/builds/src /path/to/yourlocal/src help pathmap Using "use" in dbx is deprecated.You may have to use pathmap instead. Hope this helps, Thanks Nagarajan Ganesan. |
|||
| Google The UNIX and Linux Forums |