[RFA] breakpoint.c: Avoid double freeing in breakpoint_re_set_one

Paul Hilfinger hilfingr@EECS.Berkeley.EDU
Wed Jan 28 21:42:00 GMT 2004


 > 
 > > # IDT/SIM apparently doesn't have enough file descriptors to allow the
 > > # problem checked by this test to occur.
 > > if [istarget "mips-idt-*"] {
 > >     return 0;
 > > }
 > 
 > is this true?  If it is it looks more like a bug.  Other workarounds may 
 > be in the same situtation.

Well, it's just a small modification of code I found strewn around
other test cases that involved re-reading an executable and the like. 
If what you are saying is that GDB might be holding onto file descriptors
too long, then I must agree, as indicated in a comment further down in
the test:

  # Complication: Since GDB generally holds an open file descriptor on the 
  # executable at this point, there are some systems in which the 
  # re-compilation will fail....

That is, after the inferior exits, GDB (or, if you prefer, BFD) still
has the executable file open (at least that's what it looked like to
me).  I'm curious as to whether this is an important feature.


 > Just check that the braces are indented:
 > 
 > 	gdb_expect {
 > 	    -re ... {
 > 	    }
 > 	}

OK

Paul



More information about the Gdb-patches mailing list