diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-20 23:42:20 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-23 20:10:08 -0400 |
commit | e91488f739f0dbb93bfd9d96164c25d9674846c4 (patch) | |
tree | 18b441cb6497ccdfb7062f4dc96a6cb4b7c9397d /sim/cris/traps.c | |
parent | d394a6efed4723b86f8e4f09fc23f6d03a7ad835 (diff) | |
download | gdb-e91488f739f0dbb93bfd9d96164c25d9674846c4.zip gdb-e91488f739f0dbb93bfd9d96164c25d9674846c4.tar.gz gdb-e91488f739f0dbb93bfd9d96164c25d9674846c4.tar.bz2 |
sim: cris: override getpid callback
The cris linux syscall layers assume getpid returns a constant,
so add a custom function to provide that.
Diffstat (limited to 'sim/cris/traps.c')
-rw-r--r-- | sim/cris/traps.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sim/cris/traps.c b/sim/cris/traps.c index f92bb7c..fd7f9bc 100644 --- a/sim/cris/traps.c +++ b/sim/cris/traps.c @@ -3336,6 +3336,12 @@ cris_time (host_callback *cb ATTRIBUTE_UNUSED) return TARGET_TIME (current_cpu_for_cb_callback); } +static int +cris_getpid (host_callback *cb ATTRIBUTE_UNUSED) +{ + return TARGET_PID; +} + /* Set target-specific callback data. */ void @@ -3345,6 +3351,8 @@ cris_set_callbacks (host_callback *cb) cb->syscall_map = (CB_TARGET_DEFS_MAP *) syscall_map; cb->errno_map = (CB_TARGET_DEFS_MAP *) errno_map; + cb->getpid = cris_getpid; + /* The kernel stat64 layout. If we see a file > 2G, the "long" parameter to cb_store_target_endian will make st_size negative. Similarly for st_ino. FIXME: Find a 64-bit type, and use it |