chore: rename TargetOps to DiffTargetApi

This commit is contained in:
xinyangli 2024-07-15 18:54:07 +08:00
parent 5ddf0b48be
commit cac75f1698
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk
3 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@
#include <vector> #include <vector>
// Target dynamic library has to implement these functions // Target dynamic library has to implement these functions
struct TargetOps { struct DiffTargetApi {
typedef void (*cont_t)(void *args, gdb_action_t *res); typedef void (*cont_t)(void *args, gdb_action_t *res);
cont_t cont; cont_t cont;
@ -48,7 +48,7 @@ struct TargetMeta {
class Target { class Target {
public: public:
TargetOps ops; DiffTargetApi ops;
TargetMeta meta; TargetMeta meta;
arch_info_t arch; arch_info_t arch;
size_t argsize; size_t argsize;

0
src/export.cpp Normal file
View file

View file

@ -18,7 +18,7 @@ Target::Target(const std::string &name, const std::string &func_prefix,
#define LOAD_SYMBOL(ops, handle, prefix, name) \ #define LOAD_SYMBOL(ops, handle, prefix, name) \
do { \ do { \
ops.name = reinterpret_cast<decltype(TargetOps::name)>( \ ops.name = reinterpret_cast<decltype(DiffTargetApi::name)>( \
dlsym(handle, (prefix + #name).c_str())); \ dlsym(handle, (prefix + #name).c_str())); \
if (!ops.name) \ if (!ops.name) \
goto load_error; \ goto load_error; \