home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!know!cass.ma02.bull.com!mips2!news.bbn.com!usc!zaphod.mps.ohio-state.edu!cs.utexas.edu!ut-emx!slcs.slb.com!leo.asc.slb.com!sjsca4!rod
- From: rod@sj.ate.slb.com (Rod Armstrong)
- Newsgroups: comp.windows.x
- Subject: Some unofficial enhancements to the UPS debugger.
- Keywords: UPS, X, SPARC
- Message-ID: <1992Nov13.001355.18100@sj.ate.slb.com>
- Date: 13 Nov 92 00:13:55 GMT
- Reply-To: rod@sj.ate.slb.com (Rod Armstrong)
- Organization: Schlumberger Technologies, San Jose, CA.
- Lines: 91
-
- I have made some UNOFFICIAL enhancements for the UPS 2.45 debugger.
- The changes are small and in some cases specific to a Sun SPARC workstation
- running X, but they can significantly increase the ease of use.
-
- To use many of the following features, you need to run the debugger
- from the foreground in an xterm, i.e. "ups program".
- In the following, LMB means Left Mouse Button and MMB means Middle
- Mouse Button.
-
- 1) The contents of a contiguous address space can be examined in
- Hex, Decimal and Ascii by typing in the command "hex-address num_bytes"
- in the top line. If "num_bytes" is not specified, it defaults to 4.
- Information is grouped as 4 bytes per line. An example is
- "0xeffff4b8 20". Stack variable names are printed in the left
- part when possible.
-
- 2) The display of a selected object in the top window can be
- printed to the xterm with the F1 key. If the object is expanded, the
- data is written out in expanded form, conversely if it is compressed,
- only the compressed representation is printed. If just a subsection of
- a structure is highlighted, just that part is printed. The data printed
- is not affected by the viewport of the top window - data that is
- scrolled out of view will still be printed.
-
- Note that line trunctation does not occur in the xterm as it does in
- the ups window. So selecting, for example, "PATH" in the Environment
- section will print out as many lines as necessary.
-
- 3) The complete contents of the top window can be printed with the F2 key.
-
- 4) Easier to use editing keys are available:
-
- Left-arrow (R10) and ^B both move the marker bar left one character
- (same as ^H)
-
- Right-arrow (R12) and ^F both move the marker bar right one character
- (same as ^L)
-
- Up-arrow (R8) inserts the X selection (same as SHIFT LMB)
-
- 5) New editing keys available:
-
- ^A goes to the beginning of line.
- ^E goes to the end of line.
- ^K deletes characters from the right of the marker bar to the end of line.
-
- 6) When typing in a breakpoint, pressing ESC does partial name completion
- whenever possible. So if a program has just two routines, "process_key()"
- and "process_cmd()", typing "p" then ESC will expand the line to "process_"
- and in the third line will be a message like
-
- `process_' matches `process_key' and `process_cmd'.
-
- Then typing "k" then ESC will complete the line to "process_key"
-
- 7) When editing breakpoint code, multi-line X selections can now be pasted
- in. Previously the paste terminated at one line.
-
- 8) The function keys F3 through F12 can be used to insert strings
- defined by environment variables of type "UPS_F*_STR" where "*" is
- 3 through 12. As an example, for UIF tools it is often nice to be able
- to selectively turn synchronization on and off in breakpoint code. To
- do this, put the following in your environment:
-
- setenv UPS_F3_STR "XSynchronize(display,1);"
- setenv UPS_F4_STR "XSynchronize(display,0);"
-
- Then F3 will insert "XSynchronize(display,1);" and F4 will insert
- "XSynchronize(display,0);".
-
- 9) In the source window, whole lines can now be made into an X selection.
- Pressing CTRL-LMB makes the line at the cursor available for pasting.
- This applies to both source code and breakpint code. Multi-line
- selection is not yet possible, and there is no visual indication
- of the selection, other than the prior X selection will be deselected.
-
- 10) Similarly, a line in the source window can be printed by pressing
- CTRL-MMB over it.
-
- 11) You can now do a search for text in the top window. This makes use
- of the output window at the bottom of the debugger that the breakpoint
- function "$printf()" uses. The window is created if it does not already
- exist. Just type the search string in the typing line at the top of the
- debugger, and press ^S. This dumps all the text in the top window to
- the bottom window. Then use the search button to do a regular expression
- search in either direction.
-
- If anyone is interested, I'll mail the diffs.
-
- Rod Armstrong
- rod@sj.ate.slb.com
-