This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [patch] Fix crash in read_pe_exported_syms


On Mar  4 13:00, Pedro Alves wrote:
> On 03/02/2013 11:02 AM, Corinna Vinschen wrote:
> 
> (...)
> 
> I'm not myself against gotos, but indeed GDB's style leans
> largely on the "call do_cleanups before return" for early
> returns.

Well, grepping for "goto" in the code returns >500 places.  I checked
that before sending my patch...

> On that basis,
> 
> > Below is a patch.  Ok to apply?
> 
> OK with Sergio's suggestion.

I really think that lots of 

  do_cleanup();
  return;

blocks are more error prone and less readable than a goto to a defined
label at the end of a function.  Are you really sure you want that?


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat


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