aboutsummaryrefslogtreecommitdiffstats
path: root/hw/goldfish_trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/goldfish_trace.c')
-rw-r--r--hw/goldfish_trace.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/goldfish_trace.c b/hw/goldfish_trace.c
index a7e589d..fc338c8 100644
--- a/hw/goldfish_trace.c
+++ b/hw/goldfish_trace.c
@@ -15,8 +15,11 @@
*/
#include "qemu_file.h"
#include "goldfish_trace.h"
+#include "sysemu.h"
+#include "trace.h"
#ifdef CONFIG_MEMCHECK
#include "memcheck/memcheck.h"
+#include "memcheck/memcheck_util.h"
#endif // CONFIG_MEMCHECK
//#define DEBUG 1
@@ -46,6 +49,8 @@ static void trace_dev_write(void *opaque, target_phys_addr_t offset, uint32_t va
{
trace_dev_state *s = (trace_dev_state *)opaque;
+ (void)s;
+
switch (offset >> 2) {
case TRACE_DEV_REG_SWITCH: // context switch, switch to pid
if (trace_filename != NULL) {
@@ -128,7 +133,7 @@ static void trace_dev_write(void *opaque, target_phys_addr_t offset, uint32_t va
cmdlen = value;
break;
case TRACE_DEV_REG_CMDLINE: // execve, process cmdline
- cpu_memory_rw_debug(cpu_single_env, value, exec_arg, cmdlen, 0);
+ cpu_memory_rw_debug(cpu_single_env, value, (uint8_t*)exec_arg, cmdlen, 0);
if (trace_filename != NULL) {
trace_execve(exec_arg, cmdlen);
}
@@ -351,6 +356,8 @@ static uint32_t trace_dev_read(void *opaque, target_phys_addr_t offset)
{
trace_dev_state *s = (trace_dev_state *)opaque;
+ (void)s;
+
switch (offset >> 2) {
case TRACE_DEV_REG_ENABLE: // tracing enable
return tracing;
@@ -378,7 +385,6 @@ static CPUWriteMemoryFunc *trace_dev_writefn[] = {
/* initialize the trace device */
void trace_dev_init()
{
- int iomemtype;
trace_dev_state *s;
s = (trace_dev_state *)qemu_mallocz(sizeof(trace_dev_state));