This is the mail archive of the gdb@sourceware.org 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: Getting pissed off by gdb. Please help with stepping in.


On Thursday 18 March 2010 15:39:23 Daniel Jacobowitz wrote:
> On Thu, Mar 18, 2010 at 03:33:05PM +0100, André Pönitz wrote:
> > I used the term from the comment 
> > 
> >   "Optimize by setting the stepping range to the line."
> 
> Oh, I see - that's the comment below, not the one quoted.  OK.
> 
> > For me it's in fact the opposite to an optimization as the single stepping 
> > through the rest of the second line leads to one round trip through the 
> > stub for each of the remaining instructions which easily sums up to a
> > couple of seconds for lines that generate a hundred instructions.
> 
> Just what are you disabling then?  I thought it was the if block you
> quoted, not the step range changes.

I am unconditionally executing 

    if (1) {
      /* ... */
      if (debug_infrun)
         fprintf_unfiltered (gdb_stdlog, "infrun: stepped to a different line\n");
      ecs->event_thread->stop_step = 1;
      print_stop_reason (END_STEPPING_RANGE, 0);
      stop_stepping (ecs);
      return;
    }

This means the PC might indeed end up in the middle of a line, and a few
instruction of this line have already been executed. However in these 
somewhat "special" circumstances this is a significantly lesser evil then
skipping a whole line (and taking several seconds for that ;-})

Andre'


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