Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to change current working directory for dbx on UNIX? Post 302115656 by ennstate on Thursday 26th of April 2007 07:47:16 AM
Old 04-26-2007
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.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Change to a new working directory...

I need to CD to a particular directory to check log files and interface files. Instead of typing the path manually, is there a way of getting a script to change my working directory to the one I need? Currently I have a script that CD's to the directories I need but a soon as the script exits,... (5 Replies)
Discussion started by: jagannatha
5 Replies

2. UNIX for Dummies Questions & Answers

Listing only directories in the current working directory using the "ls" command

Hello All, I am trying to list only directories in my current directory using the command "ls -d". But the output only contains the default directory "." and doesn't list the rest of the directories in the working directory. Can anyone explain why this is happening (2 Replies)
Discussion started by: igandu
2 Replies

3. Shell Programming and Scripting

Finding files in current directory when 100,000's files in current directory

Hi All I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age. I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies

4. Shell Programming and Scripting

Current working directory in prompt

Can someone tell me how do i set my current working directory in my prompt? Note: I dont want to use env variable PWD and using `pwd` gives me only my home directoy. suggest a different way ? I use /bin/sh thanks!! (3 Replies)
Discussion started by: yesmani
3 Replies

5. Programming

using dbx: I can't make it watch a variable change?! Help, please!

(I have mentioned about this situation and arisen problems in another thread: Is there a limit for a code line length in C?, but those questions are OffTop for that subject; so I open a new topic, here.) The main problem is that I have some situation in my program where memory has been changed... (2 Replies)
Discussion started by: alex_5161
2 Replies

6. UNIX for Dummies Questions & Answers

Displaying the current working directory in prompt

Hi, I want that the prompt that is being displayed (i.e $ sign) should display always the current directory I am working in instead of that $ sign example: as we use PS1=patric and the prompt changes from $ to patric OR if we write the command PS1=`pwd` it will display the current... (5 Replies)
Discussion started by: premjotsingh
5 Replies

7. Shell Programming and Scripting

FTP mget * not working after change directory -cd

Hi everyone, I have an Linux FTP script to get files from different AS400 mailboxes and store in different local directories. I had to use mget * option becuase there is no fixed destination file name means filename can change. The following FTP script is working fine if we have single file... (5 Replies)
Discussion started by: oravikiran
5 Replies

8. UNIX for Dummies Questions & Answers

Current working directory

Hi all, How do I print the name of my current working directory only to screen? Not pwd! For example, if I was in /home/work I am looking for 'work' only (4 Replies)
Discussion started by: jimjam
4 Replies

9. Solaris

Dbx not working on 64 bit Solaris machine

I have a 64 bit program called drivertest that crashed with the error message Illegal Instruction (core dumped) I tried to open the core file using dbx command bit it gives the below error message. psrux902b1% dbx - core.drivertest.28276 Corefile specified executable:... (1 Reply)
Discussion started by: old_as_a_fossil
1 Replies
DEBIAN-MATLAB-MEXHELPER(1)					   User Commands					DEBIAN-MATLAB-MEXHELPER(1)

NAME
debian-matlab-mexhelper - helper to build Matlab extensions on Debian SYNOPSIS
debian-matlab-mexhelper [OPTIONS] <package name> <mode> DESCRIPTION
The is a small helper that eases building and installing MEX extensions for Matlab toolbox packages in Debian binary packages. Because these packages cannot build-depend on Matlab (for obvious reasons) they need to compile their extensions at installation time using a local Matlab installation. The helper is somewhat flexible by supporting custom build, install and clean commands, as well as source and destina- tion directories. It also deals with moving extensions into library directories and automatically symlinks them into the toolbox direc- tory. There are two major modes: 'install' to build, install and symlink extensions (useful in postinst) and 'clean' to remove installed exten- sions and symlinks (useful in prerm). The command to build the extensions is invoked in the source directory. By default, this is /usr/src/matlab/<package name>, but can be overridden with the --src-dir option. Any optional 'install' (--install-cmd) and 'clean' (--clean-cmd) are invoked in the source directory too. Moreover, this helper will also take any installed extensions from a default installation path /usr/share/matlab/site/m/<package name>, move them into /usr/lib/matlab/site/<package name> and symlink back to the original location. These locations can be configured with the --m-dir and --mex-dir options respectively. Again, this step is optional and is only performed if a package actually installs extensions inot this location. OPTIONS
-h Print usage summary and option list. --help Print full help. --version Print version information and exit. --build-cmd Command to build the extensions in the source directory --install-cmd Command to install the extensions after building --clean-cmd Command to clean the source tree after installation. This is not the command that is executed in 'clean' mode. --src-dir Directory with the extension sources. This is also the directory in which build, install and clean commands get invoked. --mex-dir Target directory into which binary extensions get moved. --m-dir Target directory in which symlinks to binary extensions get created. --make Set default commands for 'build-cmd' (make), 'install-cmd' (make install DESTDIR=$m_dir) and 'clean-cmd' (make distclean) if no spe- cific command has been provided via the respective options. EXAMPLES
The following call can be used in a package's postinst script if it comes with a Matlab script 'build_matlab.m' that builds and installs its extension into the desired locations. The --src-dir option is used to point to a non-standard location of the extension sources. debian-matlab-mexhelper somepackagename install --src-dir /usr/src/dynare-matlab/mex/sources --build-cmd 'matlab -nodesktop -nodisplay -nojvm -r build_matlab' If a package installs extension sources into the standard location and builds its extensions using a Makefile that support the DESTDIR for installing the built extensions and a 'distclean' target it is sufficient to run the following. debian-matlab-mexhelper somepackagename install --make Otherwise it is also possible to fully customize all commands. debian-matlab-mexhelper difficultpackage install --build-cmd 'make -C src all toolbox MEXBIN="matlab-mex"' --install-cmd 'make -C src install && find . ! -wholename "./src" -name "*.mex?*" -print0 | xargs -0 -I {} cp -v --parent {} /usr/share/difficultpackage' --clean-cmd 'make -C src distclean tool- box-distclean && find . -name "*.mex?*" -delete' If a package uses debian-matlab-mexhelper to install extensions into the standard location it can also be used to remove all MEX extensions and created symlinks when a package is removed from a system. To achieve this simply put the following call into a package's prerm script. debian-matlab-mexhelper packagename clean AUTHOR
Written by Michael Hanke. COPYRIGHT
Copyright (C) 2010-2011 Michael Hanke <michael.hanke@gmail.com> Licensed under GNU Public License version 3 or later. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. debian-matlab-mexhelper 0.0.18 March 2012 DEBIAN-MATLAB-MEXHELPER(1)
All times are GMT -4. The time now is 06:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy