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]
Other format: [Raw text]

Re: [commit] Simplify STEP_OVER_UNDEBUGGABLE


On Fri, May 14, 2004 at 02:42:51PM -0400, Andrew Cagney wrote:
> Hello,
> 
> The attached deletes all the irrelevant guff that was being executed 
> when determining how to STEP_OVER_UNDEBUGGABLE.  See the bottom of the 
> patch for what's left.

I'm not as confident as you are that this code is unnecessary.

> -       /* If we are in a function call trampoline (a stub between the
> - 	 calling routine and the real function), locate the real
> - 	 function.  That's what tells us (a) whether we want to step
> - 	 into it at all, and (b) what prologue we want to run to the
> - 	 end of, if we do step into it.  */
> -       real_stop_pc = skip_language_trampoline (stop_pc);
> -       if (real_stop_pc == 0)
> - 	real_stop_pc = SKIP_TRAMPOLINE_CODE (stop_pc);
> -       if (real_stop_pc != 0)
> - 	ecs->stop_func_start = real_stop_pc;

For instance, this code used to be used in the STEP_OVER_UNDEBUGGABLE
("step" command) case.  Now it isn't.  So if we say "step" at the end
of a function, which makes a sibling call to another debuggable
function through an undebuggable trampoline, we will now return to the
caller instead of stepping in.

This is hard to write testcases for since you have to compile with
optimization if you want sibling calling.  As a consequence our support
for sibling calling has been getting worse at, my estimate, roughly
the same rate GCC's generation of them has been getting better.

I'll try to come up with some test cases.

-- 
Daniel Jacobowitz


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