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: STEP_SKIPS_DELAY question, sort of


Andrew Cagney wrote:

If the:
>> breakpoint_here_p (read_pc () - 2)
and
>> breakpoint_here_p (read_pc () + 4)
logic is moved to the per-architecture STEP_SKIPS_DELAY I don't think DELAY_SIZE is needed.


I also think this needs a new macro name that better reflects what the test is doing. But I've no good ideas :-/ (SINGLE_STEP_THROUGH_DELAY (pc)?)

SINGLE_STEP_THROUGH_DELAY sounds fine to me.


Can a simple, separate, more explicit logic like:
if (we just did a step and STEP_SKIPS_DELAY (pc))
set up for another step
return;
work? The [handle_inferior_event patch snipped] was nested within other logic and that's not good from a readability / maintainability point of view.

Agreed; it wasn't clear from the context where I put the patch why it was there. I'll come back with a proper patch once I've gotten around to do some more serious testing.


--
Orjan Friberg
Axis Communications


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