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' (again)


> 
> Doesn't the function below catch that?  There is a recursive call to
> look for just the problem that you mention.  Is there some other way of
> deleting commands that I need to look out for?

I'm not sure.

Consider:

	command callee
           delete command callee
	end
	breakpoint foo
	commands $bp
	  callee
	end

it will realise that there is a delete but will it protect its self from 
a command deleting its self.

> [BTW, I personally think that the unconditional copy is much less
> error prone (and therefore better) even if it's slower. Just my $0.02]

Agreed (And slower is relative - what happens if there are 100's or 
1000's of commands - that search becomes the bottle neck.)

Andrew



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