An ideal square wave has harmonics that go as 1/N (i.e., -20dB/dec).
An ideal triangle wave has harmonics that go as 1/N^2 (-40dB/dec).
An ideal trapezoid wave (a square wave with finite rise/fall edges, such as you get from a PULSE source in SPICE) has harmonics that go inbetween these: namely, 1/N for harmonics 1 to X, and 1/N^2 for N > X.
The rolloff point X corresponds, more or less, to the risetime of the waveform (i.e., give or take a constant of perhaps 2*pi or so?).
It's tricky because you might not see harmonics at the correct levels (the signal path needs to be clean, no ringing -- ringing is the manifestation of harmonic amplitudes being raised or lowered by reactive elements), and the harmonics might be so far down that they're in the noise floor by the time you can begin to use this as a basis.
The tradeoff between gain-bandwidth (or RBW, in this case) and dynamic range (usually < 80 or 100dB for a spec), and their impact on the measurement (its accuracy, or the ability to measure it at all), is very much equivalent to the tradeoff between time and rate on a digital FFT type analyzer (or other signal processors). Which gives a very solid limit on how much risetime you can analyze (namely, because a sampled data set can't tell what the rise time is, in any better terms than simply "sample rate or greater").
Tim