xref: /netbsd-src/external/gpl3/gdb/dist/sim/rx/err.h (revision 1f4e7eb9e5e045e008f1894823a8e4e6c9f46890)
14e98e3e1Schristos /* err.h --- handle errors for RX simulator.
24e98e3e1Schristos 
3*1f4e7eb9Schristos Copyright (C) 2008-2024 Free Software Foundation, Inc.
44e98e3e1Schristos Contributed by Red Hat, Inc.
54e98e3e1Schristos 
64e98e3e1Schristos This file is part of the GNU simulators.
74e98e3e1Schristos 
84e98e3e1Schristos This program is free software; you can redistribute it and/or modify
94e98e3e1Schristos it under the terms of the GNU General Public License as published by
104e98e3e1Schristos the Free Software Foundation; either version 3 of the License, or
114e98e3e1Schristos (at your option) any later version.
124e98e3e1Schristos 
134e98e3e1Schristos This program is distributed in the hope that it will be useful,
144e98e3e1Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of
154e98e3e1Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
164e98e3e1Schristos GNU General Public License for more details.
174e98e3e1Schristos 
184e98e3e1Schristos You should have received a copy of the GNU General Public License
194e98e3e1Schristos along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
204e98e3e1Schristos 
214e98e3e1Schristos enum execution_error {
224e98e3e1Schristos   SIM_ERR_NONE,
234e98e3e1Schristos   SIM_ERR_READ_UNWRITTEN_PAGES,
244e98e3e1Schristos   SIM_ERR_READ_UNWRITTEN_BYTES,
254e98e3e1Schristos   SIM_ERR_NULL_POINTER_DEREFERENCE,
264e98e3e1Schristos   SIM_ERR_CORRUPT_STACK,
274e98e3e1Schristos   SIM_ERR_NUM_ERRORS
284e98e3e1Schristos };
294e98e3e1Schristos 
304e98e3e1Schristos enum execution_error_action {
314e98e3e1Schristos   SIM_ERRACTION_EXIT,
324e98e3e1Schristos   SIM_ERRACTION_WARN,
334e98e3e1Schristos   SIM_ERRACTION_IGNORE,
344e98e3e1Schristos   SIM_ERRACTION_DEBUG,
354e98e3e1Schristos   SIM_ERRACTION_NUM_ACTIONS
364e98e3e1Schristos };
374e98e3e1Schristos 
384e98e3e1Schristos void execution_error (enum execution_error num, unsigned long address);
394e98e3e1Schristos void execution_error_init_standalone (void);
404e98e3e1Schristos void execution_error_init_debugger (void);
414e98e3e1Schristos void execution_error_error_all (void);
424e98e3e1Schristos void execution_error_warn_all (void);
434e98e3e1Schristos void execution_error_ignore_all (void);
444e98e3e1Schristos enum execution_error execution_error_get_last_error (void);
454e98e3e1Schristos void execution_error_clear_last_error (void);
464e98e3e1Schristos void execution_error_set_action (enum execution_error num,
474e98e3e1Schristos 				 enum execution_error_action act);
48