bpf: several small fixes in the simulator

This patch fixes the following problems:
- Missing includes in several files leading to implicit function
  declarations.
- Missing prototype for bpf_trace_printk in bpf-helpers.h
- The simulator bitsize was set to 32 bits, causing truncation of
  the program counter.

Tested in bpf-unknown-none.

sim/ChangeLog:

2020-09-03  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* bpf/bpf.c: Include bpf-helpers.h.
	* bpf/bpf-helpers.h: Provide a prototype for bpf_trace_printk.
	* bpf/configure.ac: Set simulator bitsize to 64.
	* bpf/configure (includedir): Regenerate.
	* bpf/sim-if.c: Include stdlib.h.
	* bpf/traps.c: Likewise.
This commit is contained in:
Jose E. Marchesi
2020-09-03 16:24:51 +02:00
parent 1d01693f55
commit 0316fb52d6
7 changed files with 79 additions and 3 deletions

View File

@@ -26,6 +26,6 @@ enum bpf_kernel_helper
#undef DEF_HELPER
};
/* void bpf_trace_printk (const char *fmt); */
void bpf_trace_printk (SIM_CPU *current_cpu);
#endif /* ! BPF_HELPERS_H */