According to the hpd spec (downloaded from sourceware.org, see page 106)
"up" moves to a frame that has existed longer, and "down" "follows
the progress of program execution".
fhpd has these reversed.
In case it matters fhpd is also backwards from common use in *many*
other debuggers. I looked at Emacs' "gud" mode and all the debuggers
it supports (dbx, gdb, xdb, jdb, perldb, and a few others) use "up"
and "down" in the same way.
Visually, the stack is displayed "top" (inner most) to "bottom" (outermost);
graphically we do the same. For "up" to go down and "down" to go up would be
less consistent and more confusing for new new users.
*** This bug has been marked as a duplicate of 3459 ***
On irc Andrew suggested a compromise. Implement new command for new users called
either "inner" and "outer" or "older" and "newer". Which would avoid the whole
issue of whether a stack grows up or down.
Then we up/down can be just aliases to these commands which do what the HPD spec
says and how all other debuggers support these commands.
This would satisfactory resolve the complaint that fhpd is just being
Here is a stack:
--- <- top
| --- |
| --- |
| --- |
+-----+ <- bottom
when moving around that stack "up" goes towards the "top" and "down" goes
towards the bottom.
- Rosenburg's debugger book points this out
- a survey of old time debugger users point this out (they, without prompting,
complained that what GDB does is wrong)
Remember, our target is new users that will expect; and the decision to use this
model (and differ to the hpd) was made after long and careful discussion which
the entire group participated in.
There wasn't anything gratuitous about the decision.
If down/up were to be flipped, then so to would our back-trace order and our
display of a backtrace. Not a must have first feature.