From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Buettner To: Michael Snyder Cc: Andrew Cagney , Don Howard , Fernando Nasser , gdb-patches@sources.redhat.com Subject: Re: [RFA] deleting breakpoints inside of 'commands' [Repost] Date: Wed, 19 Sep 2001 13:09:00 -0000 Message-id: <1010919200847.ZM15003@ocotillo.lan> References: <1010919190753.ZM14865@ocotillo.lan> <3BA8EF66.43ED46F5@cygnus.com> X-SW-Source: 2001-09/msg00265.html 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