summaryrefslogtreecommitdiff
path: root/bsd-user/main.c
diff options
context:
space:
mode:
authorhyokeun <hyokeun.jeon@samsung.com>2016-12-27 17:29:09 +0900
committerhyokeun <hyokeun.jeon@samsung.com>2016-12-27 17:29:09 +0900
commit2a84d37c88d606fda46a565bcc80e173b4d0a80a (patch)
tree8b755bb78271e76e13fb7db38b670dbc443479e7 /bsd-user/main.c
parentbd54c25035217800f3b1d39f6472d599cd602d5a (diff)
downloadqemu-2a84d37c88d606fda46a565bcc80e173b4d0a80a.tar.gz
qemu-2a84d37c88d606fda46a565bcc80e173b4d0a80a.tar.bz2
qemu-2a84d37c88d606fda46a565bcc80e173b4d0a80a.zip
Imported Upstream version 2.6.1upstream/2.6.1upstream
Diffstat (limited to 'bsd-user/main.c')
-rw-r--r--bsd-user/main.c39
1 files changed, 11 insertions, 28 deletions
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 0fb08e405..27854c1f9 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -17,23 +17,18 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
-#include "qemu-version.h"
#include <machine/trap.h>
+#include <sys/mman.h>
-#include "qapi/error.h"
#include "qemu.h"
-#include "qemu/config-file.h"
#include "qemu/path.h"
#include "qemu/help_option.h"
/* For tb_lock */
#include "cpu.h"
-#include "exec/exec-all.h"
#include "tcg.h"
#include "qemu/timer.h"
#include "qemu/envlist.h"
#include "exec/log.h"
-#include "trace/control.h"
-#include "glib-compat.h"
int singlestep;
unsigned long mmap_min_addr;
@@ -172,7 +167,7 @@ void cpu_loop(CPUX86State *env)
//target_siginfo_t info;
for(;;) {
- trapnr = cpu_exec(cs);
+ trapnr = cpu_x86_exec(cs);
switch(trapnr) {
case 0x80:
/* syscall from int $0x80 */
@@ -513,7 +508,7 @@ void cpu_loop(CPUSPARCState *env)
//target_siginfo_t info;
while (1) {
- trapnr = cpu_exec(cs);
+ trapnr = cpu_sparc_exec(cs);
switch (trapnr) {
#ifndef TARGET_SPARC64
@@ -668,8 +663,7 @@ void cpu_loop(CPUSPARCState *env)
static void usage(void)
{
- printf("qemu-" TARGET_NAME " version " QEMU_VERSION QEMU_PKGVERSION
- ", " QEMU_COPYRIGHT "\n"
+ printf("qemu-" TARGET_NAME " version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"
"usage: qemu-" TARGET_NAME " [options] program [arguments...]\n"
"BSD CPU emulator (compiled for %s emulation)\n"
"\n"
@@ -692,8 +686,6 @@ static void usage(void)
"-p pagesize set the host page size to 'pagesize'\n"
"-singlestep always run in singlestep mode\n"
"-strace log system calls\n"
- "-trace [[enable=]<pattern>][,events=<file>][,file=<file>]\n"
- " specify tracing options\n"
"\n"
"Environment variables:\n"
"QEMU_STRACE Print system calls and arguments similar to the\n"
@@ -742,7 +734,6 @@ int main(int argc, char **argv)
int gdbstub_port = 0;
char **target_environ, **wrk;
envlist_t *envlist = NULL;
- char *trace_file = NULL;
bsd_type = target_openbsd;
if (argc <= 1)
@@ -761,11 +752,12 @@ int main(int argc, char **argv)
}
cpu_model = NULL;
-
- qemu_add_opts(&qemu_trace_opts);
+#if defined(cpudef_setup)
+ cpudef_setup(); /* parse cpu definitions in target config file (TBD) */
+#endif
optind = 1;
- for (;;) {
+ for(;;) {
if (optind >= argc)
break;
r = argv[optind];
@@ -850,17 +842,14 @@ int main(int argc, char **argv)
singlestep = 1;
} else if (!strcmp(r, "strace")) {
do_strace = 1;
- } else if (!strcmp(r, "trace")) {
- g_free(trace_file);
- trace_file = trace_opt_parse(optarg);
- } else {
+ } else
+ {
usage();
}
}
/* init debug */
- qemu_log_needs_buffers();
- qemu_set_log_filename(log_file, &error_fatal);
+ qemu_set_log_filename(log_file);
if (log_mask) {
int mask;
@@ -877,11 +866,6 @@ int main(int argc, char **argv)
}
filename = argv[optind];
- if (!trace_init_backends()) {
- exit(1);
- }
- trace_init_file(trace_file);
-
/* Zero out regs */
memset(regs, 0, sizeof(struct target_pt_regs));
@@ -1133,7 +1117,6 @@ int main(int argc, char **argv)
gdbserver_start (gdbstub_port);
gdb_handlesig(cpu, 0);
}
- trace_init_vcpu_events();
cpu_loop(env);
/* never exits */
return 0;