New version (2.31) of the ups debugger available

M.T.Russell mtr at ukc.ac.uk
Sat Jun 1 05:07:51 AEST 1991


Version 2.31 of the ups debugger is now available at an FTP site
near you.  This release fixes various bugs in 2.28, the most important
being that ups did not run under Ultrix 4.1 on the DECstation and that
it failed to work with SunOS XView applications.  It also fixes
a serious bug with floating point in version 2.30.

This (long) article describes what ups is and how to obtain it.
[Apologies if you have seen this already - this is a repost.]


SUMMARY
-------

   + Version 2.31 of ups is now available by anonymous FTP.

   + Changes from 2.28: it works under Ultrix 4.1 and with XView
     applications, plus various other bug fixes.

   + Changes from 2.30: bug in display of double variables fixed,
     plus a few other bug fixes.

   + Unless there are serious bugs this will be the last release
     for a while.

   + There are new FTP sites for people in Europe and the UK, as
     well as ways to obtain ups for those without FTP access.

   + There is a mailing list ups-users at ukc.ac.uk for bug reports
     and new release announcements.  Send add/delete requests
     to ups-users-request at ukc.ac.uk.  Future bug fix releases of
     ups will be announced on the mailing list only, to avoid
     cluttering the newsgroups.


WHAT IS UPS?
------------

Ups is a source level C debugger that runs under X11 or SunView on
Suns (SPARC, Sun 3 and 386i) and under X11 on DECstations and VAXen
running Ultrix (see below for details of supported configurations).

Ups runs in a window with two major regions: one showing the
current state of the target program data and the other showing
the currently executing source code.  A key feature of ups is
that the variables display is persistent: when you add a variable
to the display it stays there as you step through the code.  The
current stack trace (which function called which) is always visible.

Ups includes a C interpreter which allows you to add fragments
of code simply by editing them into the source window (the source
file itself is not modified).  This lets you add debugging printf
calls without recompiling, relinking (or even restarting) the
target program.  You can also add conditional breakpoints in a
natural way - you just add a statement like "if (i == 73) #stop"
at the appropriate place in the source window.

Some things you can do with ups:

   + Add variables to the display by simply clicking on them
     in the source window.

   + Expand (recursively) structures and unions to show their
     members.
	
   + Assign to variables by editing the displayed value.

   + Add breakpoints by pointing with the mouse at the line
     where you want execution to stop.
	
   + Add interpreted code at any breakpoint, including code that
     calls compiled functions and assigns to variables.

It's hard to describe an interactive application in a few paragraphs of
text - the best way to see what ups is like is to grab a copy and try it.
There's a walkthrough debugging session in the manual page: if you work
through this and are not hooked at the end of it then I'll give you
your money back :-)


HOW UPS DIFFERS FROM XXGDB, XDBX AND DBXTOOL
--------------------------------------------

The key implementation difference between ups and the various X front
ends for dbx and gdb is that ups is not a front end for a command based
debugger.  Xdbx and xgdb give you a convenient way to invoke the
underlying debugger's commands, but it is fairly clear in both that
you are talking to a text based debugger.  Ups in the other hand is
a complete native debugger implementation; there is no underlying
command language.

An example: to print the value of a variable in xgdb you select (by
dragging) a variable name and then click on `print' in the menu.  Xgdb
passes the print command with the selection to gdb and displays the
result.  By contrast in ups you click the mouse over a variable name
and it is added to the display.  Once the variable is added to the
display it stays there, so you can watch it change as you step through
the code.  If the variable happens to be a structure or a pointer to a
structure you can `expand' it to show its members.  Again, the
structure members thus added remain in the display until you get rid of
them so you can watch their values change as you execute the code.

Of course there is a downside to not talking to an existing debugger: you
lose portability.  Ups is machine dependent - a port to a new architecture
is a significant effort.  I think the benefits outweigh the cost.


SUPPORTED SYSTEMS
-----------------

The current list of supported configurations is:

	Architecture		OS version		Window system
	------------		----------		-------------
	SPARC			SunOS 4.X		X11 or SunView 1
	Sun 3			SunOS 3.5 or 4.X	X11 or SunView 1
	Sun 386i		SunOS 4.0.X		X11 or SunView 1
	DECstation	 	Ultrix 3.1 		X11
	VAX			Ultrix 3.1      	X11
	HLH Clipper		4.3BSD			X11

[ You've never heard of the HLH Clipper?  Don't worry, you're not alone. ]

Ups should also run under Ultrix 4.X on the DECstation 3100 and 5000.
I am unable to try this locally as our DECstations don't run Ultrix
4.X but I have tested ups using binaries produced by the 4.1 C compiler
and linker.

Ups has FORTRAN support on the Sun 3, VAX and SPARC but this is not as
stable or complete as the C support.  Ups may also work with gcc (even
with the -O flag).  This is known to work pretty well on the SPARC; your
mileage may vary on other systems.

Ups will probably work on OS releases other than these; the list above
describes the OS versions on the machines that I have access to.  In
particular I have built ups for a VAX 750 running 4.3BSD and X11 - it
appeared to work OK but wasn't tested thoroughly or used in anger.

Ups is unavoidably architecture and OS dependent as it knows about things
like the ptrace() system call interface and object file symbol table formats.
A port to a new architecture is likely to take several weeks.


OBTAINING THE RELEASE
---------------------

The release is available by anonymous FTP from several sites.
The full release is a compressed tar file called ups-2.31.tar.Z.
At some sites there are copies of the top level README file and
patches from releases 2.28 and 2.30.  The current list of files is:

  Size Checksum Name			    What
  ---- -------- ----                        ----
 81381    02487 ups-2.28-to-2.30.patch.Z    Patch from 2.28 to 2.30
 23964    49727 ups-2.30-to-2.31.patch.Z    Patch from 2.30 to 2.31
963435    37531 ups-2.31.tar.Z	       	    The full 2.31 release
  9758    14948 ups-2.31.README             A copy of the top level README file

The checksums are as reported by the `sum' program.

Note that you only need to pull one of these files: either the full
release (ups-2.31.tar.Z) or one of the patch files if you already have
release 2.28 or 2.31.  The ups-2.31.README file is there so you can
look at a brief description of ups to decide whether you want it or not.

All the files are binary except the README file, so don't forget to set
binary mode in FTP when you transfer them.

Here are the anonymous FTP sites:

      Name: export.lcs.mit.edu
IP address: 18.30.0.238
 Directory: contrib
     Files: ups-2.31.tar.Z
	    ups-2.31.README ups-2.28-to-2.30.patch.Z ups-2.30-to-2.31.patch.Z
     
      Name: uunet.uu.net
IP address: 192.48.96.2
 Directory: tmp
     Files: ups-2.31.tar.Z
	    ups-2.31.README
Note: tmp on uunet is cleared every four days based on lack of access,
      so you might find the files have gone from this site.

      Name: ftp.informatik.tu-muenchen.de
IP address: 131.159.0.110
 Directory: pub/X.V11R4/net/clients
     Files: ups-2.31.tar.Z
            ups-2.28-to-2.30.patch.Z ups-2.30-to-2.31.patch.Z

      Name: ftp.uni-koeln.de
IP address: 134.95.132.2
 Directory: pub/windows/xcontrib
     Files: ups-2.31.tar.Z
	    ups-2.31.README ups-2.28-to-2.30.patch.Z ups-2.30-to-2.31.patch.Z

For UK sites connected to JANET, the distribution is available by
ni-ftp.  The files are:

	<NETLIB>unix/ups/ups-2.31.README from uk.ac.ukc.harrier
	<NETLIB>unix/ups/ups-2.31.tar.Z from uk.ac.ukc.harrier

	user guest
	password <your email address>

Please don't ask me to mail ups to you: it is far too big for that.
If you don't have FTP access you could try the mail-to-FTP server
at Princeton (send a message containing the word HELP to
BITFTP at PUCC.Princeton.edu for details).

If you can't get the release any other way I am willing to write a
tape.  Send a reply-paid envelope containing the tape to:

	Mark Russell
	Computing Laboratory
	The University
	Canterbury
	Kent CT2 7NZ
	England

I can write Sun cartridge tapes (QIC-11, QIC-24 or QIC-150), 9 track
tapes at 1600 or 6250 bpi and DEC TK50 or TK70 tapes.


THE UPS-USERS MAILING LIST
--------------------------

I've had lots of mail from people who have pulled and built version
2.28.  Several people asked to be kept up to date about new versions
and bug fixes.  There doesn't seem to be an appropriate newsgroup
for this so I have set up a mailing list.  I don't think the volume
will be high: I see the list primarily as a way to get news of bugs
and fixes quickly to interested users.  The list address is

	ups-users at ukc.ac.uk

Send requests to be added to or deleted from the list to:

	ups-users-request at ukc.ac.uk

Please send bug reports to ups-users at ukc.ac.uk rather than to me
personally.  That way everyone else sees the report (and possibly
a patch to fix it).

I will use the mailing list to announce bugfix releases of ups.
I'll only post news for major new releases.


QUESTIONS AND ANSWERS
---------------------

Here are answers to some questions that came up repeatedly in the email
that I got:

  Q What does ups stand for?
  
  A It's not an acronym - it's short for `oops' as in `Oops - my program
    just dumped core'.  In particular, UPS (in capitals) means a parcel
    service or a device to keep your computer running - the debugger is
    called ups.


  Q How does ups differ from xdbx and xgdb?

  A Ups is a complete native debugger which was designed as a window
    and mouse based application from the beginning.  Xdbx and xgdb
    are front ends to command based debuggers.  They are a convenient
    interface to the underlying debugger, but the command-based nature
    shows through.  There are no typed commands in ups.


  Q Does ups support C++?

  A No, sorry - only C.  If someone wants to hack it ...


  Q Why doesn't `ups.Foreground: green' work?

  A In the 2.28 release ups looked for resources under the last
    component of the pathname it was invoked by (e.g. `x11ups').
    This wasn't documented in the manual page.  In 2.31 ups tries
    `Ups' as a name if `x11ups' (or whatever) doesn't match.
    Thus `Ups.resource: value' will always work.


  Q Why do you use yellow to highlight text?  It is unreadable on my
    white background.

  A It shows up well with my choice of colors (white on a dark blue
    background).  You can change the color used with the HighlightColor
    and EditlinesColor resources (which are now documented in the manual
    page).  If you want to try ups quickly without adding resource file
    entries try the -rv (reverse video) flag.


  Q Why don't you have Imakefiles?

  A Because last time I tangled with imake it defeated me.  If someone is
    willing to send me an imakefile that will build ups (without rearranging
    the source tree) I will be happy to include it with the release.


CHANGES BETWEEN VERSIONS 2.30 AND 2.31
--------------------------------------

  + Version 2.30 had a nasty bug with floating point: incorrect
    values were shown for double variables.  This is fixed in 2.31.

  + Ups on the SPARC showed incorrect values for sub-word formal
    parameter types (char and short) that are widened to int.

  + Ups has problems with functions that pass and return structures
    and unions by value.  These are now documented in the BUGS
    section of the manual page.

  + Ups now runs in mono rather than exiting if it can't allocate
    colormap entries on a color display.


CHANGES BETWEEN VERSIONS 2.28 AND 2.30
--------------------------------------

  + Ups did not work with Ultrix 4.1 due to changes in the symbol table
    format.  Thanks to those who reported this and especially to Randy
    Buckland at NCSU who diagnosed the problem.  This version of ups
    should work with Ultrix 4.1.  Let me know if there are problems.
	
  + A bug in the symbol table code caused ups to fail under SunOS if
    header files were nested more than eight deep.  This broke ups with
    XView applications.

  + The %v $printf format character now prints the names and values of the
    members of a struct or union if you pass it a struct or union pointer.
    This was suggested by Paul Maisano at the Australian AI Institute.
	
  + A new X resource TabWidth specifies how many spaces there are to a
    tab stop in the source window.
	
  + Various previously undocumented X resources are now documented in
    the manual page.

  + The file ups/doc/sample.c was missing from the 2.28 distribution - it
    is now included.

  + Various typos and mistakes in the manual page have been cleaned up -
    thanks to everyone who reported these.
	
  + Other minor bug fixes.

If you have read this far, congratulations.

Have fun.

Mark



More information about the Comp.unix.ultrix mailing list