IDA C++ SDK 9.2
Loading...
Searching...
No Matches
merge.hpp
Go to the documentation of this file.
1/*
2 * Interactive disassembler (IDA).
3 * Copyright (c) 2005-2026 Hex-Rays SA <support@hex-rays.com>
4 * ALL RIGHTS RESERVED.
5 *
6 */
7
8#ifndef _MERGE_HPP
9#define _MERGE_HPP
10
11#include <functional>
12#include <queue>
13#include <nalt.hpp>
14#include <diff3.hpp>
15
103
104#ifdef switch_dbctx
105 #define ui_switch_dbctx_guard switch_dbctx
106 #undef switch_dbctx
107#endif
108
109//------------------------------------------------------------------------
111enum merge_kind_t ENUM_SIZE(uint32)
112{
113 MERGE_KIND_NETNODE,
114 MERGE_KIND_AUTOQ,
115 MERGE_KIND_INF,
116 MERGE_KIND_ENCODINGS,
117 MERGE_KIND_ENCODINGS2,
118 MERGE_KIND_SCRIPTS2,
119 MERGE_KIND_SCRIPTS,
120 MERGE_KIND_CUSTDATA,
121 MERGE_KIND_CUSTCNV,
122 MERGE_KIND_ENUMS,
123 MERGE_KIND_STRUCTS,
124 MERGE_KIND_TILS,
125 MERGE_KIND_TINFO,
126 MERGE_KIND_STRMEM,
127 MERGE_KIND_UDTMEM,
128 MERGE_KIND_GHSTRCMT,
129 MERGE_KIND_STRMEMCMT,
130 MERGE_KIND_SELECTORS,
131 MERGE_KIND_STT,
132 MERGE_KIND_SEGMENTS,
133 MERGE_KIND_SEGGRPS,
134 MERGE_KIND_SEGREGS,
135 MERGE_KIND_ORPHANS,
136 MERGE_KIND_BYTEVAL,
137 MERGE_KIND_FIXUPS,
138 MERGE_KIND_MAPPING,
139 MERGE_KIND_EXPORTS,
140 MERGE_KIND_IMPORTS,
141 MERGE_KIND_PATCHES,
142 MERGE_KIND_FLAGS,
143 MERGE_KIND_EXTRACMT,
144 MERGE_KIND_AFLAGS_EA,
145 MERGE_KIND_IGNOREMICRO,
146 MERGE_KIND_FILEREGIONS,
147 MERGE_KIND_HIDDENRANGES,
148 MERGE_KIND_SOURCEFILES,
149 MERGE_KIND_FUNC,
150 MERGE_KIND_FRAMEMGR,
151 MERGE_KIND_FRAME,
152 MERGE_KIND_STKPNTS,
153 MERGE_KIND_FLOWS,
154 MERGE_KIND_CREFS,
155 MERGE_KIND_DREFS,
156 MERGE_KIND_BPTS,
157 MERGE_KIND_WATCHPOINTS,
158 MERGE_KIND_BOOKMARKS,
159 MERGE_KIND_TRYBLKS,
160 MERGE_KIND_DIRTREE,
161 MERGE_KIND_VFTABLES,
162 MERGE_KIND_SIGNATURES,
163 MERGE_KIND_PROBLEMS,
164 MERGE_KIND_UI,
165 MERGE_KIND_DEKSTOPS,
166 MERGE_KIND_NOTEPAD,
167 MERGE_KIND_LOADER,
168 MERGE_KIND_DEBUGGER,
169 MERGE_KIND_DBG_MEMREGS,
170 MERGE_KIND_LUMINA,
171 MERGE_KIND_LAST,
174#ifndef SWIG
175 MERGE_KIND_END = merge_kind_t(-2),
178 MERGE_KIND_NONE = merge_kind_t(-1)
179#else // Kludge to support IDAPython build with SWiG 4.2
180 MERGE_KIND_END = UINT32_MAX - 2,
181 MERGE_KIND_NONE = UINT32_MAX - 1,
182#endif
183};
184
185//------------------------------------------------------------------------
186class merge_handler_t;
187class merge_data_t;
189//--------------------------------------------------------------------------
191idaman bool ida_export is_diff_merge_mode();
192
193//--------------------------------------------------------------------------
196{
197public:
204 {
207 virtual ea_t get_block_head(merge_data_t &md, diff_source_idx_t idx, ea_t item_head) = 0;
208
211 virtual bool setup_blocks(
212 merge_data_t &md,
215 const diff_range_t &region) = 0;
216
218 };
219
220 class merge_mappers_t &mappers;
221
222 int dbctx_ids[3] = { -1, -1, -1 };
223 int nbases = 0;
227 merge_handler_t *last_udt_related_merger = nullptr;
228
230 virtual ~merge_data_t();
231 merge_data_t(const merge_data_t &) = delete;
232 void operator=(const merge_data_t &) = delete;
233
234 void set_dbctx_ids(int local, int remote, int base)
235 {
236 dbctx_ids[LOCAL_IDX] = local;
237 dbctx_ids[REMOTE_IDX] = remote;
238 dbctx_ids[BASE_IDX] = base;
239 nbases = base != -1 ? 3 : 2;
240 }
241
242 int local_id() const { return dbctx_ids[LOCAL_IDX]; }
243 int remote_id() const { return dbctx_ids[REMOTE_IDX]; }
244 int base_id() const { return dbctx_ids[BASE_IDX]; }
245
246 void add_event_handler(merge_handler_t *handler) { ev_handlers.push_back(handler); }
247 void remove_event_handler(merge_handler_t *handler) { ev_handlers.del(handler); }
248
250 {
251 return item_block_locator == nullptr
252 ? item_head
253 : item_block_locator->get_block_head(*this, idx, item_head);
254 }
255 bool setup_blocks(diff_source_idx_t dst_idx, diff_source_idx_t src_idx, const diff_range_t &region)
256 {
257 return item_block_locator != nullptr
258 && item_block_locator->setup_blocks(*this, dst_idx, src_idx, region);
259 }
260
261 // make these functions virtual to be available from plugins
262
264 virtual bool has_existing_node(const char *nodename) const;
265
273 virtual bool map_privrange_id(
274 tid_t *tid,
275 ea_t ea,
278 bool strict=true);
279
287 virtual bool map_tinfo(
288 tinfo_t *tif,
291 bool strict=true);
292
300 const tinfo_t &tif1,
301 diff_source_idx_t diffidx1,
302 const tinfo_t &tif2,
303 diff_source_idx_t diffidx2) const;
304};
305
306
307//------------------------------------------------------------------------
323{
326 merge_kind_t kind;
327 merge_kind_t insert_after;
329#define MH_LISTEN 0x00000001
330#define MH_TERSE 0x00000002
331#define MH_UI_NODETAILS 0x00000100
332#define MH_UI_COMPLEX 0x00000200
333#define MH_UI_DP_NOLINEDIFF 0x00000400
334#define MH_UI_DP_SHORTNAME 0x00000800
335#define MH_UI_INDENT 0x00001000
336#define MH_UI_SPLITNAME 0x00800000
338#define MH_UI_CHAR_MASK 0x007F0000
339#define MH_UI_DEF_CHAR(v) ((((v) & 0x7F) << 16) | MH_UI_SPLITNAME)
341#ifndef SWIG
342#define MH_UI_COMMANAME MH_UI_DEF_CHAR(',')
343#else
344#define MH_UI_COMMANAME 0x00AC0000
345#endif
347#ifndef SWIG
348#define MH_UI_COLONNAME MH_UI_DEF_CHAR(':')
349#else
350#define MH_UI_COLONNAME 0x00BA0000
351#endif
353#define MH_DUMMY 0x80000000
354
356 merge_data_t &_md,
357 const qstring &_label,
358 merge_kind_t _kind,
359 merge_kind_t _insert_after,
360 uint32 _mh_flags)
361 : md(_md),
362 label(_label),
363 kind(_kind),
364 insert_after(_insert_after),
365 mh_flags(_mh_flags)
366 {}
367
369 static bool ui_has_details(uint32 _mh_flags) { return (_mh_flags & MH_UI_NODETAILS) == 0; }
370 bool ui_has_details() const { return ui_has_details(mh_flags); }
371
375 static bool ui_complex_details(uint32 _mh_flags) { return (_mh_flags & MH_UI_COMPLEX) != 0; }
377
385 static bool ui_complex_name(uint32 _mh_flags) { return (_mh_flags & MH_UI_SPLITNAME) != 0; }
386 bool ui_complex_name() const { return ui_complex_name(mh_flags); }
387 static char ui_split_char(uint32 _mh_flags) { return (_mh_flags >> 16) & 0x7F; }
388 char ui_split_char() const { return ui_split_char(mh_flags); }
389 static qstring ui_split_str(uint32 _mh_flags) { return qstring(1, ui_split_char(_mh_flags)); }
391
400 static bool ui_dp_shortname(uint32 _mh_flags) { return (_mh_flags & MH_UI_DP_SHORTNAME) != 0; }
401 bool ui_dp_shortname() const { return ui_dp_shortname(mh_flags); }
402
407 static bool ui_linediff(uint32 _mh_flags) { return (_mh_flags & MH_UI_DP_NOLINEDIFF) == 0; }
408 bool ui_linediff() const { return ui_linediff(mh_flags); }
409
412 static bool ui_indent(uint32 _mh_flags) { return (_mh_flags & MH_UI_INDENT) != 0; }
413 bool ui_indent() const { return ui_indent(mh_flags); }
414};
415
416//------------------------------------------------------------------------
417
420{
421 const char *module_name = nullptr;
422 const char *netnode_name = nullptr;
423 const idbattr_info_t *fields = nullptr;
424 size_t nfields = 0;
425 uint32 additional_mh_flags = MH_UI_NODETAILS;
427
429 const char *_module_name,
430 const char *_netnode_name,
431 const idbattr_info_t *_fields,
432 size_t _nfields)
433 : module_name(_module_name),
434 netnode_name(_netnode_name),
435 fields(_fields),
436 nfields(_nfields)
437 {
438 }
440
441 virtual void merge_starting(diff_source_idx_t /*diffidx*/, void * /*module_data*/) {}
442 virtual void merge_ending(diff_source_idx_t /*diffidx*/, void * /*module_data*/) {}
443 virtual void *get_struc_ptr(merge_data_t &/*md*/, diff_source_idx_t /*diffidx*/, const idbattr_info_t &/*fi*/) { INTERR(2048); }
444 virtual void print_diffpos_details(qstrvec_t * /*out*/, const idbattr_info_t &/*fi*/) {}
445 virtual bool val2str(qstring * /*out*/, const idbattr_info_t &/*fi*/, uint64 /*value*/) { return false; }
446 virtual bool str2val(uint64 * /*out*/, const idbattr_info_t &/*fi*/, const char * /*strvals*/) { return false; }
447};
448
450{
451 NDS_IS_BOOL = 0x0001,
452 NDS_IS_EA = 0x0002,
454 NDS_IS_STR = 0x0008,
455 NDS_SUPVAL = 0x0010,
456 NDS_BLOB = 0x0020,
457 NDS_EV_RANGE = 0x0040,
458 NDS_EV_FUNC = 0x0080,
459 NDS_MAP_IDX = 0x0100,
460 NDS_MAP_VAL = 0x0200,
466 NDS_VAL8 = 0x1000,
467 NDS_INC = 0x2000,
468 NDS_UI_ND = 0x4000,
470};
471
472//--------------------------------------------------------------------------
475{
477
480 virtual qstring print_entry_name(uchar /*tag*/, nodeidx_t /*ndx*/, void * /*module_data*/) const { return qstring(); }
481
485 virtual void print_entry_details(qstrvec_t * /*out*/, uchar /*tag*/, nodeidx_t /*ndx*/, void * /*module_data*/) const {}
486
489 virtual void get_column_headers(qstrvec_t * /*headers*/, uchar /*tag*/, void * /*module_data*/) const {}
490
492 virtual bool is_mergeable(uchar /*tag*/, nodeidx_t /*ndx*/) const { return true; }
493
496 virtual netnode get_netnode() const { return BADNODE; }
497
499 virtual void map_scalar(
500 nodeidx_t * /*scalar_value*/,
501 void * /*module_data*/,
502 diff_source_idx_t /*from*/,
503 diff_source_idx_t /*to*/) const
504 {
505 }
506 virtual void map_string(
507 qstring * /*string_value*/,
508 void * /*module_data*/,
509 diff_source_idx_t /*from*/,
510 diff_source_idx_t /*to*/) const
511 {
512 }
513 virtual void map_value(
514 bytevec_t * /*value*/,
515 void * /*module_data*/,
516 diff_source_idx_t /*from*/,
517 diff_source_idx_t /*to*/) const
518 {
519 }
520
523 virtual void refresh(uchar /*tag*/, void * /*module_data*/) {}
524
527 virtual const char *get_logname() const { return nullptr; }
528
530 static void append_eavec(qstring *s, const char *prefix, const eavec_t &eas)
531 {
532 s->append(prefix);
533 s->append(" [");
534 if ( !eas.empty() )
535 {
536 for ( const auto ea : eas )
537 s->cat_sprnt("%a,", ea);
538 s->remove_last();
539 }
540 s->append(']');
541 }
542};
544using merge_node_hlpfunc_creator_t = std::function<merge_node_helper_creator_t>;
545
546//--------------------------------------------------------------------------
566
577idaman merge_handler_t *ida_export create_nodeval_merge_handler(
578 const merge_handler_params_t &mhp,
579 const char *label,
580 int moddata_id,
581 const char *nodename,
582 uchar tag,
583 uint32 nds_flags,
584 merge_node_hlpfunc_creator_t nhc = nullptr,
585 bool skip_empty_nodes = true);
586idaman merge_handler_t *ida_export create_nodeval_merge_handler2(
587 const merge_handler_params_t &mhp,
588 const char *label,
589 int moddata_id,
590 const char *nodename,
591 uchar tag,
592 uint32 nds_flags,
593 merge_node_helper_t *node_helper = nullptr, // owned by the caller
594 bool skip_empty_nodes = true);
595
606idaman void ida_export create_nodeval_merge_handlers(
607 merge_handlers_t *out,
608 const merge_handler_params_t &mhp,
609 int moddata_id,
610 const char *nodename,
611 const merge_node_info_t *valdesc,
612 size_t nvals,
613 bool skip_empty_nodes = true);
614idaman void ida_export create_nodeval_merge_handlers2(
615 merge_handlers_t *out,
616 const merge_handler_params_t &mhp,
617 int moddata_id,
618 const char *nodename,
619 const merge_node_info2_t *valdesc,
620 size_t nvals,
621 bool skip_empty_nodes = true);
622
623//------------------------------------------------------------------------
624// macros for convenience to be used in modules:
625
627#define IDI_FLDENTRY(struc, field, mask, valmap, name) \
628 { name, /* field description */ \
629 qoffsetof(struc, field), /* offset */ \
630 sizeof(struc::field), /* width */ \
631 mask, /* bitmask */ \
632 0, /* tag (for node values only) */ \
633 valmap, /* vmap */ \
634 nullptr, /* individual_node */ \
635 IDI_STRUCFLD|IDI_SCALAR } /* flags */
636
638#define IDI_FLDQSTR(struc, field, name) \
639 { name, qoffsetof(struc, field), 0, 0, 0, nullptr, nullptr, IDI_STRUCFLD|IDI_QSTRING }
640
642#define IDI_ALTENTRY(altidx, tag, width, mask, valmap, name) \
643 { name, /* field description */ \
644 uintptr_t(altidx), /* altval index */ \
645 width, /* width */ \
646 mask, /* bitmask */ \
647 tag, /* tag (for node values only) */ \
648 valmap, /* vmap */ \
649 nullptr, /* individual_node */ \
650 IDI_ALTVAL|IDI_SCALAR } /* flags */
651
653#define IDI_HASHENTRY(hashname, tag, width, mask, flag, valmap, name) \
654 { name, /* field description */ \
655 uintptr_t(hashname), /* hash name */ \
656 width, /* width */ \
657 mask, /* bitmask */ \
658 tag, /* tag (for node values only) */ \
659 valmap, /* vmap */ \
660 nullptr, /* individual_node */ \
661 IDI_HASH|(flag) } /* flags */
662
664#define IDI_SUPSTR(altidx, tag, name) \
665 { name, uintptr_t(altidx), 0, 0, tag, nullptr, nullptr, IDI_SUPVAL|IDI_CSTR }
666
668#define IDI_DEVICE_ENTRY IDI_SUPSTR(-1, stag, "device")
669
671#define MNI_ENTRY(tag, flags, name, helper) \
672 { name, tag, NDS_MAP_IDX|NDS_EV_RANGE|(flags), helper }
673
675#define MNI_FUNCENTRY(tag, flags, name) \
676 MNI_ENTRY(tag, NDS_EV_FUNC|(flags), name, nullptr)
677
679#define MNI_STDENTRY(tag, flags, name) MNI_ENTRY(tag, flags, name, nullptr)
680//------------------------------------------------------------------------
681idaman void ida_export destroy_moddata_merge_handlers(int data_id);
682
683#ifdef ui_switch_dbctx_guard
684 #define switch_dbctx ui_switch_dbctx_guard
685#endif
686
687//------------------------------------------------------------------------
692idaman ssize_t ida_export get_ea_diffpos_name(qstring *out, ea_t ea);
693#endif // _MERGE_HPP
void remove_last(int cnt=1)
Definition pro.h:3228
_qstring & append(qchar c)
Append c to the end of the qstring.
Definition pro.h:3569
Vector of bytes (use for dynamic memory)
Definition pro.h:3850
class to contain public info about the merge process
Definition merge.hpp:196
int remote_id() const
Definition merge.hpp:243
void set_dbctx_ids(int local, int remote, int base)
Definition merge.hpp:234
void remove_event_handler(merge_handler_t *handler)
Definition merge.hpp:247
virtual bool map_privrange_id(tid_t *tid, ea_t ea, diff_source_idx_t from, diff_source_idx_t to, bool strict=true)
map IDs of structures, enumerations and their members
merge_handlers_t ev_handlers
event handlers
Definition merge.hpp:225
void operator=(const merge_data_t &)=delete
virtual bool has_existing_node(const char *nodename) const
check that node exists in any of databases
bool setup_blocks(diff_source_idx_t dst_idx, diff_source_idx_t src_idx, const diff_range_t &region)
Definition merge.hpp:255
virtual int compare_merging_tifs(const tinfo_t &tif1, diff_source_idx_t diffidx1, const tinfo_t &tif2, diff_source_idx_t diffidx2) const
compare types from two databases
int base_id() const
Definition merge.hpp:244
merge_data_t(const merge_data_t &)=delete
void add_event_handler(merge_handler_t *handler)
Definition merge.hpp:246
ea_t get_block_head(diff_source_idx_t idx, ea_t item_head)
Definition merge.hpp:249
item_block_locator_t * item_block_locator
Definition merge.hpp:226
int dbctx_ids[3]
local, remote, base ids
Definition merge.hpp:222
class merge_mappers_t & mappers
Definition merge.hpp:220
int nbases
number of database participating in merge process, maybe 2 or 3
Definition merge.hpp:223
int local_id() const
Definition merge.hpp:242
virtual bool map_tinfo(tinfo_t *tif, diff_source_idx_t from, diff_source_idx_t to, bool strict=true)
migrate type, replaces type references into FROM database to references into TO database
merge_handler_t * last_udt_related_merger
Definition merge.hpp:227
virtual ~merge_data_t()
Definition of the IDA database node.
Definition netnode.hpp:241
Reimplementation of vector class from STL.
Definition pro.h:2262
bool empty(void) const
Does the qvector have 0 elements?
Definition pro.h:2495
Primary mechanism for managing type information.
Definition typeinf.hpp:3077
3-way diff for anchored info
diff_source_idx_t
standard indexes into dbctx_ids[] and similar arrays
Definition diff3.hpp:125
@ BASE_IDX
Definition diff3.hpp:129
@ LOCAL_IDX
Definition diff3.hpp:127
@ REMOTE_IDX
Definition diff3.hpp:128
unsigned __int64 uint64
Definition llong.hpp:13
qvector< qstring > qstrvec_t
Definition lumina.hpp:831
std::function< merge_node_helper_creator_t > merge_node_hlpfunc_creator_t
Definition merge.hpp:544
idaman bool ida_export is_diff_merge_mode()
Return TRUE if IDA is running in diff mode (MERGE_POLICY_MDIFF/MERGE_POLICY_VDIFF)
idaman void ida_export destroy_moddata_merge_handlers(int data_id)
nds_flags_t
netnode value modificators (to be used in nodeval_diff_source, see below)
Definition merge.hpp:450
@ NDS_MAP_IDX
apply ea2node() to index (==NETMAP_IDX)
Definition merge.hpp:459
@ NDS_EV_RANGE
enable default handling of mev_modified_ranges, mev_deleting_segm
Definition merge.hpp:457
@ NDS_IS_EA
EA value.
Definition merge.hpp:452
@ NDS_IS_STR
string value
Definition merge.hpp:454
@ NDS_IS_BOOL
boolean value
Definition merge.hpp:451
@ NDS_IS_RELATIVE
value is relative to index (stored as delta)
Definition merge.hpp:453
@ NDS_SUPVAL
stored as netnode supvals (not scalar)
Definition merge.hpp:455
@ NDS_BLOB
stored as netnode blobs
Definition merge.hpp:456
@ NDS_EV_FUNC
enable default handling of mev_added_func/mev_deleting_func/mev_added_function/mev_deleting_function
Definition merge.hpp:458
@ NDS_MAP_VAL
apply ea2node() to value.
Definition merge.hpp:460
@ NDS_VAL8
use 8-bit values (==NETMAP_V8)
Definition merge.hpp:466
@ NDS_UI_ND
UI: no need to show diffpos detail pane, MH_UI_NODETAILS, make sense if merge_node_helper_t is used.
Definition merge.hpp:468
@ NDS_INC
stored value is incremented (scalars only)
Definition merge.hpp:467
qvector< merge_handler_t * > merge_handlers_t
Definition merge.hpp:188
idaman void ida_export create_nodeval_merge_handlers2(merge_handlers_t *out, const merge_handler_params_t &mhp, int moddata_id, const char *nodename, const merge_node_info2_t *valdesc, size_t nvals, bool skip_empty_nodes=true)
idaman ssize_t ida_export get_ea_diffpos_name(qstring *out, ea_t ea)
Get nice name for EA diffpos.
DECLARE_TYPE_AS_MOVABLE(merge_node_info_t)
idaman void ida_export create_nodeval_merge_handlers(merge_handlers_t *out, const merge_handler_params_t &mhp, int moddata_id, const char *nodename, const merge_node_info_t *valdesc, size_t nvals, bool skip_empty_nodes=true)
Create a serie of merge handlers for netnode scalar/string values (call create_nodeval_merge_handler(...
idaman merge_handler_t *ida_export create_nodeval_merge_handler2(const merge_handler_params_t &mhp, const char *label, int moddata_id, const char *nodename, uchar tag, uint32 nds_flags, merge_node_helper_t *node_helper=nullptr, bool skip_empty_nodes=true)
enum merge_kind_t ENUM_SIZE(uint32)
Kinds of merge handlers.
Definition merge.hpp:111
idaman merge_handler_t *ida_export create_nodeval_merge_handler(const merge_handler_params_t &mhp, const char *label, int moddata_id, const char *nodename, uchar tag, uint32 nds_flags, merge_node_hlpfunc_creator_t nhc=nullptr, bool skip_empty_nodes=true)
Create a merge handler for netnode scalar/string values.
merge_node_helper_t * merge_node_helper_creator_t(merge_data_t &md, int dbctx_id)
Definition merge.hpp:543
Definitions of various information kept in netnodes.
nodeidx64_t nodeidx_t
Definition netnode.hpp:114
unsigned int uint32
unsigned 32 bit value
Definition pro.h:352
uint64 ea_t
Definition pro.h:425
unsigned char uchar
unsigned 8 bit value
Definition pro.h:341
qvector< ea_t > eavec_t
vector of addresses
Definition pro.h:2838
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition pro.h:385
ea_t tid_t
type id (for enums, structs, etc)
Definition pro.h:5107
_qstring< char > qstring
regular string
Definition pro.h:3771
A range of the difference source.
Definition diff3.hpp:30
access to attribute by structure/offset/width or netnode/index/width
Definition ida.hpp:1478
several items can be grouped into a block.
Definition merge.hpp:204
virtual ea_t get_block_head(merge_data_t &md, diff_source_idx_t idx, ea_t item_head)=0
get block address (address of first item in the block) by address of item this function returns item ...
virtual ~item_block_locator_t()
Definition merge.hpp:217
virtual bool setup_blocks(merge_data_t &md, diff_source_idx_t from, diff_source_idx_t to, const diff_range_t &region)=0
setup block-specific info before region updating, return FALSE if nothing was changed
Merge handler parameters.
Definition merge.hpp:323
merge_kind_t insert_after
desired position inside 'handlers' merge_kind_t
Definition merge.hpp:327
merge_handler_params_t(merge_data_t &_md, const qstring &_label, merge_kind_t _kind, merge_kind_t _insert_after, uint32 _mh_flags)
Definition merge.hpp:355
static bool ui_complex_details(uint32 _mh_flags)
Do not display the diffpos details in the chooser.
Definition merge.hpp:375
static bool ui_dp_shortname(uint32 _mh_flags)
The detail pane shows the diffpos details for the current diffpos range as a tree-like view.
Definition merge.hpp:400
bool ui_indent() const
Definition merge.hpp:413
qstring ui_split_str() const
Definition merge.hpp:390
bool ui_complex_name() const
Definition merge.hpp:386
bool ui_has_details() const
Definition merge.hpp:370
bool ui_linediff() const
Definition merge.hpp:408
bool ui_complex_details() const
Definition merge.hpp:376
static qstring ui_split_str(uint32 _mh_flags)
Definition merge.hpp:389
static bool ui_indent(uint32 _mh_flags)
In the ordinary situation the spaces from the both sides of diffpos name are trimmed.
Definition merge.hpp:412
merge_kind_t kind
merge handler kind merge_kind_t
Definition merge.hpp:326
bool ui_dp_shortname() const
Definition merge.hpp:401
merge_data_t & md
Definition merge.hpp:324
qstring label
Definition merge.hpp:325
static bool ui_linediff(uint32 _mh_flags)
In detail pane IDA shows difference between diffpos details.
Definition merge.hpp:407
uint32 mh_flags
Definition merge.hpp:328
char ui_split_char() const
Definition merge.hpp:388
static bool ui_complex_name(uint32 _mh_flags)
It customary to create long diffpos names having many components that are separated by any 7-bit ASCI...
Definition merge.hpp:385
static char ui_split_char(uint32 _mh_flags)
Definition merge.hpp:387
static bool ui_has_details(uint32 _mh_flags)
Should IDA display the diffpos detail pane?
Definition merge.hpp:369
abstract adapter to provide access to non-standard netnode array entries
Definition merge.hpp:475
virtual void map_string(qstring *, void *, diff_source_idx_t, diff_source_idx_t) const
Definition merge.hpp:506
virtual qstring print_entry_name(uchar, nodeidx_t, void *) const
print the name of the specified entry (to be used in print_diffpos_name)
Definition merge.hpp:480
virtual ~merge_node_helper_t()
Definition merge.hpp:476
virtual void map_scalar(nodeidx_t *, void *, diff_source_idx_t, diff_source_idx_t) const
map scalar/string/buffered value
Definition merge.hpp:499
virtual void get_column_headers(qstrvec_t *, uchar, void *) const
get column headers for chooser (to be used in linear_diff_source_t::get_column_headers)
Definition merge.hpp:489
virtual void map_value(bytevec_t *, void *, diff_source_idx_t, diff_source_idx_t) const
Definition merge.hpp:513
virtual netnode get_netnode() const
return netnode to be used as source.
Definition merge.hpp:496
static void append_eavec(qstring *s, const char *prefix, const eavec_t &eas)
can be used by derived classes
Definition merge.hpp:530
virtual const char * get_logname() const
return name of netnode to be used in logging.
Definition merge.hpp:527
virtual void print_entry_details(qstrvec_t *, uchar, nodeidx_t, void *) const
print the details of the specified entry usually contains multiple lines, one for each attribute or d...
Definition merge.hpp:485
virtual bool is_mergeable(uchar, nodeidx_t) const
filter: check if we should perform merging for given record
Definition merge.hpp:492
virtual void refresh(uchar, void *)
notify helper that some data was changed in the database and internal structures (e....
Definition merge.hpp:523
Definition merge.hpp:558
const char * name
name of the array (label)
Definition merge.hpp:559
uchar tag
a tag used to access values in the netnode
Definition merge.hpp:560
uint32 nds_flags
node value attributes (a combination of nds_flags_t)
Definition merge.hpp:561
merge_node_helper_t * node_helper
merge handler creation helper, foreign owner
Definition merge.hpp:562
field descriptor used to organize merging of a netnode array
Definition merge.hpp:549
merge_node_helper_creator_t * nhc
a factory to create instances of merge_node_helper_t
Definition merge.hpp:553
uchar tag
a tag used to access values in the netnode
Definition merge.hpp:551
uint32 nds_flags
node value attributes (a combination of nds_flags_t)
Definition merge.hpp:552
const char * name
name of the array (label)
Definition merge.hpp:550
virtual void * get_struc_ptr(merge_data_t &, diff_source_idx_t, const idbattr_info_t &)
Definition merge.hpp:443
const char * module_name
will be used as a prefix for field desc
Definition merge.hpp:421
const char * netnode_name
name of netnode with module data attributes
Definition merge.hpp:422
const idbattr_info_t * fields
module data attribute descriptions
Definition merge.hpp:423
virtual void merge_starting(diff_source_idx_t, void *)
Definition merge.hpp:441
virtual bool val2str(qstring *, const idbattr_info_t &, uint64)
Definition merge.hpp:445
uint32 additional_mh_flags
additional merge handler flags
Definition merge.hpp:425
moddata_diff_helper_t(const char *_module_name, const char *_netnode_name, const idbattr_info_t *_fields, size_t _nfields)
Definition merge.hpp:428
virtual bool str2val(uint64 *, const idbattr_info_t &, const char *)
Definition merge.hpp:446
virtual void print_diffpos_details(qstrvec_t *, const idbattr_info_t &)
Definition merge.hpp:444
virtual ~moddata_diff_helper_t()
Definition merge.hpp:439
size_t nfields
number of descriptions
Definition merge.hpp:424
virtual void merge_ending(diff_source_idx_t, void *)
Definition merge.hpp:442