/* Target-dependent code for BPF.
- Copyright (C) 2020 Free Software Foundation, Inc.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
This file is part of GDB.
#include "osabi.h"
#include "target-descriptions.h"
#include "remote.h"
+#include "gdbarch.h"
\f
/* eBPF registers. */
#define BPF_NUM_REGS (BPF_PC_REGNUM + 1)
/* Target-dependent structure in gdbarch. */
-struct gdbarch_tdep
+struct bpf_gdbarch_tdep : gdbarch_tdep
{
};
static void
show_bpf_debug (struct ui_file *file, int from_tty,
- struct cmd_list_element *c, const char *value)
+ struct cmd_list_element *c, const char *value)
{
fprintf_filtered (file, _("Debugging of BPF is %s.\n"), value);
}
static const struct frame_unwind bpf_frame_unwind =
{
+ "bpf prologue",
NORMAL_FRAME,
bpf_frame_unwind_stop_reason,
bpf_frame_this_id,
return arches->gdbarch;
/* Allocate space for the new architecture. */
- struct gdbarch_tdep *tdep = XCNEW (struct gdbarch_tdep);
+ bpf_gdbarch_tdep *tdep = new bpf_gdbarch_tdep;
struct gdbarch *gdbarch = gdbarch_alloc (&info, tdep);
/* Information about registers, etc. */
void _initialize_bpf_tdep ();
void
-_initialize_bpf_tdep (void)
+_initialize_bpf_tdep ()
{
register_gdbarch_init (bfd_arch_bpf, bpf_gdbarch_init);