This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFA: [infrun.c] Fix to "nexti".


> A "nexti" inside a function prologue currently == continue.
> This has been broken for quite a while (24-Oct-95).


FYI, I've checked this in with one change, the original patch replaced 
STEP_OVER_NONE with the magic number ``0''.

Michael Synder's comment, when this was submitted, was:

> Do we really have an "obvious fix" rule?  It seems that there is
>> some confusion on this issue.
> 
> 
> We do (I think), but when you're discussing infrun.c, I'm not
> sure that any change can be regarded as "obviously correct".
> At least not in the wait_for_inferior/handle_event area.
> 
> By eyeball, this change looks correct to me, or at least
> "not obviously incorrect".  I would like to see it tested,
> and perhaps the best way to do that is to apply it and then
> notice if there's a sudden uptick in testsuite failures.



	Andrew


> Here is the fix.
> 
> 	* infrun.c (handle_inferior_event): Handle "nexti" inside function
> 	prologues.
> 
  
> ! 	if (step_over_calls == STEP_OVER_NONE)
>   	  {
>   	    /* I presume that step_over_calls is only 0 when we're
>   	       supposed to be stepping at the assembly language level
>   	       ("stepi").  Just stop.  */
>   	    stop_step = 1;
>   	    print_stop_reason (END_STEPPING_RANGE, 0);
>   	    stop_stepping (ecs);
> --- 2738,2753 ----
>         {
>   	/* It's a subroutine call.  */
>   
> ! 	if ((step_over_calls == 0)
> ! 	    || ((step_range_end == 1)
> ! 	        && in_prologue (prev_pc, ecs->stop_func_start)))


I've restored ``STEP_OVER_NONE'' in the above expression, I don't know 
why fernando removed it.

	Andrew




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]