| 1 |
// Copyright (c) Meta Platforms, Inc. and affiliates. |
| 2 |
// SPDX-License-Identifier: LGPL-2.1-or-later |
| 3 |
|
| 4 |
// Fallback implementations for builds without Python support. |
| 5 |
|
| 6 |
#include "plugins.h" |
| 7 |
#include "program.h" |
| 8 |
|
| 9 |
LIBDRGN_PUBLIC struct drgn_error * |
| 10 |
drgn_program_create(const struct drgn_platform *platform, |
| 11 |
struct drgn_program **ret) |
| 12 |
{ |
| 13 |
struct drgn_program *prog = malloc(sizeof(*prog)); |
| 14 |
if (!prog) |
| 15 |
return &drgn_enomem; |
| 16 |
drgn_program_init(prog, platform); |
| 17 |
*ret = prog; |
| 18 |
return NULL; |
| 19 |
} |
| 20 |
|
| 21 |
LIBDRGN_PUBLIC void drgn_program_destroy(struct drgn_program *prog) |
| 22 |
{ |
| 23 |
if (prog) { |
| 24 |
drgn_program_deinit(prog); |
| 25 |
free(prog); |
| 26 |
} |
| 27 |
} |
| 28 |
|
| 29 |
void drgn_call_plugins_prog(const char *name, struct drgn_program *prog) |
| 30 |
{ |
| 31 |
} |
| 32 |
|
| 33 |
drgn_blocking_state drgn_begin_blocking(void) |
| 34 |
{ |
| 35 |
return NULL; |
| 36 |
} |
| 37 |
|
| 38 |
void drgn_end_blocking(drgn_blocking_state state) |
| 39 |
{ |
| 40 |
} |
| 41 |
|
| 42 |
struct drgn_error * |
| 43 |
drgn_blocking_check_signals(drgn_blocking_state *statep) |
| 44 |
{ |
| 45 |
return NULL; |
| 46 |
} |