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] deleting breakpoints inside of 'commands' [Repost]


On Sep 19, 12:17pm, Michael Snyder wrote:

> > A slightly more complicated scheme would examine the command list for
> > commands which may alter/delete the list and then tag the entire list
> > as one that needs to be copied.  This would be done ahead of time
> > (probably at the time that the list is created).  There's no point in
> > scanning the command list every time we want to execute the commands
> > because it's nearly as cheap to make a copy.  (Both are linear time
> > operations.)
> 
> I thought about this, but then I thought that the command list
> might include user-defined commands, which in turn might call
> delete.  That makes it a recursive problem.  And I'm not sure
> whether user commands might be re-defined later (after this
> step has been done.)

Good point.  I hadn't considered this scenario.

I guess you could just consider any user defined commands to be potentially
dangerous and cause the command list to be copied in such circumstances.

Kevin


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