Move catch_command_errors and catch_command_errors_const to main.c
authorPedro Alves <palves@redhat.com>
Mon, 14 Jul 2014 19:45:14 +0000 (20:45 +0100)
committerPedro Alves <palves@redhat.com>
Mon, 14 Jul 2014 19:45:14 +0000 (20:45 +0100)
commit46cbf2511331e43ed5ca03fce2e10158971b8b15
treee0508d1bdfa676f26a6e32e5c993d6e83106c417
parent44c4124952bf5302253d43f66c89ec807790e692
Move catch_command_errors and catch_command_errors_const to main.c

We'll need to add error handling code to commands run before the event
loop starts (commands in .gdbinit, -ex commands, etc.).  Turns out
those are run through catch_command_errors, and, catch_command_errors
is used nowhere else.  Move it (and the _const variant) to main.c, so
that we can further specialize it freely.

gdb/
2014-07-14  Pedro Alves  <palves@redhat.com>

* exceptions.c (catch_command_errors, catch_command_errors_const):
Moved to main.c.
* exceptions.h (catch_command_errors_ftype)
(catch_command_errors_const_ftype): Moved to main.c.
(catch_command_errors, catch_command_errors_const): Delete
declarations.
* main.c (catch_command_errors_ftype)
(catch_command_errors_const_ftype): Moved here from exceptions.h.
(catch_command_errors, catch_command_errors_const)): Moved here
from exceptions.c and make static.
gdb/ChangeLog
gdb/exceptions.c
gdb/exceptions.h
gdb/main.c