aboutsummaryrefslogtreecommitdiff
path: root/sim/cris/traps.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2009-01-03 21:00:48 +0000
committerHans-Peter Nilsson <hp@axis.com>2009-01-03 21:00:48 +0000
commitddf2c97233d9d3415e6ccac3256d08bc7aedba48 (patch)
tree16754062c4d48c1886942d661cf553d9199207ee /sim/cris/traps.c
parent2e1566c6dacb9e40d35df48b487364e6911f088e (diff)
downloadgdb-ddf2c97233d9d3415e6ccac3256d08bc7aedba48.zip
gdb-ddf2c97233d9d3415e6ccac3256d08bc7aedba48.tar.gz
gdb-ddf2c97233d9d3415e6ccac3256d08bc7aedba48.tar.bz2
* cris/sim-main.h (struct _sim_cpu): New member
set_target_thread_data. * cris/crisv32f.c (CRIS_TLS_REGISTER): Define. * cris/crisv10f.c: Ditto. * cris/cris-tmpl.c (MY (set_target_thread_data)): New function. (MY (f_specific_init)): Set new _sim_cpu member to new function. * cris/traps.c (TARGET_SYS_set_thread_area): Define. (cris_break_13_handler) <case TARGET_SYS_set_thread_area>: New case.
Diffstat (limited to 'sim/cris/traps.c')
-rw-r--r--sim/cris/traps.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index 081273f..aa3b90a 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -113,6 +113,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define TARGET_SYS_getegid32 202
#define TARGET_SYS_getgid32 200
#define TARGET_SYS_fcntl64 221
+#define TARGET_SYS_set_thread_area 243
#define TARGET_SYS_exit_group 252
#define TARGET_PROT_READ 0x1
@@ -3154,6 +3155,17 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
retval = -cb_host_to_target_errno (cb, ENOSYS);
break;
+ case TARGET_SYS_set_thread_area:
+ /* Do the same error check as Linux. */
+ if (arg1 & 255)
+ {
+ retval = -cb_host_to_target_errno (cb, EINVAL);
+ break;
+ }
+ (*current_cpu->set_target_thread_data) (current_cpu, arg1);
+ retval = 0;
+ break;
+
unimplemented_syscall:
default:
retval