The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
calling current working dir from script chandra004 Shell Programming and Scripting 3 07-31-2006 08:11 PM
Listing only directories in the current working directory using the "ls" command igandu UNIX for Dummies Questions & Answers 2 05-12-2006 04:47 AM
Change to a new working directory... jagannatha UNIX for Dummies Questions & Answers 5 06-29-2005 10:38 PM
change my current IP address tamemi IP Networking 4 03-10-2004 04:58 AM
Finding current working dir path liteyear18 UNIX for Dummies Questions & Answers 6 09-10-2001 07:43 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
  #1 (permalink)  
Old 04-11-2007
login0001 login0001 is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 4
Question How to change current working directory for dbx on UNIX?

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


  #2 (permalink)  
Old 04-11-2007
Swarna Swarna is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 5
dbx

U can try cd .. thats shud work
else try using USE
  #3 (permalink)  
Old 04-11-2007
login0001 login0001 is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 4
Question working directory.

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 (permalink)  
Old 04-11-2007
Swarna Swarna is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 5
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 (permalink)  
Old 04-26-2007
login0001 login0001 is offline
Registered User
  
 

Join Date: Mar 2007
Posts: 4
Thanks a lot Swarna
  #6 (permalink)  
Old 04-26-2007
ennstate ennstate is offline
Registered User
  
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
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
For more on pathmap,
help pathmap

Using "use" in dbx is deprecated.You may have to use pathmap instead.

Hope this helps,

Thanks
Nagarajan Ganesan.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0