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-2025 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 MERGE_KIND_END = merge_kind_t(-2),
177 MERGE_KIND_NONE = merge_kind_t(-1)
178};
179
180//------------------------------------------------------------------------
181class merge_handler_t;
182class merge_data_t;
184//--------------------------------------------------------------------------
186idaman bool ida_export is_diff_merge_mode();
187
188//--------------------------------------------------------------------------
191{
192public:
199 {
202 virtual ea_t get_block_head(merge_data_t &md, diff_source_idx_t idx, ea_t item_head) = 0;
203
206 virtual bool setup_blocks(
207 merge_data_t &md,
210 const diff_range_t &region) = 0;
211
213 };
214
215 class merge_mappers_t &mappers;
216
217 int dbctx_ids[3] = { -1, -1, -1 };
218 int nbases = 0;
222 merge_handler_t *last_udt_related_merger = nullptr;
223
225 virtual ~merge_data_t();
226 merge_data_t(const merge_data_t &) = delete;
227 void operator=(const merge_data_t &) = delete;
228
229 void set_dbctx_ids(int local, int remote, int base)
230 {
231 dbctx_ids[LOCAL_IDX] = local;
232 dbctx_ids[REMOTE_IDX] = remote;
233 dbctx_ids[BASE_IDX] = base;
234 nbases = base != -1 ? 3 : 2;
235 }
236
237 int local_id() const { return dbctx_ids[LOCAL_IDX]; }
238 int remote_id() const { return dbctx_ids[REMOTE_IDX]; }
239 int base_id() const { return dbctx_ids[BASE_IDX]; }
240
241 void add_event_handler(merge_handler_t *handler) { ev_handlers.push_back(handler); }
242 void remove_event_handler(merge_handler_t *handler) { ev_handlers.del(handler); }
243
245 {
246 return item_block_locator == nullptr
247 ? item_head
248 : item_block_locator->get_block_head(*this, idx, item_head);
249 }
250 bool setup_blocks(diff_source_idx_t dst_idx, diff_source_idx_t src_idx, const diff_range_t &region)
251 {
252 return item_block_locator != nullptr
253 && item_block_locator->setup_blocks(*this, dst_idx, src_idx, region);
254 }
255
256 // make these functions virtual to be available from plugins
257
259 virtual bool has_existing_node(const char *nodename) const;
260
268 virtual bool map_privrange_id(
269 tid_t *tid,
270 ea_t ea,
273 bool strict=true);
274
282 virtual bool map_tinfo(
283 tinfo_t *tif,
286 bool strict=true);
287
295 const tinfo_t &tif1,
296 diff_source_idx_t diffidx1,
297 const tinfo_t &tif2,
298 diff_source_idx_t diffidx2) const;
299};
300
301//------------------------------------------------------------------------
317{
320 merge_kind_t kind;
321 merge_kind_t insert_after;
323#define MH_LISTEN 0x00000001
324#define MH_TERSE 0x00000002
325#define MH_UI_NODETAILS 0x00000100
326#define MH_UI_COMPLEX 0x00000200
327#define MH_UI_DP_NOLINEDIFF 0x00000400
328#define MH_UI_DP_SHORTNAME 0x00000800
329#define MH_UI_INDENT 0x00001000
330#define MH_UI_SPLITNAME 0x00800000
332#define MH_UI_CHAR_MASK 0x007F0000
333#define MH_UI_DEF_CHAR(v) ((((v) & 0x7F) << 16) | MH_UI_SPLITNAME)
335#ifndef SWIG
336#define MH_UI_COMMANAME MH_UI_DEF_CHAR(',')
337#else
338#define MH_UI_COMMANAME 0x00AC0000
339#endif
341#ifndef SWIG
342#define MH_UI_COLONNAME MH_UI_DEF_CHAR(':')
343#else
344#define MH_UI_COLONNAME 0x00BA0000
345#endif
347#define MH_DUMMY 0x80000000
348
350 merge_data_t &_md,
351 const qstring &_label,
352 merge_kind_t _kind,
353 merge_kind_t _insert_after,
354 uint32 _mh_flags)
355 : md(_md),
356 label(_label),
357 kind(_kind),
358 insert_after(_insert_after),
359 mh_flags(_mh_flags)
360 {}
361
363 static bool ui_has_details(uint32 _mh_flags) { return (_mh_flags & MH_UI_NODETAILS) == 0; }
364 bool ui_has_details() const { return ui_has_details(mh_flags); }
365
369 static bool ui_complex_details(uint32 _mh_flags) { return (_mh_flags & MH_UI_COMPLEX) != 0; }
371
379 static bool ui_complex_name(uint32 _mh_flags) { return (_mh_flags & MH_UI_SPLITNAME) != 0; }
380 bool ui_complex_name() const { return ui_complex_name(mh_flags); }
381 static char ui_split_char(uint32 _mh_flags) { return (_mh_flags >> 16) & 0x7F; }
382 char ui_split_char() const { return ui_split_char(mh_flags); }
383 static qstring ui_split_str(uint32 _mh_flags) { return qstring(1, ui_split_char(_mh_flags)); }
385
394 static bool ui_dp_shortname(uint32 _mh_flags) { return (_mh_flags & MH_UI_DP_SHORTNAME) != 0; }
395 bool ui_dp_shortname() const { return ui_dp_shortname(mh_flags); }
396
401 static bool ui_linediff(uint32 _mh_flags) { return (_mh_flags & MH_UI_DP_NOLINEDIFF) == 0; }
402 bool ui_linediff() const { return ui_linediff(mh_flags); }
403
406 static bool ui_indent(uint32 _mh_flags) { return (_mh_flags & MH_UI_INDENT) != 0; }
407 bool ui_indent() const { return ui_indent(mh_flags); }
408};
409
410//------------------------------------------------------------------------
411
414{
415 const char *module_name = nullptr;
416 const char *netnode_name = nullptr;
417 const idbattr_info_t *fields = nullptr;
418 size_t nfields = 0;
419 uint32 additional_mh_flags = MH_UI_NODETAILS;
421
423 const char *_module_name,
424 const char *_netnode_name,
425 const idbattr_info_t *_fields,
426 size_t _nfields)
427 : module_name(_module_name),
428 netnode_name(_netnode_name),
429 fields(_fields),
430 nfields(_nfields)
431 {
432 }
434
435 virtual void merge_starting(diff_source_idx_t /*diffidx*/, void * /*module_data*/) {}
436 virtual void merge_ending(diff_source_idx_t /*diffidx*/, void * /*module_data*/) {}
437 virtual void *get_struc_ptr(merge_data_t &/*md*/, diff_source_idx_t /*diffidx*/, const idbattr_info_t &/*fi*/) { INTERR(2048); }
438 virtual void print_diffpos_details(qstrvec_t * /*out*/, const idbattr_info_t &/*fi*/) {}
439 virtual bool val2str(qstring * /*out*/, const idbattr_info_t &/*fi*/, uint64 /*value*/) { return false; }
440 virtual bool str2val(uint64 * /*out*/, const idbattr_info_t &/*fi*/, const char * /*strvals*/) { return false; }
441};
442
444{
445 NDS_IS_BOOL = 0x0001,
446 NDS_IS_EA = 0x0002,
448 NDS_IS_STR = 0x0008,
449 NDS_SUPVAL = 0x0010,
450 NDS_BLOB = 0x0020,
451 NDS_EV_RANGE = 0x0040,
452 NDS_EV_FUNC = 0x0080,
453 NDS_MAP_IDX = 0x0100,
454 NDS_MAP_VAL = 0x0200,
460 NDS_VAL8 = 0x1000,
461 NDS_INC = 0x2000,
462 NDS_UI_ND = 0x4000,
464};
465
466//--------------------------------------------------------------------------
469{
471
474 virtual qstring print_entry_name(uchar /*tag*/, nodeidx_t /*ndx*/, void * /*module_data*/) const { return qstring(); }
475
479 virtual void print_entry_details(qstrvec_t * /*out*/, uchar /*tag*/, nodeidx_t /*ndx*/, void * /*module_data*/) const {}
480
483 virtual void get_column_headers(qstrvec_t * /*headers*/, uchar /*tag*/, void * /*module_data*/) const {}
484
486 virtual bool is_mergeable(uchar /*tag*/, nodeidx_t /*ndx*/) const { return true; }
487
490 virtual netnode get_netnode() const { return BADNODE; }
491
493 virtual void map_scalar(
494 nodeidx_t * /*scalar_value*/,
495 void * /*module_data*/,
496 diff_source_idx_t /*from*/,
497 diff_source_idx_t /*to*/) const
498 {
499 }
500 virtual void map_string(
501 qstring * /*string_value*/,
502 void * /*module_data*/,
503 diff_source_idx_t /*from*/,
504 diff_source_idx_t /*to*/) const
505 {
506 }
507 virtual void map_value(
508 bytevec_t * /*value*/,
509 void * /*module_data*/,
510 diff_source_idx_t /*from*/,
511 diff_source_idx_t /*to*/) const
512 {
513 }
514
517 virtual void refresh(uchar /*tag*/, void * /*module_data*/) {}
518
521 virtual const char *get_logname() const { return nullptr; }
522
524 static void append_eavec(qstring *s, const char *prefix, const eavec_t &eas)
525 {
526 s->append(prefix);
527 s->append(" [");
528 if ( !eas.empty() )
529 {
530 for ( const auto ea : eas )
531 s->cat_sprnt("%a,", ea);
532 s->remove_last();
533 }
534 s->append(']');
535 }
536};
538using merge_node_hlpfunc_creator_t = std::function<merge_node_helper_creator_t>;
539
540//--------------------------------------------------------------------------
560
571idaman merge_handler_t *ida_export create_nodeval_merge_handler(
572 const merge_handler_params_t &mhp,
573 const char *label,
574 int moddata_id,
575 const char *nodename,
576 uchar tag,
577 uint32 nds_flags,
578 merge_node_hlpfunc_creator_t nhc = nullptr,
579 bool skip_empty_nodes = true);
580idaman merge_handler_t *ida_export create_nodeval_merge_handler2(
581 const merge_handler_params_t &mhp,
582 const char *label,
583 int moddata_id,
584 const char *nodename,
585 uchar tag,
586 uint32 nds_flags,
587 merge_node_helper_t *node_helper = nullptr, // owned by the caller
588 bool skip_empty_nodes = true);
589
600idaman void ida_export create_nodeval_merge_handlers(
601 merge_handlers_t *out,
602 const merge_handler_params_t &mhp,
603 int moddata_id,
604 const char *nodename,
605 const merge_node_info_t *valdesc,
606 size_t nvals,
607 bool skip_empty_nodes = true);
608idaman void ida_export create_nodeval_merge_handlers2(
609 merge_handlers_t *out,
610 const merge_handler_params_t &mhp,
611 int moddata_id,
612 const char *nodename,
613 const merge_node_info2_t *valdesc,
614 size_t nvals,
615 bool skip_empty_nodes = true);
616
617//------------------------------------------------------------------------
618// macros for convenience to be used in modules:
619
621#define IDI_FLDENTRY(struc, field, mask, valmap, name) \
622 { name, /* field description */ \
623 qoffsetof(struc, field), /* offset */ \
624 sizeof(struc::field), /* width */ \
625 mask, /* bitmask */ \
626 0, /* tag (for node values only) */ \
627 valmap, /* vmap */ \
628 nullptr, /* individual_node */ \
629 IDI_STRUCFLD|IDI_SCALAR } /* flags */
630
632#define IDI_FLDQSTR(struc, field, name) \
633 { name, qoffsetof(struc, field), 0, 0, 0, nullptr, nullptr, IDI_STRUCFLD|IDI_QSTRING }
634
636#define IDI_ALTENTRY(altidx, tag, width, mask, valmap, name) \
637 { name, /* field description */ \
638 uintptr_t(altidx), /* altval index */ \
639 width, /* width */ \
640 mask, /* bitmask */ \
641 tag, /* tag (for node values only) */ \
642 valmap, /* vmap */ \
643 nullptr, /* individual_node */ \
644 IDI_ALTVAL|IDI_SCALAR } /* flags */
645
647#define IDI_HASHENTRY(hashname, tag, width, mask, flag, valmap, name) \
648 { name, /* field description */ \
649 uintptr_t(hashname), /* hash name */ \
650 width, /* width */ \
651 mask, /* bitmask */ \
652 tag, /* tag (for node values only) */ \
653 valmap, /* vmap */ \
654 nullptr, /* individual_node */ \
655 IDI_HASH|(flag) } /* flags */
656
658#define IDI_SUPSTR(altidx, tag, name) \
659 { name, uintptr_t(altidx), 0, 0, tag, nullptr, nullptr, IDI_SUPVAL|IDI_CSTR }
660
662#define IDI_DEVICE_ENTRY IDI_SUPSTR(-1, stag, "device")
663
665#define MNI_ENTRY(tag, flags, name, helper) \
666 { name, tag, NDS_MAP_IDX|NDS_EV_RANGE|(flags), helper }
667
669#define MNI_FUNCENTRY(tag, flags, name) \
670 MNI_ENTRY(tag, NDS_EV_FUNC|(flags), name, nullptr)
671
673#define MNI_STDENTRY(tag, flags, name) MNI_ENTRY(tag, flags, name, nullptr)
674//------------------------------------------------------------------------
675idaman void ida_export destroy_moddata_merge_handlers(int data_id);
676
677#ifdef ui_switch_dbctx_guard
678 #define switch_dbctx ui_switch_dbctx_guard
679#endif
680
681//------------------------------------------------------------------------
686idaman ssize_t ida_export get_ea_diffpos_name(qstring *out, ea_t ea);
687#endif // _MERGE_HPP
void remove_last(int cnt=1)
Definition pro.h:3152
_qstring & append(qchar c)
Append c to the end of the qstring.
Definition pro.h:3493
Vector of bytes (use for dynamic memory)
Definition pro.h:3773
class to contain public info about the merge process
Definition merge.hpp:191
int remote_id() const
Definition merge.hpp:238
void set_dbctx_ids(int local, int remote, int base)
Definition merge.hpp:229
void remove_event_handler(merge_handler_t *handler)
Definition merge.hpp:242
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:220
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:250
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:239
merge_data_t(const merge_data_t &)=delete
void add_event_handler(merge_handler_t *handler)
Definition merge.hpp:241
ea_t get_block_head(diff_source_idx_t idx, ea_t item_head)
Definition merge.hpp:244
item_block_locator_t * item_block_locator
Definition merge.hpp:221
int dbctx_ids[3]
local, remote, base ids
Definition merge.hpp:217
class merge_mappers_t & mappers
Definition merge.hpp:215
int nbases
number of database participating in merge process, maybe 2 or 3
Definition merge.hpp:218
int local_id() const
Definition merge.hpp:237
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:222
virtual ~merge_data_t()
Definition of the IDA database node.
Definition netnode.hpp:241
Reimplementation of vector class from STL.
Definition pro.h:2250
bool empty(void) const
Does the qvector have 0 elements?
Definition pro.h:2424
Primary mechanism for managing type information.
Definition typeinf.hpp:3046
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
std::function< merge_node_helper_creator_t > merge_node_hlpfunc_creator_t
Definition merge.hpp:538
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:444
@ NDS_MAP_IDX
apply ea2node() to index (==NETMAP_IDX)
Definition merge.hpp:453
@ NDS_EV_RANGE
enable default handling of mev_modified_ranges, mev_deleting_segm
Definition merge.hpp:451
@ NDS_IS_EA
EA value.
Definition merge.hpp:446
@ NDS_IS_STR
string value
Definition merge.hpp:448
@ NDS_IS_BOOL
boolean value
Definition merge.hpp:445
@ NDS_IS_RELATIVE
value is relative to index (stored as delta)
Definition merge.hpp:447
@ NDS_SUPVAL
stored as netnode supvals (not scalar)
Definition merge.hpp:449
@ NDS_BLOB
stored as netnode blobs
Definition merge.hpp:450
@ NDS_EV_FUNC
enable default handling of mev_added_func/mev_deleting_func
Definition merge.hpp:452
@ NDS_MAP_VAL
apply ea2node() to value.
Definition merge.hpp:454
@ NDS_VAL8
use 8-bit values (==NETMAP_V8)
Definition merge.hpp:460
@ 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:462
@ NDS_INC
stored value is incremented (scalars only)
Definition merge.hpp:461
qvector< merge_handler_t * > merge_handlers_t
Definition merge.hpp:183
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:537
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:348
uint64 ea_t
Definition pro.h:421
unsigned char uchar
unsigned 8 bit value
Definition pro.h:337
qvector< ea_t > eavec_t
vector of addresses
Definition pro.h:2764
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition pro.h:381
ea_t tid_t
type id (for enums, structs, etc)
Definition pro.h:5010
_qstring< char > qstring
regular string
Definition pro.h:3694
qvector< qstring > qstrvec_t
vector of strings
Definition pro.h:3697
A range of the difference source.
Definition diff3.hpp:30
access to attribute by structure/offset/width or netnode/index/width
Definition ida.hpp:1461
several items can be grouped into a block.
Definition merge.hpp:199
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:212
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:317
merge_kind_t insert_after
desired position inside 'handlers' merge_kind_t
Definition merge.hpp:321
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:349
static bool ui_complex_details(uint32 _mh_flags)
Do not display the diffpos details in the chooser.
Definition merge.hpp:369
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:394
bool ui_indent() const
Definition merge.hpp:407
qstring ui_split_str() const
Definition merge.hpp:384
bool ui_complex_name() const
Definition merge.hpp:380
bool ui_has_details() const
Definition merge.hpp:364
bool ui_linediff() const
Definition merge.hpp:402
bool ui_complex_details() const
Definition merge.hpp:370
static qstring ui_split_str(uint32 _mh_flags)
Definition merge.hpp:383
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:406
merge_kind_t kind
merge handler kind merge_kind_t
Definition merge.hpp:320
bool ui_dp_shortname() const
Definition merge.hpp:395
merge_data_t & md
Definition merge.hpp:318
qstring label
Definition merge.hpp:319
static bool ui_linediff(uint32 _mh_flags)
In detail pane IDA shows difference between diffpos details.
Definition merge.hpp:401
uint32 mh_flags
Definition merge.hpp:322
char ui_split_char() const
Definition merge.hpp:382
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:379
static char ui_split_char(uint32 _mh_flags)
Definition merge.hpp:381
static bool ui_has_details(uint32 _mh_flags)
Should IDA display the diffpos detail pane?
Definition merge.hpp:363
abstract adapter to provide access to non-standard netnode array entries
Definition merge.hpp:469
virtual void map_string(qstring *, void *, diff_source_idx_t, diff_source_idx_t) const
Definition merge.hpp:500
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:474
virtual ~merge_node_helper_t()
Definition merge.hpp:470
virtual void map_scalar(nodeidx_t *, void *, diff_source_idx_t, diff_source_idx_t) const
map scalar/string/buffered value
Definition merge.hpp:493
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:483
virtual void map_value(bytevec_t *, void *, diff_source_idx_t, diff_source_idx_t) const
Definition merge.hpp:507
virtual netnode get_netnode() const
return netnode to be used as source.
Definition merge.hpp:490
static void append_eavec(qstring *s, const char *prefix, const eavec_t &eas)
can be used by derived classes
Definition merge.hpp:524
virtual const char * get_logname() const
return name of netnode to be used in logging.
Definition merge.hpp:521
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:479
virtual bool is_mergeable(uchar, nodeidx_t) const
filter: check if we should perform merging for given record
Definition merge.hpp:486
virtual void refresh(uchar, void *)
notify helper that some data was changed in the database and internal structures (e....
Definition merge.hpp:517
Definition merge.hpp:552
const char * name
name of the array (label)
Definition merge.hpp:553
uchar tag
a tag used to access values in the netnode
Definition merge.hpp:554
uint32 nds_flags
node value attributes (a combination of nds_flags_t)
Definition merge.hpp:555
merge_node_helper_t * node_helper
merge handler creation helper, foreign owner
Definition merge.hpp:556
field descriptor used to organize merging of a netnode array
Definition merge.hpp:543
merge_node_helper_creator_t * nhc
a factory to create instances of merge_node_helper_t
Definition merge.hpp:547
uchar tag
a tag used to access values in the netnode
Definition merge.hpp:545
uint32 nds_flags
node value attributes (a combination of nds_flags_t)
Definition merge.hpp:546
const char * name
name of the array (label)
Definition merge.hpp:544
virtual void * get_struc_ptr(merge_data_t &, diff_source_idx_t, const idbattr_info_t &)
Definition merge.hpp:437
const char * module_name
will be used as a prefix for field desc
Definition merge.hpp:415
const char * netnode_name
name of netnode with module data attributes
Definition merge.hpp:416
const idbattr_info_t * fields
module data attribute descriptions
Definition merge.hpp:417
virtual void merge_starting(diff_source_idx_t, void *)
Definition merge.hpp:435
virtual bool val2str(qstring *, const idbattr_info_t &, uint64)
Definition merge.hpp:439
uint32 additional_mh_flags
additional merge handler flags
Definition merge.hpp:419
moddata_diff_helper_t(const char *_module_name, const char *_netnode_name, const idbattr_info_t *_fields, size_t _nfields)
Definition merge.hpp:422
virtual bool str2val(uint64 *, const idbattr_info_t &, const char *)
Definition merge.hpp:440
virtual void print_diffpos_details(qstrvec_t *, const idbattr_info_t &)
Definition merge.hpp:438
virtual ~moddata_diff_helper_t()
Definition merge.hpp:433
size_t nfields
number of descriptions
Definition merge.hpp:418
virtual void merge_ending(diff_source_idx_t, void *)
Definition merge.hpp:436