[OB] Add cleanup, source.c
Joel Brobecker
brobecker@adacore.com
Fri Jun 29 17:02:00 GMT 2007
> >From gdbint.texinfo:
>
> Your function should explicitly do or discard the cleanups it
> creates. Failing to do this leads to non-deterministic behavior since
> the caller will arbitrarily do or discard your functions cleanups.
> This need leads to two common cleanup styles.
Humpf! I think I have contributed loads of patches that do not
follow this advice. I'll be careful in the future, but sometimes
it's not easy. For instance, when you have a function that has
multiple possible exit points...
--
Joel
More information about the Gdb-patches
mailing list