13#include <unordered_map>
25 {
return !(*
this == r); }
54 {
return !(*
this == r); }
63 for (
size_t i = 0; i <
size(); ++i )
87 {
return !(*
this == r); }
128 {
return !(*
this == r); }
136struct expanded_area_t;
138#define LSEF_PLACE (1 << 0)
139#define LSEF_RINFO (1 << 1)
140#define LSEF_PTYPE (1 << 2)
141#define LSEF_ALL (LSEF_PLACE|LSEF_RINFO|LSEF_PTYPE)
144# define DEFINE_NAVSTACK_T_HELPERS(decl) \
145 decl void ida_export navstack_t_register_live(navstack_t &); \
146 decl void ida_export navstack_t_deregister_live(navstack_t &); \
147 decl bool ida_export navstack_t_init(navstack_t &, navstack_entry_t *, const char *, uint32); \
148 decl bool ida_export navstack_t_perform_move(const char *, const char *, const char *, bool); \
149 decl void ida_export navstack_t_set_current(navstack_t &, const navstack_entry_t &, bool); \
150 decl bool ida_export navstack_t_get_current(const navstack_t &, navstack_entry_t *, const char *); \
151 decl void ida_export navstack_t_get_all_current(const navstack_t &, navstack_entry_vec_t *); \
152 decl void ida_export navstack_t_stack_jump(navstack_t &, bool try_to_unhide, const navstack_entry_t &e); \
153 decl bool ida_export navstack_t_stack_nav(navstack_t &, navstack_entry_t *, bool, uint32 cnt, bool try_to_unhide); \
154 decl bool ida_export navstack_t_stack_seek(navstack_t &, navstack_entry_t *, uint32 index, bool try_to_unhide, bool apply_cur); \
155 decl uint32 ida_export navstack_t_stack_index(const navstack_t &); \
156 decl void ida_export navstack_t_set_stack_entry(const navstack_t &, uint32, const navstack_entry_t &); \
157 decl bool ida_export navstack_t_get_stack_entry(navstack_entry_t *, const navstack_t &, uint32); \
158 decl uint32 ida_export navstack_t_stack_size(const navstack_t &); \
159 decl void ida_export navstack_t_stack_clear(navstack_t &, const navstack_entry_t &);
160# ifdef TESTABLE_BUILD
161# define DEFINE_NAVSTACK_T_HELPERS_TB(decl) \
162 decl void ida_export navstack_t_dump(const navstack_t &);
164# define DEFINE_NAVSTACK_T_HELPERS_TB(decl)
167# define DEFINE_NAVSTACK_T_HELPERS(decl)
168# define DEFINE_NAVSTACK_T_HELPERS_TB(decl)
172DEFINE_NAVSTACK_T_HELPERS_TB(idaman)
175#define DEFINE_NAVSTACK_ENTRY_T_HELPERS(decl) \
176 decl void ida_export navstack_entry_t_serialize(bytevec_t *, const navstack_entry_t &); \
177 decl bool ida_export navstack_entry_t_deserialize(navstack_entry_t *, const uchar **, const uchar *const, const place_t *);
179#define DEFINE_NAVSTACK_ENTRY_T_HELPERS(decl)
181DEFINE_NAVSTACK_ENTRY_T_HELPERS(idaman)
184struct lochist_entry_t
190 lochist_entry_t(
const place_t *p,
192 : rinfo(r), plce((
place_t *) p)
194 if ( plce !=
nullptr )
195 plce = plce->
clone();
197 lochist_entry_t(
const lochist_entry_t &other) { *
this = other; }
198 ~lochist_entry_t() { clear(); }
200 const place_t *place()
const {
return plce; }
203 place_t *place() {
return plce; }
205 void set_place(
const place_t *p) { clear();
if ( p !=
nullptr ) plce = p->
clone(); }
206 void set_place(
const place_t &p) { set_place(&p); }
208 bool is_valid()
const {
return plce !=
nullptr; }
210 lochist_entry_t &operator=(
const lochist_entry_t &r)
216 if ( r.plce !=
nullptr )
217 plce = r.plce->clone();
221 void acquire_place(
place_t *in_p)
222 { clear(); plce = in_p; }
227 if ( plce !=
nullptr )
236 DEFINE_NAVSTACK_ENTRY_T_HELPERS(
friend)
248 const lochist_entry_t &
e,
265 * (lochist_entry_t *)
this = (
const lochist_entry_t &) r;
273 {
return navstack_entry_t_deserialize(
this, ptr,
end, tmplate); }
278 lochist_entry_t::clear();
285#define UNHID_SEGM 0x0001
286#define UNHID_FUNC 0x0002
287#define UNHID_RANGE 0x0004
289#define DEFAULT_CURSOR_Y 0xFFFF
290#define DEFAULT_LNNUM -1
291#define CURLOC_LIST "$ curlocs"
292#define MAX_MARK_SLOT 1024
297 DEFINE_NAVSTACK_T_HELPERS(
friend)
298 DEFINE_NAVSTACK_T_HELPERS_TB(
friend)
304#define LHF_HISTORY_DISABLED (1 << 0)
313 return navstack_t_init(*
this, defpos, stream_name, _flags);
316 static bool perform_move(
const char *stream_name,
const char *source_stream_name,
const char *widget_id,
bool move_stack)
318 return navstack_t_perform_move(stream_name, source_stream_name, widget_id, move_stack);
324 {
return navstack_t_set_current(*
this,
e, in_charge); }
327 {
return navstack_t_get_current(*
this, out, widget_id); }
330 {
return navstack_t_get_all_current(*
this, out); }
333 { navstack_t_stack_jump(*
this, try_to_unhide,
e); }
336 {
return navstack_t_stack_index(*
this); }
339 {
return navstack_t_stack_seek(*
this, out, index, try_to_unhide,
true); }
342 {
return navstack_t_stack_nav(*
this, out,
true, cnt, try_to_unhide); }
345 {
return navstack_t_stack_nav(*
this, out,
false, cnt, try_to_unhide); }
348 {
return navstack_t_stack_nav(*
this, out, forward, cnt, try_to_unhide); }
351 { navstack_t_stack_clear(*
this, new_tip); }
354 { navstack_t_set_stack_entry(*
this, index,
e); }
357 {
return navstack_t_get_stack_entry(out, *
this, index); }
363 {
return navstack_t_stack_size(*
this); }
366 void dump()
const {
return navstack_t_dump(*
this); }
389#define BOOKMARKS_CHOOSE_INDEX (uint32(-1))
390#define BOOKMARKS_BAD_INDEX (uint32(-1))
391#define BOOKMARKS_PROMPT_WITH_HINT_PREFIX '\x01'
406 const lochist_entry_t &
e,
417 lochist_entry_t *out_entry,
425 const lochist_entry_t &
e,
431 const lochist_entry_t &
e,
436 const lochist_entry_t &
e,
441 const lochist_entry_t &
e,
447 const lochist_entry_t &
e,
void clear(void)
Clear qstring and free memory.
Definition pro.h:3166
static bool get_desc(qstring *out, const lochist_entry_t &e, uint32 index, void *ud)
Definition moves.hpp:423
static uint32 mark(const lochist_entry_t &e, uint32 index, const char *title, const char *desc, void *ud)
Definition moves.hpp:405
static dirtree_id_t get_dirtree_id(const lochist_entry_t &e, void *ud)
Definition moves.hpp:446
static bool erase(const lochist_entry_t &e, uint32 index, void *ud)
Definition moves.hpp:440
static uint32 size(const lochist_entry_t &e, void *ud)
Definition moves.hpp:435
static bool get(lochist_entry_t *out_entry, qstring *out_desc, uint32 *index, void *ud)
Definition moves.hpp:416
static uint32 find_index(const lochist_entry_t &e, void *ud)
Definition moves.hpp:430
Vector of bytes (use for dynamic memory)
Definition pro.h:3773
void pack_dd(uint32 x)
Pack a dword and append the result to the bytevec.
Definition pro.h:3805
void pack_dw(uint16 x)
Pack a word and append the result to the bytevec.
Definition pro.h:3798
bytevec_t & append(const void *buf, size_t sz)
Append bytes to the bytevec.
Definition pro.h:3782
Deprecated. Please use navstack_t instead.
Definition moves.hpp:455
nodeidx_t netcode() const
Definition moves.hpp:321
void stack_jump(bool try_to_unhide, const navstack_entry_t &e)
Definition moves.hpp:332
uint32 stack_size(void) const
Definition moves.hpp:362
void set_current(const navstack_entry_t &e, bool in_charge)
Definition moves.hpp:323
bool stack_seek(navstack_entry_t *out, uint32 index, bool try_to_unhide)
Definition moves.hpp:338
uint32 flags
Definition moves.hpp:305
bool stack_nav(navstack_entry_t *out, bool forward, uint32 cnt, bool try_to_unhide)
Definition moves.hpp:347
bool get_stack_entry(navstack_entry_t *out, uint32 index) const
Definition moves.hpp:356
void stack_clear(const navstack_entry_t &new_tip)
Definition moves.hpp:350
void set_stack_entry(uint32 index, const navstack_entry_t &e)
Definition moves.hpp:353
bool get_current(navstack_entry_t *out, const char *widget_id) const
Definition moves.hpp:326
navstack_t()
Definition moves.hpp:307
bool stack_forward(navstack_entry_t *out, uint32 cnt, bool try_to_unhide)
Definition moves.hpp:341
bool is_history_enabled() const
Definition moves.hpp:310
void get_all_current(navstack_entry_vec_t *out) const
Definition moves.hpp:329
~navstack_t()
Definition moves.hpp:308
bool init(navstack_entry_t *defpos, const char *stream_name, uint32 _flags)
Definition moves.hpp:311
bool get_current_stack_entry(navstack_entry_t *out) const
Definition moves.hpp:359
bool stack_back(navstack_entry_t *out, uint32 cnt, bool try_to_unhide)
Definition moves.hpp:344
uint32 stack_index() const
Definition moves.hpp:335
void dump() const
Definition moves.hpp:366
static bool perform_move(const char *stream_name, const char *source_stream_name, const char *widget_id, bool move_stack)
Definition moves.hpp:316
Definition of the IDA database node.
Definition netnode.hpp:241
Denotes a displayed line.
Definition kernwin.hpp:1418
virtual place_t *idaapi clone() const =0
Clone the location.
Reimplementation of vector class from STL.
Definition pro.h:2250
const segm_move_info_t & at(size_t _idx) const
Definition pro.h:2427
size_t size(void) const
Definition pro.h:2423
Types involved in grouping of item into folders.
dirtree_id_t
Built-in dirtree specializations:
Definition dirtree.hpp:572
idaman const char * end
Definition pro.h:1001
cexpr_t * e
Definition hexrays.hpp:7308
CASSERT(sizeof(asm_t)==416)
tcc_renderer_type_t
TWidget renderer type.
Definition kernwin.hpp:99
@ TCCRT_INVALID
invalid
Definition kernwin.hpp:100
idaman bool ida_export bookmarks_t_get(lochist_entry_t *, qstring *, uint32 *, void *)
idaman bool ida_export bookmarks_t_get_desc(qstring *, const lochist_entry_t &, uint32, void *)
idaman uint32 ida_export bookmarks_t_find_index(const lochist_entry_t &, void *)
idaman DEPRECATED void ida_export lochist_t_deregister_live(lochist_t &)
idaman DEPRECATED uint32 ida_export lochist_t_size(const lochist_t &)
idaman DEPRECATED bool ida_export lochist_t_get(lochist_entry_t *, const lochist_t &, uint32)
idaman DEPRECATED const lochist_entry_t *ida_export lochist_t_get_current(const lochist_t &)
idaman uint32 ida_export bookmarks_t_mark(const lochist_entry_t &, uint32, const char *, const char *, void *)
idaman uint32 ida_export bookmarks_t_size(const lochist_entry_t &, void *)
idaman DEPRECATED void ida_export lochist_entry_t_serialize(bytevec_t *, const lochist_entry_t &)
idaman DEPRECATED void ida_export lochist_t_register_live(lochist_t &)
idaman DEPRECATED bool ida_export lochist_t_init(lochist_t &, const char *, const place_t &, void *, uint32)
idaman DEPRECATED uint32 ida_export lochist_t_current_index(const lochist_t &)
idaman DEPRECATED void ida_export lochist_t_save(const lochist_t &)
idaman DEPRECATED void ida_export lochist_t_clear(lochist_t &)
DEFINE_NAVSTACK_T_HELPERS(idaman) DEFINE_NAVSTACK_T_HELPERS_TB(idaman) DEFINE_NAVSTACK_ENTRY_T_HELPERS(idaman) struct lochist_entry_t
Definition moves.hpp:171
idaman DEPRECATED void ida_export lochist_t_set(lochist_t &, uint32, const lochist_entry_t &)
idaman DEPRECATED bool ida_export lochist_t_seek(lochist_t &, uint32 index, bool try_to_unhide, bool apply_cur)
idaman dirtree_id_t ida_export bookmarks_t_get_dirtree_id(const lochist_entry_t &, void *)
idaman DEPRECATED void ida_export lochist_t_jump(lochist_t &, bool try_to_unhide, const lochist_entry_t &e)
idaman bool ida_export bookmarks_t_erase(const lochist_entry_t &, uint32, void *)
qvector< navstack_entry_t > navstack_entry_vec_t
Definition moves.hpp:135
idaman DEPRECATED bool ida_export lochist_t_back(lochist_t &, uint32 cnt, bool try_to_unhide)
idaman bool ida_export bookmarks_t_set_desc(qstring, const lochist_entry_t &, uint32, void *)
DECLARE_TYPE_AS_MOVABLE(segm_move_info_t)
idaman DEPRECATED bool ida_export lochist_t_fwd(lochist_t &, uint32 cnt, bool try_to_unhide)
qvector< segm_move_info_t > segm_move_info_vec_t
Definition moves.hpp:57
idaman DEPRECATED bool ida_export lochist_entry_t_deserialize(lochist_entry_t *, const uchar **, const uchar *const, const place_t *)
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
idaman THREAD_SAFE void ida_export qfree(void *alloc)
System independent free.
_qstring< char > qstring
regular string
Definition pro.h:3694
double orgx
Definition moves.hpp:19
bool operator==(const graph_location_info_t &r) const
Definition moves.hpp:22
double orgy
Definition moves.hpp:20
graph_location_info_t(void)
Definition moves.hpp:21
void serialize(bytevec_t *out) const
Definition moves.hpp:31
bool operator!=(const graph_location_info_t &r) const
Definition moves.hpp:24
bool deserialize(memory_deserializer_t &mmdsr)
Definition moves.hpp:38
double zoom
Definition moves.hpp:18
bool empty() const
Definition pro.h:4390
uint16 unpack_dw()
Definition pro.h:4394
const void * unpack_obj(void *obj, size_t objsize)
Definition pro.h:4420
uint32 unpack_dd()
Definition pro.h:4395
~navstack_entry_t()
Definition moves.hpp:258
navstack_entry_t(const place_t *p, const renderer_info_t &r, const qstring &w)
Definition moves.hpp:251
navstack_entry_t(const lochist_entry_t &e, const qstring &w)
Definition moves.hpp:247
qstring ud_str
Definition moves.hpp:244
navstack_entry_t & operator=(const navstack_entry_t &r)
Definition moves.hpp:260
navstack_entry_t(const navstack_entry_t &r)
Definition moves.hpp:256
qstring widget_id
Definition moves.hpp:243
bool deserialize(const uchar **ptr, const uchar *const end, const place_t *tmplate)
Definition moves.hpp:272
void serialize(bytevec_t *out) const
Definition moves.hpp:271
navstack_entry_t()
Definition moves.hpp:246
short cx
Definition moves.hpp:80
bool deserialize(memory_deserializer_t &mmdsr)
Definition moves.hpp:101
bool operator!=(const renderer_info_pos_t &r) const
Definition moves.hpp:86
renderer_info_pos_t()
Definition moves.hpp:83
short cy
Definition moves.hpp:81
bool operator==(const renderer_info_pos_t &r) const
Definition moves.hpp:84
int node
Definition moves.hpp:79
void serialize(bytevec_t *out) const
Definition moves.hpp:93
renderer_info_pos_t pos_t
Definition moves.hpp:115
graph_location_info_t gli
Definition moves.hpp:114
tcc_renderer_type_t rtype
Definition moves.hpp:117
renderer_info_t()
Definition moves.hpp:119
pos_t pos
Definition moves.hpp:116
bool operator==(const renderer_info_t &r) const
Definition moves.hpp:125
bool operator!=(const renderer_info_t &r) const
Definition moves.hpp:127
renderer_info_t(tcc_renderer_type_t _rtype, short cx, short cy)
Definition moves.hpp:120
segm_move_info_t(ea_t _from=0, ea_t _to=0, size_t _sz=0)
Definition moves.hpp:46
ea_t from
Definition moves.hpp:48
size_t size
Definition moves.hpp:49
ea_t to
Definition moves.hpp:48
bool operator==(const segm_move_info_t &r) const
Definition moves.hpp:51
bool operator!=(const segm_move_info_t &r) const
Definition moves.hpp:53
const segm_move_info_t * find(ea_t ea) const
Definition moves.hpp:61