aboutsummaryrefslogtreecommitdiff
path: root/sim/cris
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2005-04-18 03:08:46 +0000
committerHans-Peter Nilsson <hp@axis.com>2005-04-18 03:08:46 +0000
commit69308976e8c42febe2c7a12953b0f2dd2e47d66f (patch)
treec6eddef65b0a047ee02b9999606ff48f355b2c81 /sim/cris
parenta3b8c86ce6610e7c6718f86c07ee7363d6a7c523 (diff)
downloadgdb-69308976e8c42febe2c7a12953b0f2dd2e47d66f.zip
gdb-69308976e8c42febe2c7a12953b0f2dd2e47d66f.tar.gz
gdb-69308976e8c42febe2c7a12953b0f2dd2e47d66f.tar.bz2
* cris/traps.c (cris_break_13_handler) <case TARGET_SYS_mmap2>:
For ((len & 8191) != 0 && fd == (USI) -1), don't say this isn't implemented. In call to create_map, pad length argument to 8k.
Diffstat (limited to 'sim/cris')
-rw-r--r--sim/cris/traps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index eadb744..5b3718d 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -1530,8 +1530,7 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
&& flags != TARGET_MAP_PRIVATE
&& flags != TARGET_MAP_SHARED)
|| (fd != (USI) -1 && prot != TARGET_PROT_READ)
- || pgoff != 0
- || ((len & 8191) != 0 && fd == (USI) -1))
+ || pgoff != 0)
{
sim_io_eprintf (sd, "Unimplemented mmap2 call "
"(0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx, 0x%lx)\n",
@@ -1611,7 +1610,8 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
else
{
USI newaddr
- = create_map (sd, &current_cpu->highest_mmapped_page, addr, len);
+ = create_map (sd, &current_cpu->highest_mmapped_page, addr,
+ (len + 8191) & ~8191);
if (newaddr >= (USI) -8191)
retval = -cb_host_to_target_errno (cb, -(SI) newaddr);