bpf: several small fixes in the simulator
authorJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 3 Sep 2020 14:24:51 +0000 (16:24 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 3 Sep 2020 16:22:08 +0000 (18:22 +0200)
commit0316fb52d6eaca5f2398843f57ba08f8d3746056
treedf544c67ceacb4fcf00168b98bd20b6694076a02
parent1d01693f555be09f78cea4e2454c24457777f057
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.
sim/ChangeLog
sim/bpf/bpf-helpers.h
sim/bpf/bpf.c
sim/bpf/configure
sim/bpf/configure.ac
sim/bpf/sim-if.c
sim/bpf/traps.c