IDA C++ SDK 9.2
Loading...
Searching...
No Matches
mergemod.hpp
Go to the documentation of this file.
1/*
2 * Interactive disassembler (IDA).
3 * Copyright (c) 2005-2025 Hex-Rays SA <support@hex-rays.com>
4 * ALL RIGHTS RESERVED.
5 */
6
7#ifndef _MERGEMOD_HPP
8#define _MERGEMOD_HPP
9
10#include <merge.hpp>
11
95
96//--------------------------------------------------------------------------
98#define DEFINE_PLUGIN_MH_PARAMS(label,flags) \
99 merge_handler_params_t mhp( \
100 md, /* merge handler data */ \
101 "Plugins/" label, /* default subdir for plugins */ \
102 MERGE_KIND_NONE, /* allocate a merge kind */ \
103 MERGE_KIND_END, /* insert to the end of handler list */ \
104 flags)
105
106//--------------------------------------------------------------------------
110
111//--------------------------------------------------------------------------
113idaman void ida_export create_std_modmerge_handlers(
115 int moddata_id,
116 moddata_diff_helper_t &helper,
117 const merge_node_info_t *merge_node_info=nullptr,
118 size_t n_merge_node_info=0);
119idaman void ida_export create_std_modmerge_handlers2(
121 int moddata_id,
122 moddata_diff_helper_t &helper,
123 const merge_node_info2_t *merge_node_info=nullptr,
124 size_t n_merge_node_info=0);
125
126//--------------------------------------------------------------------------
130template <class MOD_T>
132{
134 const char *mod_name,
135 const char *node_name,
136 const idbattr_info_t *_fields,
137 size_t _nfields)
138 : moddata_diff_helper_t(mod_name, node_name, _fields, _nfields)
139 {
140 }
141 virtual void merge_ending(
143 void *module_data) override
144 {
145 MOD_T &pm = *(MOD_T*)module_data;
146 pm.load_from_idb();
147 }
148};
149
150//--------------------------------------------------------------------------
153#define MODDATA_DIFF_HELPER(class_name, name, label, node_name, idbattrs) \
154 static class_name name(label, node_name, idbattrs, qnumber(idbattrs))
155
156//--------------------------------------------------------------------------
159#define SIMPLE_MODDATA_DIFF_HELPER(name, label, node_name, idbattrs) \
160 MODDATA_DIFF_HELPER(moddata_diff_helper_t, name, \
161 label, node_name, idbattrs)
162
163#endif // _MERGEMOD_HPP
class to contain public info about the merge process
Definition merge.hpp:191
diff_source_idx_t
standard indexes into dbctx_ids[] and similar arrays
Definition diff3.hpp:125
Merge functionality.
idaman void ida_export create_std_modmerge_handlers2(merge_handler_params_t &mhp, int moddata_id, moddata_diff_helper_t &helper, const merge_node_info2_t *merge_node_info=nullptr, size_t n_merge_node_info=0)
idaman void ida_export create_std_modmerge_handlers(merge_handler_params_t &mhp, int moddata_id, moddata_diff_helper_t &helper, const merge_node_info_t *merge_node_info=nullptr, size_t n_merge_node_info=0)
convinience function to create merge handlers for modules/plugins
void create_merge_handlers(class merge_data_t &md)
Prototype of the custom function to create merge handlers.
access to attribute by structure/offset/width or netnode/index/width
Definition ida.hpp:1461
Merge handler parameters.
Definition merge.hpp:317
Definition merge.hpp:552
field descriptor used to organize merging of a netnode array
Definition merge.hpp:543
helper class for module data diff source
Definition merge.hpp:414
moddata_diff_helper_t(const char *_module_name, const char *_netnode_name, const idbattr_info_t *_fields, size_t _nfields)
Definition merge.hpp:422
std_moddata_diff_helper_t(const char *mod_name, const char *node_name, const idbattr_info_t *_fields, size_t _nfields)
Definition mergemod.hpp:133
virtual void merge_ending(diff_source_idx_t, void *module_data) override
Definition mergemod.hpp:141