From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Fernando Nasser Cc: Andrew Cagney , Michael Snyder , Daniel Jacobowitz , gdb-patches@sourceware.cygnus.com Subject: Re: [RFA] Testsuite addition for x86 linux GDB and SIGALRM fix Date: Thu, 26 Jul 2001 08:18:00 -0000 Message-id: References: <3B60251A.E9726676@redhat.com> X-SW-Source: 2001-07/msg00651.html On Thu, 26 Jul 2001, Fernando Nasser wrote: > > o step executes instructions until you > > leave the current line > > (be it enter a function or reach a new > > line) > > > > 'step' should never leave you in the same line from where you've issued > it. That is counter intuitive, even if you had a stop-finish in the > middle. Agreed. > "finish" is a source level command and source level commands should not > leave you in the middle of source lines. I'm not sure I understand what you mean here (or that you mean what I understand ;-). We could have a source line like this: int i = (foo (), bar ()); or even like this: int i = foo (); bar (); Where would you suggest that "finish" leaves you in these cases, and what does ``in the middle of source lines'' mean in these cases? Also, do you think these two cases are fundamentally different from "foo (bar ());", and if so, how are they different? > When the user issues a "step" on 'foo (bar ())' source line, he/she may > want to enter either bar() or foo(). We cannot know that, so we must > stop at each one and he/she can go to the next by issuing "finish", > i.e., "finish _this_ subroutine". Now I'm confused: this seems to suggest that the first "step" gets her inside bar(), and if she then types "finish", she will be after the call to bar(), but before the call to foo() (that's how I interpret ``finish _this_ subroutine''). But that is in the middle of a source line, which seems to contradict your previous requirement. What am I missing?