aboutsummaryrefslogtreecommitdiff
path: root/sim/cris
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2009-01-03 19:21:42 +0000
committerHans-Peter Nilsson <hp@axis.com>2009-01-03 19:21:42 +0000
commita349c9b6a2c7d2fb15400454969659d441679c83 (patch)
treebbd23698d615d612235586321b8c3e9bd8d4749b /sim/cris
parent195c7c55e0a9921e2021b59fbe1ea5bff30e7bd8 (diff)
downloadgdb-a349c9b6a2c7d2fb15400454969659d441679c83.zip
gdb-a349c9b6a2c7d2fb15400454969659d441679c83.tar.gz
gdb-a349c9b6a2c7d2fb15400454969659d441679c83.tar.bz2
* cris/traps.c (TARGET_MAP_DENYWRITE): Define.
<case TARGET_SYS_mmap2>: Handle TARGET_MAP_DENYWRITE.
Diffstat (limited to 'sim/cris')
-rw-r--r--sim/cris/traps.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index afe5bfb..ff70902 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -124,6 +124,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#define TARGET_MAP_TYPE 0x0f
#define TARGET_MAP_FIXED 0x10
#define TARGET_MAP_ANONYMOUS 0x20
+#define TARGET_MAP_DENYWRITE 0x800
#define TARGET_CTL_KERN 1
#define TARGET_CTL_VM 2
@@ -1662,6 +1663,11 @@ cris_break_13_handler (SIM_CPU *current_cpu, USI callnum, USI arg1,
USI fd = arg5;
USI pgoff = arg6;
+ /* At 2.6.27, Linux (many (all?) ports, in the mmap2 syscalls)
+ still masked away this bit, so let's just ignore
+ it. */
+ flags &= ~TARGET_MAP_DENYWRITE;
+
/* If the simulator wants to mmap more than the very large
limit, something is wrong. FIXME: Return an error or
abort? Have command-line selectable? */