aboutsummaryrefslogtreecommitdiff
path: root/sim/bfin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-16 01:26:47 -0500
committerMike Frysinger <vapier@gentoo.org>2021-11-16 02:13:42 -0500
commit85588c9ab947a4edfeedc7c14bd202d15ccfbbff (patch)
tree87aaa3c6e70ba77ea654eacc5dc85e924060749f /sim/bfin
parentfab6939b01da06e1b5f423a8c7f72160b0a1e35d (diff)
downloadgdb-85588c9ab947a4edfeedc7c14bd202d15ccfbbff.zip
gdb-85588c9ab947a4edfeedc7c14bd202d15ccfbbff.tar.gz
gdb-85588c9ab947a4edfeedc7c14bd202d15ccfbbff.tar.bz2
sim: syscall: hoist argc/argn/argnlen to common code
Now that the callback framework supports argv & envp, we can move the Blackfin implementation of these syscalls to the common code.
Diffstat (limited to 'sim/bfin')
-rw-r--r--sim/bfin/interp.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c
index 88ddbd0..f41e9b1 100644
--- a/sim/bfin/interp.c
+++ b/sim/bfin/interp.c
@@ -144,39 +144,6 @@ bfin_syscall (SIM_CPU *cpu)
tbuf += sprintf (tbuf, "exit(%i)", args[0]);
sim_engine_halt (sd, cpu, NULL, PCREG, sim_exited, sc.arg1);
-#ifdef CB_SYS_argc
- case CB_SYS_argc:
- tbuf += sprintf (tbuf, "argc()");
- sc.result = countargv ((char **)argv);
- break;
- case CB_SYS_argnlen:
- {
- tbuf += sprintf (tbuf, "argnlen(%u)", args[0]);
- if (sc.arg1 < countargv ((char **)argv))
- sc.result = strlen (argv[sc.arg1]);
- else
- sc.result = -1;
- }
- break;
- case CB_SYS_argn:
- {
- tbuf += sprintf (tbuf, "argn(%u)", args[0]);
- if (sc.arg1 < countargv ((char **)argv))
- {
- const char *argn = argv[sc.arg1];
- int len = strlen (argn);
- int written = sc.write_mem (cb, &sc, sc.arg2, argn, len + 1);
- if (written == len + 1)
- sc.result = sc.arg2;
- else
- sc.result = -1;
- }
- else
- sc.result = -1;
- }
- break;
-#endif
-
case CB_SYS_gettimeofday:
{
struct timeval _tv, *tv = &_tv;