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: FYI: small simplification in breakpoint.c


On Monday 04 April 2011 16:41:31, Tom Tromey wrote:
> >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
> 
> Pedro> On Monday 04 April 2011 16:33:37, Pedro Alves wrote:
> >> catch_exceptions also prints the exception string, if
> >> any (w/ print_any_exception), was the change intentional?  (your note seems to
> >> imply this is meant as a 1-1 replacement, but I do see a few
> >> exception_print's below the TRY_CATCH, so I can't tell.)
> 
> Pedro> Oh, sorry.  Please ignore me.  That's catch_exceptionS, but you
> Pedro> replaced a use of catch_exception, which doesn't do that.
> 
> FWIW, I'm not a fan of having two functions with such similar names.
> This has bitten me a couple of times.

On my current checkout I see:

 $ grep "= catch_exception (" * -rn
 breakpoint.c:7958:  e = catch_exception (uiout, do_captured_parse_breakpoint, 
 cli/cli-script.c:1632:    e = catch_exception (uiout, wrapped_read_command_file, &args,
 cli/cli-interp.c:137:  e = catch_exception (uiout, do_captured_execute_command, &args,
 mi/mi-main.c:1962:      result = catch_exception (uiout, captured_mi_execute_command, command,
 remote.c:4070:    ex = catch_exception (uiout, remote_start_remote, &args, RETURN_MASK_ALL);

How about we just delete catch_exception?  It doesn't seem to add any value.

-- 
Pedro Alves


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