# This is a simple file for .dbxrc that will get students started # and probably is enough for all your C programming courses. # it should be stored as $HOME/.dbxrc (i.e., in your home directory). # Remember that you need to do "ls -a" to see files that begin with "." # After setting up this file as your $HOME/.dbxrc, any time you are # in dbx you can type "alias" and it will list your aliases, which can # help remind you what commands are around. # You can then type "help " to get help on . # To get massively detailed information on .dbxrc possibilities, # start dbx and have it create the file "complete.dbxrc" as follows. # Cut and paste to avoid messing up the complicated help line. # # dbx (get into dbx, hit space until you get a dbx prompt) # help .dbxrc | sed 's/^##/ /' >$HOME/complete.dbxrc # quit (get out of dbx) # # Now you can study complete.dbxrc in your home directory and decide # whether you want any of its features. # Make a backup of your .dbxrc before modifying it. ############ TECHNICAL SET-UP STUFF ####################################### set -o emacs # uncomment to enable emacs-style command editing # set -o vi # uncomment this line for vi-style editing set +o ignoresuspend # respect user's cntl-Z dbxenv suppress_startup_message 5.0 # dont print 60-line message dbxenv output_short_file_name on # print short pathnames for files dbxenv scope_look_aside on # find static symbols even when not in scope dbxenv output_dynamic_type on # cause `-d' for printing (C++) kalias alias=kalias # ensure that KSH alias syntax is used history 1000 unset MORE alias goto="stop at !:1 -temp; cont" button lineno goto button ignore step up # add `step up' button to GUI if $havegui then SMSO= # can't use reverse video in GUI RMSO= else SMSO=$(tput smso) # start standout mode (reverse video) RMSO=$(tput rmso) # end standout mode fi PS1="$SMSO(dbx !)$RMSO " # reverse-video prompt with history number ############ USEFUL ALIASES, ROUGHLY IN THE ORDER YOU MIGHT NEED THEM: alias si="stop in" # set breakpoint in a function alias sa="stop at" # set breakpoint at a line number alias st=status # show breakpoints, numbered alias del=delete # delete a breakpoint alias cka="check -access" # check for invalid memory access alias ckl="check -leaks" # check for memory leaks alias run="run " # start the program running at its beginning alias q=quit alias wh=where # show frames in call stack alias u=up alias d=down alias f=frame alias l=list # list some source lines alias lw="list -w" # from 5 before current line to 5 after alias p=print # print value of variable or expression alias wi=whatis # find declaration of variable or function alias n=next # cont to next stmt in same function alias s=step # step INTO the function about to be called alias su="step up" # cont to next stmt in parent function alias c=cont # continue running alias h=history