IDA C++ SDK 9.2
Loading...
Searching...
No Matches
dbg.hpp
Go to the documentation of this file.
1/*
2 * Interactive disassembler (IDA).
3 * Copyright (c) 1990-2025 Hex-Rays
4 * ALL RIGHTS RESERVED.
5 *
6 */
7
8#ifndef DBG_HPP
9#define DBG_HPP
10
11#include <idp.hpp>
12#include <idd.hpp>
13#include <kernwin.hpp> // for callui() and ui_notification_t
14
24
25//--------------------------------------------------------------------
26// D E B U G G E R I N F O R M A T I O N
27//--------------------------------------------------------------------
28
34
35//--------------------------------------------------------------------
36// D E B U G G E R C A L L B A C K S
37//--------------------------------------------------------------------
93{
95
96 // debugger low-level event notifications (see IDD.HPP for details).
97
101
105
109
113
115
117
119
121
123
130
131 // debugger high-level event notifications
132
137
146
154
158
159 // debugger asynchronous function result notifications
160 // Please note some low-level event notifications also act as asynchronous
161 // function result notifications.
162
164
166
168
170
174
177
179};
180
184#define BPTEV_ADDED 0
185#define BPTEV_REMOVED 1
186#define BPTEV_CHANGED 2
188
189#ifndef __UI__
190
191//--------------------------------------------------------------------
192// D E B U G G E R F U N C T I O N S
193//--------------------------------------------------------------------
240
249
250inline bool idaapi run_requests(void) { return callui(ui_dbg_run_requests).cnd; }
251
252
257
259
260
262
263inline bool is_request_running(void) { return get_running_request() != ui_null; }
264
265
270
272
273
278
281
282//--------------------------------------------------------------------
283// P R O C E S S C O M M A N D S
284//--------------------------------------------------------------------
290
295
296inline int idaapi get_process_state(void) { return callui(ui_dbg_get_process_state).i; }
297
298#endif // __UI__
299
303#define DSTATE_SUSP -1
304#define DSTATE_NOTASK 0
305#define DSTATE_RUN 1
307inline bool idaapi is_valid_dstate(int state)
308{
309 return state == DSTATE_SUSP || state == DSTATE_NOTASK || state == DSTATE_RUN;
310}
311
315#define DBGINV_MEMORY 0x0001
316#define DBGINV_MEMCFG 0x0002
317#define DBGINV_REGS 0x0004
318#define DBGINV_ALL 0x7FFF
319#define DBGINV_REDRAW 0x8000
320#define DBGINV_NONE 0
322
323#ifndef __UI__
324
341
342inline int idaapi set_process_state(int newstate, thid_t *p_thid, int dbginv) { return callui(ui_dbg_set_process_state, newstate, p_thid, dbginv).i; }
343
344
350
351inline int idaapi invalidate_dbg_state(int dbginv)
352{
353 return set_process_state(DSTATE_NOTASK, nullptr, dbginv);
354}
355
356
370
371inline int idaapi start_process(
372 const char *path = nullptr,
373 const char *args = nullptr,
374 const char *sdir = nullptr)
375{
376 return callui(ui_dbg_start_process, path, args, sdir).i;
377}
378
379
381
382inline int idaapi request_start_process(
383 const char *path = nullptr,
384 const char *args = nullptr,
385 const char *sdir = nullptr)
386{
387 return callui(ui_dbg_request_start_process, path, args, sdir).i;
388}
389
390
406
407inline bool idaapi suspend_process(void) { return callui(ui_dbg_suspend_process).cnd; }
408
410
411inline bool idaapi request_suspend_process(void) { return callui(ui_dbg_request_suspend_process).cnd; }
412
413
423
424inline bool idaapi continue_process(void) { return callui(ui_dbg_continue_process).cnd; }
425
428
429inline bool idaapi request_continue_process(void) { return callui(ui_dbg_request_continue_process).cnd; }
430
441
442inline bool idaapi continue_backwards(void) { return callui(ui_dbg_continue_backwards).cnd; }
443
446
448
452
453inline bool idaapi exit_process(void) { return callui(ui_dbg_exit_process).cnd; }
454
456
457inline bool idaapi request_exit_process(void) { return callui(ui_dbg_request_exit_process).cnd; }
458
459
465
466inline ssize_t idaapi get_processes(procinfo_vec_t *proclist) { return callui(ui_dbg_get_processes, proclist).ssize; }
467
468
483
484inline int idaapi attach_process(pid_t pid=NO_PROCESS, int event_id=-1) { return callui(ui_dbg_attach_process, pid, event_id).i; }
485
487
488inline int idaapi request_attach_process(pid_t pid, int event_id) { return callui(ui_dbg_request_attach_process, pid, event_id).i; }
489
490
494
495inline bool idaapi detach_process(void) { return callui(ui_dbg_detach_process).cnd; }
496
498
499inline bool idaapi request_detach_process(void) { return callui(ui_dbg_request_detach_process).cnd; }
500
501
507
508inline bool idaapi is_debugger_busy(void) { return callui(ui_dbg_is_busy).cnd; }
509
511
512
513//--------------------------------------------------------------------
514// T H R E A D S
515//--------------------------------------------------------------------
521
525
526inline int idaapi get_thread_qty(void) { return callui(ui_dbg_get_thread_qty).i; }
527
528
534
535inline thid_t idaapi getn_thread(int n) { return (thid_t)callui(ui_dbg_getn_thread, n).i; }
536
537
541
543
544
551
552inline const char *idaapi getn_thread_name(int n) { return callui(ui_dbg_getn_thread_name, n).cptr; }
553
554
562
563inline bool idaapi select_thread(thid_t tid) { return callui(ui_dbg_select_thread, tid).cnd; }
564
566
567inline bool idaapi request_select_thread(thid_t tid) { return callui(ui_dbg_request_select_thread, tid).cnd; }
568
569
579
580inline int idaapi suspend_thread(thid_t tid) { return callui(ui_dbg_suspend_thread, tid).i; }
581
583
584inline int idaapi request_suspend_thread(thid_t tid) { return callui(ui_dbg_request_suspend_thread, tid).i; }
585
586
594
595inline int idaapi resume_thread(thid_t tid) { return callui(ui_dbg_resume_thread, tid).i; }
596
598
599inline int idaapi request_resume_thread(thid_t tid) { return callui(ui_dbg_request_resume_thread, tid).i; }
600
602
603
604//--------------------------------------------------------------------
605// M O D U L E S
606//--------------------------------------------------------------------
622inline bool idaapi get_first_module(modinfo_t *modinfo)
623{ return callui(ui_dbg_get_first_module, modinfo).cnd; }
624
625inline bool idaapi get_next_module(modinfo_t *modinfo)
626{ return callui(ui_dbg_get_next_module, modinfo).cnd; }
627
629
630
631//--------------------------------------------------------------------
632// E X E C U T I O N F L O W C O N T R O L C O M M A N D S
633//--------------------------------------------------------------------
639
644
645inline bool idaapi step_into(void) { return callui(ui_dbg_step_into).cnd; }
646
648
649inline bool idaapi request_step_into(void) { return callui(ui_dbg_request_step_into).cnd; }
650
651
657
658inline bool idaapi step_over(void) { return callui(ui_dbg_step_over).cnd; }
659
661
662inline bool idaapi request_step_over(void) { return callui(ui_dbg_request_step_over).cnd; }
663
664
669
670inline bool idaapi step_into_backwards(void) { return callui(ui_dbg_step_into_backwards).cnd; }
671
673
675
676
682
683inline bool idaapi step_over_backwards(void) { return callui(ui_dbg_step_over_backwards).cnd; }
684
686
688
689
701
702inline bool idaapi run_to(ea_t ea, pid_t pid = NO_PROCESS, thid_t tid = NO_THREAD) { return callui(ui_dbg_run_to, ea, pid, tid).cnd; }
703
705
706inline bool idaapi request_run_to(ea_t ea, pid_t pid = NO_PROCESS, thid_t tid = NO_THREAD) { return callui(ui_dbg_request_run_to, ea, pid, tid).cnd; }
707
708
718
719inline bool idaapi run_to_backwards(ea_t ea, pid_t pid = NO_PROCESS, thid_t tid = NO_THREAD) { return callui(ui_dbg_run_to_backwards, ea, pid, tid).cnd; }
720
722
723inline bool idaapi request_run_to_backwards(ea_t ea, pid_t pid = NO_PROCESS, thid_t tid = NO_THREAD) { return callui(ui_dbg_request_run_to_backwards, ea, pid, tid).cnd; }
724
725
731
732inline bool idaapi step_until_ret(void) { return callui(ui_dbg_step_until_ret).cnd; }
733
735
736inline bool idaapi request_step_until_ret(void) { return callui(ui_dbg_request_step_until_ret).cnd; }
737
738
741
742inline bool idaapi set_resume_mode(thid_t tid, resume_mode_t mode) { return callui(ui_dbg_set_resume_mode, tid, mode).cnd; }
743
745
746inline bool idaapi request_set_resume_mode(thid_t tid, resume_mode_t mode) { return callui(ui_dbg_request_set_resume_mode, tid, mode).cnd; }
747
749
750
751//--------------------------------------------------------------------
752// R E G I S T E R S
753//--------------------------------------------------------------------
769
773
774inline bool idaapi get_dbg_reg_info(const char *regname, register_info_t *ri) { return callui(ui_dbg_get_reg_info, regname, ri).cnd; }
775
779
780inline bool idaapi get_reg_val(const char *regname, regval_t *regval) { return callui(ui_dbg_get_reg_val, regname, regval).cnd; }
781
783
784inline bool idaapi get_reg_val(const char *regname, uint64 *ival) { return callui(ui_dbg_get_reg_val_i, regname, ival).cnd; }
785
786
789inline bool idaapi get_sp_val(ea_t *out) { return callui(ui_dbg_get_sp_val, out).cnd; }
790
793inline bool idaapi get_ip_val(ea_t *out) { return callui(ui_dbg_get_ip_val, out).cnd; }
794
798
799inline bool idaapi set_reg_val(const char *regname, const regval_t *regval) { return callui(ui_dbg_set_reg_val, regname, regval).cnd; }
800
802
803inline bool idaapi set_reg_val(const char *regname, uint64 ival) { return callui(ui_dbg_set_reg_val_i, regname, ival).cnd; }
804
806
807inline bool idaapi request_set_reg_val(const char *regname, const regval_t *regval) { return callui(ui_dbg_request_set_reg_val, regname, regval).cnd; }
808
809
813
814inline bool idaapi is_reg_integer(const char *regname) { return callui(ui_dbg_get_reg_value_type, regname).i-2 == RVT_INT; }
815
816
820
821inline bool idaapi is_reg_float(const char *regname) { return callui(ui_dbg_get_reg_value_type, regname).i-2 == RVT_FLOAT; }
822
823
827
828inline bool idaapi is_reg_custom(const char *regname) { return callui(ui_dbg_get_reg_value_type, regname).i >= 2; }
829
831
832#endif // __UI__
833
834//--------------------------------------------------------------------
835// B R E A K P O I N T S
836//--------------------------------------------------------------------
842
843int idaapi set_bptloc_string(const char *s);
844const char *idaapi get_bptloc_string(int i);
845
846struct bpt_t;
847struct bpt_location_t;
848struct movbpt_info_t;
853
862
863struct bptaddrs_t : public eavec_t
864{
865 bpt_t *bpt; // bpt described by this structure.
866 // we need it to handle internal srcbpts
867};
868
870
871
872
881
884{
885// private:
887 int index;
889// public:
890 bpt_loctype_t type(void) const { return loctype; }
891 bool is_empty_path(void) const { return index == 0; }
892 const char *path(void) const { return get_bptloc_string(index); }
893 const char *symbol(void) const { return get_bptloc_string(index); }
894 int lineno(void) const { return int(info); }
895 uval_t offset(void) const { return (uval_t)info; }
896 ea_t ea(void) const { return info; }
897
898 bpt_location_t(void) : info(BADADDR), index(0), loctype(BPLT_ABS) {}
899
902 {
903 info = a;
905 }
906
908 void set_src_bpt(const char *fn, int _lineno)
909 {
911 info = _lineno;
913 }
914
916 void set_sym_bpt(const char *_symbol, uval_t _offset=0)
917 {
918 index = set_bptloc_string(_symbol);
919 info = _offset;
921 }
922
924 void set_rel_bpt(const char *mod, uval_t _offset)
925 {
927 info = _offset;
929 }
930
936 int compare(const bpt_location_t &r) const { return callui(ui_dbg_compare_bpt_locs, this, &r).i; }
937 bool operator==(const bpt_location_t &r) const { return compare(r) == 0; }
938 bool operator!=(const bpt_location_t &r) const { return compare(r) != 0; }
939 bool operator< (const bpt_location_t &r) const { return compare(r) < 0; }
940 bool operator> (const bpt_location_t &r) const { return compare(r) > 0; }
941 bool operator<=(const bpt_location_t &r) const { return compare(r) <= 0; }
942 bool operator>=(const bpt_location_t &r) const { return compare(r) >= 0; }
943
945 size_t print(qstring *buf) const;
946};
948
950struct bpt_t
951{
952 size_t cb;
965#define BPT_BRK 0x001
966#define BPT_TRACE 0x002
967#define BPT_UPDMEM 0x004
968#define BPT_ENABLED 0x008
969#define BPT_LOWCND 0x010
970#define BPT_TRACEON 0x020
971#define BPT_TRACE_INSN 0x040
972#define BPT_TRACE_FUNC 0x080
973#define BPT_TRACE_BBLK 0x100
974#define BPT_TRACE_TYPES (BPT_TRACE_INSN|BPT_TRACE_FUNC|BPT_TRACE_BBLK)
978#define BPT_ELANG_MASK 0xF0000000u
979#define BPT_ELANG_SHIFT 28
981
982 uint32 props;
986#define BKPT_BADBPT 0x01
987#define BKPT_LISTBPT 0x02
988#define BKPT_TRACE 0x04
989#define BKPT_ACTIVE 0x08
990#define BKPT_PARTIAL 0x10
991#define BKPT_CNDREADY 0x20
992#define BKPT_FAKEPEND 0x40
994#define BKPT_PAGE 0x80
997
998 int size;
999 int cndidx;
1002 bpt_t(void) : cb(sizeof(*this)), pid(NO_PROCESS), tid(NO_THREAD), ea(BADADDR),
1003 type(BPT_SOFT), pass_count(0), flags(BPT_BRK|BPT_ENABLED),
1004 props(0), size(0), cndidx(-1), bptid(0) {}
1005
1006 bool is_hwbpt(void) const { return type != BPT_SOFT; }
1007 bool enabled(void) const { return (flags & BPT_ENABLED) != 0; }
1008 bool is_low_level(void) const { return (flags & BPT_LOWCND) != 0; }
1009 bool badbpt(void) const { return (props & BKPT_BADBPT) != 0; }
1010 bool listbpt(void) const { return (props & BKPT_LISTBPT) != 0; }
1011 bool is_compiled(void) const { return (props & BKPT_CNDREADY) != 0; }
1012 /// Written completely to process?
1013 bool is_active(void) const { return (props & (BKPT_PARTIAL|BKPT_ACTIVE)) == BKPT_ACTIVE; }
1015 bool is_partially_active(void) const { return (props & BKPT_PARTIAL) != 0; }
1017 bool is_inactive(void) const { return (props & (BKPT_PARTIAL|BKPT_ACTIVE)) == 0; }
1019 bool is_page_bpt(void) const { return (props & BKPT_PAGE) != 0; }
1022 int get_size(void) const { return is_hwbpt() ? size : 1; }
1024 void set_abs_bpt(ea_t a) { loc.set_abs_bpt(a); ea = a; }
1026 void set_src_bpt(const char *fn, int lineno) { loc.set_src_bpt(fn, lineno); ea = BADADDR; }
1028 void set_sym_bpt(const char *sym, uval_t o) { loc.set_sym_bpt(sym, o); ea = BADADDR; }
1030 void set_rel_bpt(const char *mod, uval_t o) { loc.set_rel_bpt(mod, o); ea = BADADDR; }
1032 bool is_absbpt(void) const { return loc.type() == BPLT_ABS; }
1033 bool is_relbpt(void) const { return loc.type() == BPLT_REL; }
1034 bool is_symbpt(void) const { return loc.type() == BPLT_SYM; }
1035 bool is_srcbpt(void) const { return loc.type() == BPLT_SRC; }
1038 bool is_tracemodebpt(void) const { return (flags & BPT_TRACE_TYPES) != 0; }
1040 bool is_traceonbpt(void) const { return is_tracemodebpt() && (flags & BPT_TRACEON) != 0; }
1042 bool is_traceoffbpt(void) const { return is_tracemodebpt() && (flags & BPT_TRACEON) == 0; }
1044 bool set_trace_action(bool enable, int trace_types)
1046 trace_types &= BPT_TRACE_TYPES;
1047 if ( trace_types == 0 )
1048 return false;
1049 flags |= trace_types;
1050 setflag(flags, BPT_TRACEON, enable);
1051 return true;
1052 }
1053
1054
1055 const char *get_cnd_elang() const;
1056
1059 bool set_cnd_elang(const char *name);
1060
1061 size_t get_cnd_elang_idx() const { return flags >> BPT_ELANG_SHIFT; }
1063 void set_cond(const char *cnd);
1064 bool eval_cond(ea_t ea, bool *fire, const char *bpt_type);
1067
1074
1075#ifndef __UI__
1076
1077
1081
1082inline int idaapi get_bpt_qty(void) { return callui(ui_dbg_get_bpt_qty).i; }
1083
1084
1091
1092inline bool idaapi getn_bpt(int n, bpt_t *bpt) { return callui(ui_dbg_getn_bpt, n, bpt).cnd; }
1093
1094
1101
1102inline bool idaapi get_bpt(ea_t ea, bpt_t *bpt) { return callui(ui_dbg_get_bpt, ea, bpt).cnd; }
1103
1104
1106
1107inline bool exist_bpt(ea_t ea) { return get_bpt(ea, nullptr); }
1108
1109
1127
1128inline bool idaapi add_bpt(ea_t ea, asize_t size = 0, bpttype_t type = BPT_DEFAULT) { return callui(ui_dbg_add_oldbpt, ea, size, type).cnd; }
1129
1131
1133
1134
1141
1142inline bool idaapi add_bpt(const bpt_t &bpt) { return callui(ui_dbg_add_bpt, &bpt).cnd; }
1143
1145
1146inline bool idaapi request_add_bpt(const bpt_t &bpt) { return callui(ui_dbg_request_add_bpt, &bpt).cnd; }
1147
1148
1153
1154inline bool idaapi del_bpt(ea_t ea) { return callui(ui_dbg_del_oldbpt, ea).cnd; }
1155
1157
1158inline bool idaapi request_del_bpt(ea_t ea) { return callui(ui_dbg_request_del_oldbpt, ea).cnd; }
1159
1160
1165
1166inline bool idaapi del_bpt(const bpt_location_t &bptloc) { return callui(ui_dbg_del_bpt, &bptloc).cnd; }
1167
1169
1170inline bool idaapi request_del_bpt(const bpt_location_t &bptloc) { return callui(ui_dbg_request_del_bpt, &bptloc).cnd; }
1171
1172
1194
1195inline bool idaapi update_bpt(const bpt_t *bpt) { return callui(ui_dbg_update_bpt, bpt).cnd; }
1196
1197
1203
1204inline bool idaapi find_bpt(const bpt_location_t &bptloc, bpt_t *bpt) { return callui(ui_dbg_find_bpt, &bptloc, bpt).cnd; }
1205
1206
1212
1213inline int idaapi change_bptlocs(
1214 const movbpt_infos_t &movinfo,
1215 movbpt_codes_t *codes = nullptr,
1216 bool del_hindering_bpts = true)
1217{
1218 return callui(ui_dbg_change_bptlocs, &movinfo, codes, del_hindering_bpts).i;
1219}
1220
1221
1228inline bool idaapi enable_bpt(ea_t ea, bool enable = true) { return callui(ui_dbg_enable_oldbpt, ea, enable).cnd; }
1229inline bool idaapi enable_bpt(const bpt_location_t &bptloc, bool enable = true) { return callui(ui_dbg_enable_bpt, &bptloc, enable).cnd; }
1230inline bool disable_bpt(ea_t ea) { return enable_bpt(ea, false); }
1231inline bool disable_bpt(const bpt_location_t &bptloc) { return enable_bpt(bptloc, false); }
1232inline bool idaapi request_enable_bpt(ea_t ea, bool enable = true) { return callui(ui_dbg_request_enable_oldbpt, ea, enable).cnd; }
1233inline bool idaapi request_enable_bpt(const bpt_location_t &bptloc, bool enable = true) { return callui(ui_dbg_request_enable_bpt, &bptloc, enable).cnd; }
1234inline bool request_disable_bpt(ea_t ea) { return request_enable_bpt(ea, false); }
1235inline bool request_disable_bpt(const bpt_location_t &bptloc) { return request_enable_bpt(bptloc, false); }
1237
1238
1241
1242inline int idaapi check_bpt(ea_t ea) { return callui(ui_dbg_check_bpt, ea).i; }
1243
1244#endif // __UI__
1245
1249#define BPTCK_NONE -1
1250#define BPTCK_NO 0
1251#define BPTCK_YES 1
1252#define BPTCK_ACT 2
1254
1255#ifndef SWIG
1261{
1263 const char *name;
1264 bpt_visitor_t(void) : range(0, BADADDR), name(nullptr) {}
1266 virtual int idaapi visit_bpt(const bpt_t *bpt) = 0;
1267 int idaapi for_all_bpts(int bvflags)
1268 {
1269 return callui(ui_dbg_for_all_bpts, this, bvflags).i;
1270 }
1271};
1272
1278#define BVF_ABS 0x0001
1279#define BVF_REL 0x0002
1280#define BVF_SYM 0x0004
1281#define BVF_SRC 0x0008
1282#define BVF_ALL 0x000F
1283#define BVF_STATE 0x0030
1284#define BVFS_ANY 0x0000
1285#define BVFS_INPROC 0x0010
1286#define BVFS_PENDING 0x0020
1287#define BVFS_DISABLED 0x0030
1289#endif // SWIG
1290
1291
1293
1294
1295#ifndef __UI__
1296
1301
1302//--------------------------------------------------------------------
1303// T R A C I N G B U F F E R
1304//--------------------------------------------------------------------
1312
1313
1321
1322inline bool idaapi set_trace_size(int size) { return callui(ui_dbg_set_trace_size, size).cnd; }
1323
1324
1328
1329inline void idaapi clear_trace(void) { callui(ui_dbg_clear_trace); }
1330
1332
1334
1336
1337
1338//--------------------------------------------------------------------
1339// S T E P T R A C I N G
1340//--------------------------------------------------------------------
1350
1354
1355inline bool idaapi is_step_trace_enabled(void) { return callui(ui_dbg_is_step_trace_enabled).cnd; }
1356
1357
1369
1370inline bool idaapi enable_step_trace(int enable = 1) { return callui(ui_dbg_enable_step_trace, enable).cnd; }
1371inline bool disable_step_trace(void) { return enable_step_trace(0); }
1372inline bool idaapi request_enable_step_trace(int enable = 1) { return callui(ui_dbg_request_enable_step_trace, enable).cnd; }
1373inline bool request_disable_step_trace(void) { return request_enable_step_trace(false); }
1375
1376#endif // __UI__
1377
1378
1382#define ST_OVER_DEBUG_SEG 0x01
1383#define ST_OVER_LIB_FUNC 0x02
1384#define ST_ALREADY_LOGGED 0x04
1385#define ST_SKIP_LOOPS 0x08
1386#define ST_DIFFERENTIAL 0x10
1388#define ST_OPTIONS_MASK (ST_OVER_DEBUG_SEG|ST_OVER_LIB_FUNC|ST_ALREADY_LOGGED|ST_SKIP_LOOPS|ST_DIFFERENTIAL)
1389#define ST_OPTIONS_DEFAULT (ST_OVER_DEBUG_SEG|ST_OVER_LIB_FUNC)
1391
1393#define IT_LOG_SAME_IP 0x01
1395#define FT_LOG_RET 0x01
1397#define BT_LOG_INSTS 0x01
1398
1399#ifndef __UI__
1400
1405
1407
1411
1412inline void idaapi set_step_trace_options(int options) { callui(ui_dbg_set_step_trace_options, options); }
1413
1415
1417
1419
1420
1421//--------------------------------------------------------------------
1422// I N S T R U C T I O N S T R A C I N G
1423//--------------------------------------------------------------------
1432
1436
1437inline bool idaapi is_insn_trace_enabled(void) { return callui(ui_dbg_is_insn_trace_enabled).cnd; }
1438
1443inline bool idaapi enable_insn_trace(bool enable = true) { return callui(ui_dbg_enable_insn_trace, enable).cnd; }
1444inline bool disable_insn_trace(void) { return enable_insn_trace(false); }
1445inline bool idaapi request_enable_insn_trace(bool enable = true) { return callui(ui_dbg_request_enable_insn_trace, enable).cnd; }
1446inline bool request_disable_insn_trace(void) { return request_enable_insn_trace(false); }
1448
1449
1454
1456
1457
1461
1462inline void idaapi set_insn_trace_options(int options) { callui(ui_dbg_set_insn_trace_options, options); }
1463
1465
1467
1469
1470
1471//--------------------------------------------------------------------
1472// F U N C T I O N S T R A C I N G
1473//--------------------------------------------------------------------
1480
1484
1485inline bool idaapi is_func_trace_enabled(void) { return callui(ui_dbg_is_func_trace_enabled).cnd; }
1486
1487
1492inline bool idaapi enable_func_trace(bool enable = true) { return callui(ui_dbg_enable_func_trace, enable).cnd; }
1493inline bool disable_func_trace(void) { return enable_func_trace(false); }
1494inline bool idaapi request_enable_func_trace(bool enable = true) { return callui(ui_dbg_request_enable_func_trace, enable).cnd; }
1495inline bool request_disable_func_trace(void) { return request_enable_func_trace(false); }
1497
1498
1503
1505
1506
1510
1511inline void idaapi set_func_trace_options(int options) { callui(ui_dbg_set_func_trace_options, options); }
1512
1514
1516
1518
1519
1520//--------------------------------------------------------------------
1521// B A S I C B L O C K T R A C I N G
1522//--------------------------------------------------------------------
1526
1527// Modify basic block tracing options.
1528// Type: Synchronous function - available as Request
1529// Notification: none (synchronous function)
1530
1531
1536inline bool idaapi enable_bblk_trace(bool enable = true) { return callui(ui_dbg_enable_bblk_trace, enable).cnd; }
1537inline bool disable_bblk_trace(void) { return enable_bblk_trace(false); }
1538inline bool idaapi request_enable_bblk_trace(bool enable = true) { return callui(ui_dbg_request_enable_bblk_trace, enable).cnd; }
1539inline bool request_disable_bblk_trace(void) { return request_enable_bblk_trace(false); }
1540inline bool idaapi is_bblk_trace_enabled(void) { return callui(ui_dbg_is_bblk_trace_enabled).cnd; }
1542
1547
1549
1550
1552
1553inline void idaapi set_bblk_trace_options(int options) { callui(ui_dbg_set_bblk_trace_options, options); }
1554
1556
1558
1560
1561#endif // __UI__
1562
1563//--------------------------------------------------------------------
1564// T R A C I N G E V E N T S
1565//--------------------------------------------------------------------
1569
1582
1584
1593
1594
1603
1604
1605#ifndef __UI__
1606
1610
1611inline int idaapi get_tev_qty(void) { return callui(ui_dbg_get_tev_qty).i; }
1612
1613
1621
1622inline bool idaapi get_tev_info(int n, tev_info_t *tev_info) { return callui(ui_dbg_get_tev_info, n, tev_info).cnd; }
1623
1624
1635
1636inline bool idaapi get_insn_tev_reg_val(int n, const char *regname, regval_t *regval) { return callui(ui_dbg_get_insn_tev_reg_val, n, regname, regval).cnd; }
1637
1638inline bool idaapi get_insn_tev_reg_val(int n, const char *regname, uint64 *ival) { return callui(ui_dbg_get_insn_tev_reg_val_i, n, regname, ival).cnd; }
1639
1640
1648
1649inline bool idaapi get_insn_tev_reg_mem(int n, memreg_infos_t *memmap) { return callui(ui_dbg_get_insn_tev_reg_mem, n, memmap).cnd; }
1650
1651
1660
1661inline bool idaapi get_insn_tev_reg_result(int n, const char *regname, regval_t *regval) { return callui(ui_dbg_get_insn_tev_reg_result, n, regname, regval).cnd; }
1662
1663inline bool idaapi get_insn_tev_reg_result(int n, const char *regname, uint64 *ival) { return callui(ui_dbg_get_insn_tev_reg_result_i, n, regname, ival).cnd; }
1664
1665
1672
1673inline ea_t idaapi get_call_tev_callee(int n) { ea_t ea; callui(ui_dbg_get_call_tev_callee, n, &ea); return ea; }
1674
1675
1682
1683inline ea_t idaapi get_ret_tev_return(int n) { ea_t ea; callui(ui_dbg_get_ret_tev_return, n, &ea); return ea; }
1684
1685
1697
1698inline ea_t idaapi get_bpt_tev_ea(int n) { ea_t ea; callui(ui_dbg_get_bpt_tev_ea, n, &ea); return ea; }
1699
1700
1709
1710inline bool idaapi get_tev_memory_info(int n, meminfo_vec_t *mi) { return callui(ui_dbg_get_tev_memory_info, n, mi).cnd; }
1711
1712
1721
1722inline bool idaapi get_tev_event(int n, debug_event_t *d) { return callui(ui_dbg_get_tev_event, n, d).cnd; }
1723
1724
1729
1730inline ea_t idaapi get_trace_base_address(void) { ea_t ea; callui(ui_dbg_get_trace_base_address, &ea); return ea; }
1731
1732
1736
1738
1739
1743
1744inline void idaapi dbg_add_thread(thid_t tid) { callui(ui_dbg_add_thread, tid); }
1745
1746
1750
1751inline void idaapi dbg_del_thread(thid_t tid) { callui(ui_dbg_del_thread, tid); }
1752
1753
1757
1758inline void idaapi dbg_add_tev(tev_type_t type, thid_t tid, ea_t address) { callui(ui_dbg_add_tev, type, tid, address); }
1759
1760#endif // __UI__
1761
1764{
1767
1768 tev_reg_value_t(int _reg_idx = -1, uint64 _value = uint64(-1)) : reg_idx(_reg_idx)
1769 {
1770 value._set_int(_value);
1771 }
1772};
1775
1784
1785
1793
1794#ifndef __UI__
1795
1800
1801inline bool idaapi dbg_add_many_tevs(tevinforeg_vec_t *new_tevs) { return callui(ui_dbg_add_many_tevs, new_tevs).cnd; }
1802
1803
1808
1809inline bool idaapi dbg_add_insn_tev(thid_t tid, ea_t ea, save_reg_values_t save = SAVE_DIFF) { return callui(ui_dbg_add_insn_tev, tid, ea, save).cnd; }
1810
1811
1816
1817inline bool idaapi dbg_add_bpt_tev(thid_t tid, ea_t ea, ea_t bp) { return callui(ui_dbg_add_bpt_tev, tid, ea, bp).cnd; }
1818
1819
1823
1824inline void idaapi dbg_add_call_tev(thid_t tid, ea_t caller, ea_t callee) { callui(ui_dbg_add_call_tev, tid, caller, callee); }
1825
1826
1830
1831inline void idaapi dbg_add_ret_tev(thid_t tid, ea_t ret_insn, ea_t return_to) { callui(ui_dbg_add_ret_tev, tid, ret_insn, return_to); }
1832
1833
1837
1839
1841
1842
1843//---------------------------------------------------------------------------
1844// Trace management functions
1845//---------------------------------------------------------------------------
1849
1853
1854inline bool idaapi load_trace_file(qstring *buf, const char *filename) { return callui(ui_dbg_load_trace_file, buf, filename).cnd; }
1855
1856
1858
1859inline bool idaapi save_trace_file(const char *filename, const char *description) { return callui(ui_dbg_save_trace_file, filename, description).cnd; }
1860
1861
1863
1864inline bool idaapi is_valid_trace_file(const char *filename) { return callui(ui_dbg_is_valid_trace_file, filename).cnd; }
1865
1866
1868
1869inline bool idaapi set_trace_file_desc(const char *filename, const char *description) { return callui(ui_dbg_set_trace_file_desc, filename, description).cnd; }
1870
1871
1873
1874inline bool idaapi get_trace_file_desc(qstring *buf, const char *filename) { return callui(ui_dbg_get_trace_file_desc, buf, filename).cnd; }
1875
1876
1878
1879inline bool idaapi choose_trace_file(qstring *buf) { return callui(ui_dbg_choose_trace_file, buf).cnd; }
1880
1881
1883
1884inline bool idaapi diff_trace_file(const char *NONNULL filename) { return callui(ui_dbg_diff_trace_file, filename).cnd; }
1885
1886
1888
1889inline bool idaapi graph_trace(void) { return callui(ui_dbg_graph_trace).cnd; }
1890
1891
1893
1895 bool hilight,
1896 bgcolor_t color,
1897 bgcolor_t diff)
1898{
1899 callui(ui_dbg_set_highlight_trace_options, hilight, color, diff);
1900}
1901
1902
1904
1905inline void idaapi set_trace_platform(const char *platform) { callui(ui_dbg_set_trace_platform, platform); }
1906
1907
1909
1910inline const char *idaapi get_trace_platform() { return callui(ui_dbg_get_trace_platform).cptr; }
1911
1912
1914
1916
1917
1919
1921
1923
1924#endif // __UI__
1925
1926//---------------------------------------------------------------------------
1927// High level functions (usable from scripts)
1928//--------------------------------------------------------------------
1934
1938
1946
1950#define WFNE_ANY 0x0001
1951#define WFNE_SUSP 0x0002
1952#define WFNE_SILENT 0x0004
1953#define WFNE_CONT 0x0008
1954#define WFNE_NOWAIT 0x0010
1956#define WFNE_USEC 0x0020
1959
1963#define DOPT_SEGM_MSGS 0x00000001
1964#define DOPT_START_BPT 0x00000002
1965#define DOPT_THREAD_MSGS 0x00000004
1966#define DOPT_THREAD_BPT 0x00000008
1967#define DOPT_BPT_MSGS 0x00000010
1968//#define DOPT_BINS_BPT 0x00000020 // break on breakpoint instruction
1969#define DOPT_LIB_MSGS 0x00000040
1970#define DOPT_LIB_BPT 0x00000080
1971#define DOPT_INFO_MSGS 0x00000100
1972#define DOPT_INFO_BPT 0x00000200
1973#define DOPT_REAL_MEMORY 0x00000400
1974#define DOPT_REDO_STACK 0x00000800
1975#define DOPT_ENTRY_BPT 0x00001000
1976#define DOPT_EXCDLG 0x00006000
1977# define EXCDLG_NEVER 0x00000000
1978# define EXCDLG_UNKNOWN 0x00002000
1979# define EXCDLG_ALWAYS 0x00006000
1980#define DOPT_LOAD_DINFO 0x00008000
1981#define DOPT_END_BPT 0x00010000
1982#define DOPT_TEMP_HWBPT 0x00020000
1983#define DOPT_FAST_STEP 0x00040000
1984#define DOPT_DISABLE_ASLR 0x00080000
1986#ifndef __UI__
1987
1996
1997inline dbg_event_code_t idaapi wait_for_next_event(int wfne, int timeout) { return dbg_event_code_t(callui(ui_dbg_wait_for_next_event, wfne, timeout).i); }
1998
1999
2001
2002inline const debug_event_t *idaapi get_debug_event(void) { return (const debug_event_t *)callui(ui_dbg_get_debug_event).vptr; }
2003
2004
2008
2009inline uint idaapi set_debugger_options(uint options) { return callui(ui_dbg_set_debugger_options, options).i; }
2010
2011
2018
2019inline void idaapi set_remote_debugger(const char *host, const char *pass, int port=-1) { callui(ui_dbg_set_remote_debugger, host, pass, port); }
2020
2021
2024
2025inline void idaapi get_process_options(
2026 qstring *path,
2027 qstring *args,
2028 launch_env_t *out_envs,
2029 qstring *sdir,
2030 qstring *host,
2031 qstring *pass,
2032 int *port)
2033{
2034 callui(ui_dbg_get_process_options, path, args, sdir, host, pass, port, out_envs);
2035}
2036
2037
2040
2041inline void idaapi set_process_options(
2042 const char *path,
2043 const char *args,
2044 const launch_env_t *envs,
2045 const char *sdir,
2046 const char *host,
2047 const char *pass,
2048 int port)
2049{
2050 callui(ui_dbg_set_process_options, path, args, sdir, host, pass, port, envs);
2051}
2052
2053
2058
2060
2061
2064
2065inline bool idaapi store_exceptions(void) { return callui(ui_dbg_store_exceptions).cnd; }
2066
2067
2075
2076inline const char *idaapi define_exception(uint code, const char *name, const char *desc, int flags) { return callui(ui_dbg_define_exception, code, name, desc, flags).cptr; }
2077
2078#endif // __UI__
2079
2080
2081//--------------------------------------------------------------------
2082
2084
2085inline THREAD_SAFE bool have_set_options(const debugger_t *_dbg)
2086{
2087 return _dbg != nullptr && _dbg->have_set_options();
2088}
2089
2092
2093inline const char *idaapi set_dbg_options(
2094 debugger_t *_dbg,
2095 const char *keyword,
2096 int pri,
2097 int value_type,
2098 const void *value)
2099{
2100 const char *res = IDPOPT_BADKEY;
2101 if ( have_set_options(_dbg) )
2102 _dbg->set_dbg_options(&res, keyword, pri, value_type, value);
2103 return res;
2104}
2105
2106
2107inline const char *idaapi set_dbg_default_options(
2108 debugger_t *_dbg,
2109 const char *keyword,
2110 int value_type,
2111 const void *value)
2112{
2113 return set_dbg_options(_dbg, keyword, IDPOPT_PRI_DEFAULT, value_type, value);
2114}
2115
2116inline const char *idaapi set_int_dbg_options(
2117 debugger_t *_dbg,
2118 const char *keyword,
2119 int32 value)
2120{
2121 sval_t sv = value;
2122 return set_dbg_default_options(_dbg, keyword, IDPOPT_NUM, &sv);
2123}
2124
2125#ifndef __KERNEL__
2127
2128inline const char *idaapi set_dbg_options(
2129 const char *keyword,
2130 int pri,
2131 int value_type,
2132 const void *value)
2133{
2134 return set_dbg_options(dbg, keyword, pri, value_type, value);
2135}
2136
2138
2139inline const char *idaapi set_dbg_default_options(
2140 const char *keyword,
2141 int value_type,
2142 const void *value)
2143{
2144 return set_dbg_options(keyword, IDPOPT_PRI_DEFAULT, value_type, value);
2145}
2146
2148
2149inline const char *idaapi set_int_dbg_options(
2150 const char *keyword,
2151 int32 value)
2152{
2153 sval_t sv = value;
2154 return set_dbg_default_options(keyword, IDPOPT_NUM, &sv);
2155}
2156#endif // __KERNEL__
2157
2159
2160//---------------------------------------------------------------------------
2161// S O U R C E I N F O R M A T I O N P R O V I D E R S
2162//---------------------------------------------------------------------------
2176
2177class srcinfo_provider_t;
2178
2179class idc_value_t;
2180class rangeset_t;
2181class source_item_t;
2182class argloc_t;
2183
2192
2193//--------------------------------------------------------------------------
2199
2201{
2202 int size_cb;
2203public:
2204 eval_ctx_t(ea_t _ea) : size_cb(sizeof(*this)), ea(_ea) {}
2206};
2207
2208
2209#ifndef __UI__
2210class TWidget;
2211#endif
2212
2213//--------------------------------------------------------------------------
2216{
2217public:
2219 virtual void idaapi release() override = 0;
2220
2223 virtual srcinfo_provider_t *idaapi get_provider(void) const = 0;
2224
2227 virtual const char *idaapi get_path(qstring *errbuf) = 0;
2228
2233 virtual TWidget *open_srcview(strvec_t **strvec, TWidget **pview, int lnnum, int colnum) = 0;
2234
2238 virtual bool idaapi read_file(strvec_t *buf, qstring *errbuf) = 0;
2239};
2240
2247
2248//--------------------------------------------------------------------------
2264
2265//--------------------------------------------------------------------------
2268{
2269public:
2271 virtual void idaapi release() override = 0;
2272
2275
2277 virtual bool idaapi get_name(qstring *buf) const = 0;
2278
2280 virtual int idaapi get_lnnum() const = 0;
2281
2285 virtual int idaapi get_end_lnnum() const = 0;
2286
2289 virtual int idaapi get_colnum() const = 0;
2290
2295 virtual int idaapi get_end_colnum() const = 0;
2296
2298 virtual ea_t idaapi get_ea() const = 0;
2299
2305 virtual asize_t idaapi get_size() const = 0;
2306
2310 virtual bool idaapi get_item_bounds(rangeset_t *set) const = 0;
2311
2316 virtual source_item_ptr idaapi get_parent(src_item_kind_t max_kind) const = 0;
2317
2320
2325 virtual bool idaapi get_hint(
2326 qstring *hint,
2327 const eval_ctx_t *ctx,
2328 int *nlines) const = 0;
2329
2334 virtual bool idaapi evaluate(
2335 const eval_ctx_t *ctx,
2336 idc_value_t *res,
2337 qstring *errbuf) const = 0;
2338
2349 virtual bool idaapi equals(const source_item_t *other) const = 0;
2350
2356
2358 virtual src_item_kind_t idaapi get_item_kind(const eval_ctx_t * /*ctx*/) const newapi { return SRCIT_NONE; }
2360 bool is_stmt(const eval_ctx_t *ctx) const { return get_item_kind(ctx) == SRCIT_STMT; }
2362 bool is_module(const eval_ctx_t *ctx) const { return get_item_kind(ctx) == SRCIT_MODULE; }
2364 bool is_func(const eval_ctx_t *ctx) const { return get_item_kind(ctx) == SRCIT_FUNC; }
2366 bool is_expr(const eval_ctx_t *ctx) const { return get_item_kind(ctx) >= SRCIT_EXPR; }
2368 bool is_locvar(const eval_ctx_t *ctx) const { return get_item_kind(ctx) >= SRCIT_LOCVAR; }
2370 bool is_sttvar(const eval_ctx_t *ctx) const { return get_item_kind(ctx) == SRCIT_STTVAR; }
2371
2374 virtual srcinfo_provider_t *idaapi get_provider(void) const = 0;
2375
2377 virtual bool idaapi get_location(argloc_t * /*out*/, const eval_ctx_t * /*ctx*/) const newapi { return false; }
2378
2380 virtual bool idaapi get_expr_tinfo(tinfo_t *tif) const = 0;
2382};
2383
2384#define SRCDBG_PROV_VERSION 4
2385
2386//--------------------------------------------------------------------------
2389{
2390public:
2392 size_t cb;
2393
2399#define SPF_DECOMPILER 0x0001
2400#define SPF_ENABLED 0x0002
2402#define SPF_ACTIVE 0x0004
2404#define SPF_VERSION_MASK 0xFF000000
2407
2409 const char *name;
2410
2412 const char *display_name;
2413
2414 srcinfo_provider_t(const char *_name, const char *_display_name, int _flags=0)
2415 : cb(sizeof(*this)), flags(_flags), name(_name), display_name(_display_name)
2416 {
2417 flags |= SRCDBG_PROV_VERSION << 24;
2418 }
2419
2421 bool is_decompiler(void) const { return (flags & SPF_DECOMPILER) != 0; }
2423 bool is_enabled(void) const { return (flags & SPF_ENABLED) != 0; }
2425 bool is_active(void) const { return (flags & SPF_ACTIVE) != 0; }
2426
2428 uint8 get_version() const { return (flags >> 24) & 0xFF; }
2429
2432 virtual bool idaapi enable_provider(bool enable) = 0;
2433
2440 virtual const char *idaapi set_options(
2441 const char *keyword,
2442 int value_type,
2443 const void *value) = 0;
2444
2448 virtual void idaapi add_module(const char *path, ea_t base, asize_t size) = 0;
2449
2451 virtual void idaapi del_module(ea_t base) = 0;
2452
2456 virtual void idaapi get_ready(void) = 0;
2457
2462 virtual int idaapi get_change_flags(void) = 0;
2466#define SPCH_NONE 0x0000
2467#define SPCH_FILES 0x0001
2468#define SPCH_ITEMS 0x0002
2469#define SPCH_LINES 0x0004
2471
2484 ea_t ea,
2485 asize_t size,
2486 src_item_kind_t level,
2487 bool may_decompile) = 0;
2488
2492 virtual source_item_iterator idaapi find_source_items(source_file_t *sf, int lnnum, int colnum=0) = 0;
2493
2496 virtual source_file_iterator idaapi create_file_iterator(const char *filename=nullptr) = 0;
2497
2500
2503 virtual bool idaapi apply_module_info(const char * /*path*/) { return false; }
2504
2509 virtual source_item_ptr idaapi find_static_item(const char *name, ea_t ea) = 0;
2510};
2511
2512
2513//--------------------------------------------------------------------------
2518
2520
2521
2524
2526
2527
2528#ifndef __UI__
2529class source_view_t;
2530
2532
2533inline source_view_t *create_source_viewer(
2534 TWidget **out_ccv,
2535 TWidget *parent,
2536 TWidget *custview,
2537 source_file_ptr sf,
2538 strvec_t *lines,
2539 int lnnum,
2540 int colnum,
2541 int flags)
2542{
2543 return (source_view_t *) callui(
2544 ui_create_source_viewer, out_ccv, parent, custview, &sf,
2545 lines, lnnum, colnum, flags).vptr;
2546}
2547
2548#endif
2549
2550//--------------------------------------------------------------------------
2557
2558idaman bool ida_export get_dbg_byte(uint32 *out, ea_t ea);
2559
2560
2565
2566idaman bool ida_export put_dbg_byte(ea_t ea, uint32 x);
2567
2569
2570//--------------------------------------------------------------------------
2571// D E B U G G E R M E M O R Y F U N C T I O N S F O R U I
2572//--------------------------------------------------------------------------
2578
2591
2592idaman void ida_export set_dbgmem_source(
2593 range_t *(idaapi*dbg_get_memory_config)(int *n),
2594 int (idaapi*memory_read)(ea_t ea, void *buffer, int size),
2595 int (idaapi*memory_write)(ea_t ea, const void *buffer, int size));
2596
2597
2601
2602idaman void ida_export invalidate_dbgmem_config(void);
2603
2604
2609
2610idaman void ida_export invalidate_dbgmem_contents(ea_t ea, asize_t size);
2611
2612
2614
2615idaman bool ida_export is_debugger_on(void);
2616
2617
2619
2620idaman bool ida_export is_debugger_memory(ea_t ea);
2621
2623
2624//------------------------------------------------------------------------
2625#if !defined(__UI__) && !defined(__KERNEL__) // Not for the UI nor the kernel
2626
2627
2633inline ea_t idaapi get_tev_ea(int n) { ea_t ea; callui(ui_dbg_get_tev_ea, n, &ea); return ea; }
2634inline int idaapi get_tev_type(int n) { return callui(ui_dbg_get_tev_type, n).i; }
2635inline int idaapi get_tev_tid(int n) { return callui(ui_dbg_get_tev_tid, n).i; }
2637inline void idaapi get_manual_regions(meminfo_vec_t *ranges) { callui(ui_dbg_get_manual_regions, ranges); }
2638inline void idaapi set_manual_regions(const meminfo_vec_t *ranges) { callui(ui_dbg_set_manual_regions, ranges); }
2640inline void idaapi enable_manual_regions(bool enable) { callui(ui_dbg_enable_manual_regions, enable); }
2641inline int idaapi handle_debug_event(const debug_event_t *ev, int rqflags) { return callui(ui_dbg_handle_debug_event, ev, rqflags).i; }
2642inline bool idaapi add_virt_module(const modinfo_t *mod) { return callui(ui_dbg_add_vmod, mod).cnd; }
2643inline bool idaapi del_virt_module(const ea_t base) { return callui(ui_dbg_del_vmod, base).cnd; }
2644inline int idaapi set_bptloc_string(const char *s) { return callui(ui_dbg_set_bptloc_string, s).i; }
2645inline const char *idaapi get_bptloc_string(int i) { return callui(ui_dbg_get_bptloc_string, i).cptr; }
2646inline int idaapi internal_get_sreg_base(ea_t *answer, thid_t tid, int sreg_value) { return callui(ui_dbg_internal_get_sreg_base, answer, tid, sreg_value).i; }
2647inline int idaapi internal_ioctl(int fn, const void *buf, size_t size, void **poutbuf, ssize_t *poutsize) { return callui(ui_dbg_internal_ioctl, fn, buf, size, poutbuf, poutsize).i; }
2648inline int idaapi get_reg_vals(thid_t tid, int clsmask, regval_t *values) { return callui(ui_dbg_read_registers, tid, clsmask, values).i; }
2649inline int idaapi set_reg_val(thid_t tid, int regidx, const regval_t *value) { return callui(ui_dbg_write_register, tid, regidx, value).i; }
2650inline int idaapi get_dbg_memory_info(meminfo_vec_t *ranges) { return callui(ui_dbg_get_memory_info, ranges).i; }
2651
2659inline bool idaapi set_bpt_group(bpt_t &bpt, const char *grp_name) { return callui(ui_dbg_set_bpt_group, &bpt, grp_name).cnd; }
2660
2669inline bool idaapi set_bptloc_group(const bpt_location_t &bptloc, const char *grp_name) { return callui(ui_dbg_set_bptloc_group, &bptloc, grp_name).cnd; }
2670
2679inline bool idaapi get_bpt_group(qstring *grp_name, const bpt_location_t &bptloc) { return callui(ui_dbg_get_bpt_group, grp_name, &bptloc).cnd; }
2680
2686inline size_t idaapi list_bptgrps(qstrvec_t *bptgrps) { return callui(ui_dbg_list_bptgrps, bptgrps).ssize; }
2687
2694inline bool idaapi rename_bptgrp(const char *old_name, const char *new_name) { return callui(ui_dbg_rename_bptgrp, old_name, new_name).cnd; }
2695
2701inline bool idaapi del_bptgrp(const char *name) { return callui(ui_dbg_del_bptgrp, name).cnd; }
2702
2709inline ssize_t idaapi get_grp_bpts(bpt_vec_t *bpts, const char *grp_name) { return callui(ui_dbg_get_grp_bpts, bpts, grp_name).ssize; }
2710
2719inline int idaapi enable_bptgrp(const char *bptgrp_name, bool enable=true) { return callui(ui_dbg_enable_bptgrp, bptgrp_name, enable).i; }
2720inline bool idaapi get_local_vars(srcinfo_provider_t *prov, ea_t ea, source_items_t *out) { return callui(ui_dbg_get_local_vars, prov, ea, out).cnd; }
2721inline bool idaapi srcdbg_request_step_into(void) { return callui(ui_dbg_srcdbg_request_step_into).cnd; }
2722inline bool idaapi srcdbg_request_step_over(void) { return callui(ui_dbg_srcdbg_request_step_over).cnd; }
2725#endif // !__UI__ && !__KERNEL__
2726
2727#ifndef __UI__
2729inline int idaapi hide_all_bpts(void) { return callui(ui_dbg_hide_all_bpts).i; }
2730inline ssize_t idaapi read_dbg_memory(ea_t ea, void *buffer, size_t size) { return callui(ui_dbg_read_memory, ea, buffer, size).ssize; }
2731inline bool idaapi get_module_info(ea_t ea, modinfo_t *modinfo) { return callui(ui_dbg_get_module_info, ea, modinfo).cnd; }
2732inline drc_t idaapi dbg_bin_search(ea_t *out, ea_t start_ea, ea_t end_ea, const compiled_binpat_vec_t &data, int srch_flags, qstring *errbuf)
2733 { return drc_t(callui(ui_dbg_bin_search, out, start_ea, end_ea, &data, srch_flags, errbuf).i); }
2734inline bool idaapi dbg_can_query(debugger_t *_dbg)
2735{
2736 // Debugger can be queried IIF it is set and either currently in
2737 // suspended state, or can be queried while not in suspended state
2738 return _dbg != nullptr && (_dbg->may_disturb() || get_process_state() < DSTATE_NOTASK);
2739}
2740inline bool idaapi dbg_can_query(void)
2741{
2742 return dbg_can_query(dbg);
2743}
2744inline bool idaapi load_debugger(const char *dbgname, bool use_remote) { return callui(ui_dbg_load_debugger, dbgname, use_remote).cnd; }
2745inline bool idaapi collect_stack_trace(thid_t tid, call_stack_t *trace) { return callui(ui_dbg_collect_stack_trace, tid, trace).cnd; }
2746inline bool idaapi get_global_var(srcinfo_provider_t *prov, ea_t ea, const char *name, source_item_ptr *out) { return callui(ui_dbg_get_global_var, prov, ea, name, out).cnd; }
2747inline bool idaapi get_local_var(srcinfo_provider_t *prov, ea_t ea, const char *name, source_item_ptr *out) { return callui(ui_dbg_get_local_var, prov, ea, name, out).cnd; }
2748inline srcinfo_provider_t *idaapi get_srcinfo_provider(const char *name) { return (srcinfo_provider_t *)callui(ui_dbg_get_srcinfo_provider, name).vptr; }
2749inline bool idaapi get_current_source_file(qstring *out) { return callui(ui_dbg_get_current_source_file, out).cnd; }
2751inline void idaapi add_path_mapping(const char *src, const char *dst) { callui(ui_dbg_add_path_mapping, src, dst); }
2752inline bool idaapi srcdbg_step_into(void) { return callui(ui_dbg_srcdbg_step_into).cnd; }
2753inline bool idaapi srcdbg_step_over(void) { return callui(ui_dbg_srcdbg_step_over).cnd; }
2754inline bool idaapi srcdbg_step_until_ret(void) { return callui(ui_dbg_srcdbg_step_until_ret).cnd; }
2755inline ssize_t idaapi write_dbg_memory(ea_t ea, const void *buffer, size_t size) { return callui(ui_dbg_write_memory, ea, buffer, size).ssize; }
2756inline void idaapi set_debugger_event_cond(const char *NONNULL evcond) { callui(ui_dbg_set_event_cond, evcond); }
2757inline const char *idaapi get_debugger_event_cond(void) { return callui(ui_dbg_get_event_cond).cptr; }
2758inline const char *bpt_t::get_cnd_elang() const { return (const char *)(callui(ui_dbg_internal_get_elang, this).cptr); }
2759inline bool bpt_t::set_cnd_elang(const char *name) { return callui(ui_dbg_internal_set_elang, this, name).cnd; }
2760#endif // !__UI__
2761
2762#ifdef __KERNEL__
2763inline bool idaapi set_bpt_group(bpt_t &bpt, const char *grp_name) { return get_bpt_kernel_interface()->set_bpt_dir(&bpt, grp_name); }
2764inline int idaapi set_bptloc_string(const char *s) { return get_bpt_kernel_interface()->add_bptloc_string(s); }
2765inline const char *idaapi get_bptloc_string(int i) { return get_bpt_kernel_interface()->get_bptloc_string(i); }
2766#endif
2767
2768// internal kernel functions to lock the debugger memory configuration updates
2769// Do not use these functions! They will be removed!
2770idaman void ida_export lock_dbgmem_config(void);
2771idaman void ida_export unlock_dbgmem_config(void);
2772
2773
2774#endif
qvector< compiled_binpat_t > compiled_binpat_vec_t
Definition bytes.hpp:2328
Describes an argument location.
Definition typeinf.hpp:1101
Vector of bytes (use for dynamic memory)
Definition pro.h:3773
Execution context.
Definition dbg.hpp:2201
ea_t ea
Definition dbg.hpp:2205
eval_ctx_t(ea_t _ea)
Definition dbg.hpp:2204
Class to hold idc values.
Definition expr.hpp:315
Interface class for iterator types.
Definition pro.h:2984
qrefcnt_obj_t(void)
Constructor.
Definition pro.h:2972
Smart pointer to objects derived from qrefcnt_obj_t.
Definition pro.h:2920
Reimplementation of vector class from STL.
Definition pro.h:2250
Describes a source file.
Definition dbg.hpp:2216
virtual bool idaapi read_file(strvec_t *buf, qstring *errbuf)=0
Read entire file (colored lines).
virtual TWidget * open_srcview(strvec_t **strvec, TWidget **pview, int lnnum, int colnum)=0
Open window with source code (optional function).
virtual srcinfo_provider_t *idaapi get_provider(void) const =0
Get source info provider.
virtual const char *idaapi get_path(qstring *errbuf)=0
Get path to the source file (or a symbolic name).
virtual void idaapi release() override=0
Call this function to free source_file_t.
Describes a subdivision of source information.
Definition dbg.hpp:2268
virtual bool idaapi equals(const source_item_t *other) const =0
Do these two items have the same source?
virtual bool idaapi get_hint(qstring *hint, const eval_ctx_t *ctx, int *nlines) const =0
Calculate a string to display as a hint.
virtual source_file_iterator idaapi get_source_files()=0
Get source files of the item.
bool is_stmt(const eval_ctx_t *ctx) const
Does this source item represent a statement?
Definition dbg.hpp:2360
virtual void idaapi release() override=0
Call this function to free source_item_t.
virtual int idaapi get_lnnum() const =0
Get line number of the item (1-based)
virtual int idaapi get_end_colnum() const =0
Get ending column number.
virtual bool idaapi get_name(qstring *buf) const =0
Get name of the item.
bool is_func(const eval_ctx_t *ctx) const
Does this source item represent a function?
Definition dbg.hpp:2364
virtual bool idaapi get_location(argloc_t *, const eval_ctx_t *) const newapi
Get the location for this source item.
Definition dbg.hpp:2377
virtual int idaapi get_colnum() const =0
Get column number of the item.
virtual bool idaapi get_expr_tinfo(tinfo_t *tif) const =0
Get expression type.
bool is_expr(const eval_ctx_t *ctx) const
Does this source item represent an expression?
Definition dbg.hpp:2366
bool is_sttvar(const eval_ctx_t *ctx) const
Does this source item represent a static variable or code?
Definition dbg.hpp:2370
bool is_module(const eval_ctx_t *ctx) const
Does this source item represent a module?
Definition dbg.hpp:2362
virtual source_item_ptr idaapi get_parent(src_item_kind_t max_kind) const =0
Get parent of the item.
bool is_locvar(const eval_ctx_t *ctx) const
Does this source item represent a stack, register, or register-relative local variable or parameter?
Definition dbg.hpp:2368
virtual source_item_iterator idaapi create_children_iterator()=0
Create an iterator to enumerate all children of the item.
virtual bool idaapi evaluate(const eval_ctx_t *ctx, idc_value_t *res, qstring *errbuf) const =0
Evaluate item value (meaningful only for expression items).
virtual bool idaapi get_item_bounds(rangeset_t *set) const =0
Get item boundaries as a set of ranges.
virtual src_item_kind_t idaapi get_item_kind(const eval_ctx_t *) const newapi
Get item kind.
Definition dbg.hpp:2358
virtual ea_t idaapi get_ea() const =0
Get starting address of the item.
virtual asize_t idaapi get_size() const =0
Get size of the item in bytes.
virtual int idaapi get_end_lnnum() const =0
Get ending line number (1-based.) The returned line number is the next line after the expression.
virtual srcinfo_provider_t *idaapi get_provider(void) const =0
Get source info provider.
Describes the mechanism used to retrieve source file information.
Definition dbg.hpp:2389
virtual const char *idaapi set_options(const char *keyword, int value_type, const void *value)=0
Configure srcinfo provider.
virtual source_item_ptr idaapi find_static_item(const char *name, ea_t ea)=0
Locate a global variable by its name.
int flags
Source info provider property bits
Definition dbg.hpp:2395
size_t cb
size of this class
Definition dbg.hpp:2392
virtual bool idaapi enable_provider(bool enable)=0
Enable or disable the provider.
virtual source_item_iterator idaapi find_source_items(source_file_t *sf, int lnnum, int colnum=0)=0
Locate source item by a position in a source file.
const char * name
internal (unique) name of srcinfo provider
Definition dbg.hpp:2409
virtual int idaapi get_change_flags(void)=0
Ask the provider if the source information has changed and the screen should be refreshed.
virtual source_item_iterator idaapi create_item_iterator(const source_file_t *sf)=0
Create iterators to enumerate items.
bool is_active(void) const
Is the provider willing to work with the current idb?
Definition dbg.hpp:2425
const char * display_name
external (displayable) name of srcinfo provider
Definition dbg.hpp:2412
bool is_decompiler(void) const
Is the source info provider a decompiler?
Definition dbg.hpp:2421
bool is_enabled(void) const
Has the provider been enabled by the user?
Definition dbg.hpp:2423
virtual void idaapi del_module(ea_t base)=0
Inform the provider that a module got unloaded.
srcinfo_provider_t(const char *_name, const char *_display_name, int _flags=0)
Definition dbg.hpp:2414
virtual void idaapi add_module(const char *path, ea_t base, asize_t size)=0
Inform the provider that a module got loaded.
virtual source_file_iterator idaapi create_file_iterator(const char *filename=nullptr)=0
Create iterators to enumerate files.
virtual void idaapi get_ready(void)=0
Inform the provider that we will request for information now.
virtual bool idaapi apply_module_info(const char *)
Apply the debug information (types, functions, globals) from the module whose path is 'path',...
Definition dbg.hpp:2503
virtual source_item_iterator idaapi find_source_items(ea_t ea, asize_t size, src_item_kind_t level, bool may_decompile)=0
Locate source item by address.
uint8 get_version() const
See SPF_VERSION_MASK.
Definition dbg.hpp:2428
Primary mechanism for managing type information.
Definition typeinf.hpp:3046
idaman debugger_t ida_export_data * dbg
This structure contains information about the current debugger.
Definition dbg.hpp:33
bool idaapi get_global_var(srcinfo_provider_t *prov, ea_t ea, const char *name, source_item_ptr *out)
Definition dbg.hpp:2746
bool idaapi load_debugger(const char *dbgname, bool use_remote)
Definition dbg.hpp:2744
bool idaapi get_current_source_file(qstring *out)
Definition dbg.hpp:2749
int idaapi get_current_source_line(void)
Definition dbg.hpp:2750
bool idaapi srcdbg_step_into(void)
Definition dbg.hpp:2752
const char *idaapi get_debugger_event_cond(void)
Definition dbg.hpp:2757
void idaapi set_debugger_event_cond(const char *NONNULL evcond)
Definition dbg.hpp:2756
bool idaapi srcdbg_step_until_ret(void)
Definition dbg.hpp:2754
idaman void ida_export unlock_dbgmem_config(void)
void idaapi add_path_mapping(const char *src, const char *dst)
Definition dbg.hpp:2751
bool idaapi get_module_info(ea_t ea, modinfo_t *modinfo)
Definition dbg.hpp:2731
bool idaapi get_local_var(srcinfo_provider_t *prov, ea_t ea, const char *name, source_item_ptr *out)
Definition dbg.hpp:2747
bool idaapi srcdbg_step_over(void)
Definition dbg.hpp:2753
ssize_t idaapi write_dbg_memory(ea_t ea, const void *buffer, size_t size)
Definition dbg.hpp:2755
ssize_t idaapi read_dbg_memory(ea_t ea, void *buffer, size_t size)
Definition dbg.hpp:2730
int idaapi internal_cleanup_appcall(thid_t tid)
Definition dbg.hpp:2728
dbg_notification_t
Debugger notification codes.
Definition dbg.hpp:93
@ dbg_bpt
A user defined breakpoint was reached.
Definition dbg.hpp:138
@ dbg_started_loading_bpts
Started loading breakpoint info from idb.
Definition dbg.hpp:175
@ dbg_last
The last debugger notification code.
Definition dbg.hpp:178
@ dbg_run_to
Definition dbg.hpp:167
@ dbg_thread_start
Definition dbg.hpp:114
@ dbg_step_into
Definition dbg.hpp:163
@ dbg_step_until_ret
Definition dbg.hpp:169
@ dbg_information
Definition dbg.hpp:122
@ dbg_process_exit
Definition dbg.hpp:102
@ dbg_finished_loading_bpts
Finished loading breakpoint info from idb.
Definition dbg.hpp:176
@ dbg_process_detach
Definition dbg.hpp:110
@ dbg_null
Definition dbg.hpp:94
@ dbg_suspend_process
The process is now suspended.
Definition dbg.hpp:133
@ dbg_process_start
Definition dbg.hpp:98
@ dbg_thread_exit
Definition dbg.hpp:116
@ dbg_exception
Definition dbg.hpp:124
@ dbg_trace
A step occurred (one instruction was executed).
Definition dbg.hpp:147
@ dbg_library_unload
Definition dbg.hpp:120
@ dbg_bpt_changed
Breakpoint has been changed.
Definition dbg.hpp:171
@ dbg_step_over
Definition dbg.hpp:165
@ dbg_request_error
An error occurred during the processing of a request.
Definition dbg.hpp:155
@ dbg_process_attach
Definition dbg.hpp:106
@ dbg_library_load
Definition dbg.hpp:118
int idaapi hide_all_bpts(void)
Definition dbg.hpp:2729
idaman void ida_export lock_dbgmem_config(void)
bool idaapi dbg_can_query(void)
Definition dbg.hpp:2740
srcinfo_provider_t *idaapi get_srcinfo_provider(const char *name)
Definition dbg.hpp:2748
bool idaapi collect_stack_trace(thid_t tid, call_stack_t *trace)
Definition dbg.hpp:2745
drc_t idaapi dbg_bin_search(ea_t *out, ea_t start_ea, ea_t end_ea, const compiled_binpat_vec_t &data, int srch_flags, qstring *errbuf)
Definition dbg.hpp:2732
const bpttype_t BPT_SOFT
Software breakpoint.
Definition idd.hpp:524
const bpttype_t BPT_DEFAULT
Choose bpt type automatically.
Definition idd.hpp:526
bool idaapi request_del_bpt(ea_t ea)
Post a del_bpt(ea_t) request.
Definition dbg.hpp:1158
int idaapi check_bpt(ea_t ea)
Check the breakpoint at the specified address.
Definition dbg.hpp:1242
bool idaapi add_bpt(ea_t ea, asize_t size=0, bpttype_t type=BPT_DEFAULT)
Add a new breakpoint in the debugged process.
Definition dbg.hpp:1128
int idaapi change_bptlocs(const movbpt_infos_t &movinfo, movbpt_codes_t *codes=nullptr, bool del_hindering_bpts=true)
Move breakpoint(s) from one location to another.
Definition dbg.hpp:1213
qvector< const bpt_t * > bpt_constptr_vec_t
Definition dbg.hpp:850
bool idaapi del_bpt(ea_t ea)
Delete an existing breakpoint in the debugged process.
Definition dbg.hpp:1154
const char *idaapi get_bptloc_string(int i)
Definition dbg.hpp:2645
qvector< movbpt_code_t > movbpt_codes_t
Definition dbg.hpp:861
bool exist_bpt(ea_t ea)
Does a breakpoint exist at the given location?
Definition dbg.hpp:1107
bool idaapi enable_bpt(ea_t ea, bool enable=true)
Definition dbg.hpp:1228
qvector< bpt_t * > bptptr_vec_t
Definition dbg.hpp:851
qvector< bptaddrs_t > bpteas_t
Definition dbg.hpp:869
bool disable_bpt(ea_t ea)
Definition dbg.hpp:1230
bool idaapi get_bpt(ea_t ea, bpt_t *bpt)
Get the characteristics of a breakpoint.
Definition dbg.hpp:1102
qvector< movbpt_info_t > movbpt_infos_t
Definition dbg.hpp:849
qvector< bpt_t > bpt_vec_t
vector of breakpoints
Definition dbg.hpp:852
bool request_disable_bpt(ea_t ea)
Definition dbg.hpp:1234
int idaapi set_bptloc_string(const char *s)
Definition dbg.hpp:2644
int idaapi get_bpt_qty(void)
Get number of breakpoints.
Definition dbg.hpp:1082
bool idaapi getn_bpt(int n, bpt_t *bpt)
Get the characteristics of a breakpoint.
Definition dbg.hpp:1092
DECLARE_TYPE_AS_MOVABLE(bpt_location_t)
bool idaapi update_bpt(const bpt_t *bpt)
Update modifiable characteristics of an existing breakpoint.
Definition dbg.hpp:1195
bool idaapi find_bpt(const bpt_location_t &bptloc, bpt_t *bpt)
Find a breakpoint by location.
Definition dbg.hpp:1204
bool idaapi request_add_bpt(ea_t ea, asize_t size=0, bpttype_t type=BPT_DEFAULT)
Post an add_bpt(ea_t, asize_t, bpttype_t) request.
Definition dbg.hpp:1132
movbpt_code_t
Definition dbg.hpp:855
bpt_loctype_t
Breakpoint location types.
Definition dbg.hpp:875
bool idaapi request_enable_bpt(ea_t ea, bool enable=true)
Definition dbg.hpp:1232
@ MOVBPT_DEST_BUSY
destination location is busy (we already have such a bpt)
Definition dbg.hpp:858
@ MOVBPT_BAD_TYPE
BPLT_ABS is not supported.
Definition dbg.hpp:859
@ MOVBPT_NOT_FOUND
source bpt not found
Definition dbg.hpp:857
@ MOVBPT_OK
moved ok
Definition dbg.hpp:856
@ BPLT_REL
relative address: module_path, offset
Definition dbg.hpp:877
@ BPLT_ABS
absolute address: ea
Definition dbg.hpp:876
@ BPLT_SRC
source level: filename, lineno
Definition dbg.hpp:879
@ BPLT_SYM
symbolic: symbol_name, offset
Definition dbg.hpp:878
int idaapi invalidate_dbg_state(int dbginv)
Invalidate cached debugger information.
Definition dbg.hpp:351
bool idaapi request_exit_process(void)
Post an exit_process() request.
Definition dbg.hpp:457
bool idaapi request_suspend_process(void)
Post a suspend_process() request.
Definition dbg.hpp:411
bool idaapi request_detach_process(void)
Post a detach_process() request.
Definition dbg.hpp:499
bool idaapi exit_process(void)
Terminate the debugging of the current process.
Definition dbg.hpp:453
bool idaapi is_valid_dstate(int state)
Definition dbg.hpp:307
bool idaapi request_continue_process(void)
Post a continue_process() request.
Definition dbg.hpp:429
int idaapi request_attach_process(pid_t pid, int event_id)
Post an attach_process() request.
Definition dbg.hpp:488
int idaapi get_process_state(void)
Return the state of the currently debugged process.
Definition dbg.hpp:296
int idaapi set_process_state(int newstate, thid_t *p_thid, int dbginv)
Set new state for the debugged process.
Definition dbg.hpp:342
int idaapi attach_process(pid_t pid=NO_PROCESS, int event_id=-1)
Attach the debugger to a running process.
Definition dbg.hpp:484
bool idaapi continue_process(void)
Continue the execution of the process in the debugger.
Definition dbg.hpp:424
bool idaapi detach_process(void)
Detach the debugger from the debugged process.
Definition dbg.hpp:495
int idaapi request_start_process(const char *path=nullptr, const char *args=nullptr, const char *sdir=nullptr)
Post a start_process() request.
Definition dbg.hpp:382
int idaapi start_process(const char *path=nullptr, const char *args=nullptr, const char *sdir=nullptr)
Start a process in the debugger.
Definition dbg.hpp:371
bool idaapi continue_backwards(void)
Continue the execution of the process in the debugger backwards.
Definition dbg.hpp:442
ssize_t idaapi get_processes(procinfo_vec_t *proclist)
Take a snapshot of running processes and return their description.
Definition dbg.hpp:466
bool idaapi is_debugger_busy(void)
Is the debugger busy?
Definition dbg.hpp:508
bool idaapi request_continue_backwards(void)
Post a continue_backwards() request.
Definition dbg.hpp:447
bool idaapi suspend_process(void)
Suspend the process in the debugger.
Definition dbg.hpp:407
void idaapi bring_debugger_to_front(void)
Definition dbg.hpp:2636
int idaapi enable_bptgrp(const char *bptgrp_name, bool enable=true)
Enable (or disable) all bpts in a folder.
Definition dbg.hpp:2719
bool idaapi srcdbg_request_step_until_ret(void)
Definition dbg.hpp:2723
int idaapi get_reg_vals(thid_t tid, int clsmask, regval_t *values)
Definition dbg.hpp:2648
ea_t idaapi get_tev_ea(int n)
Definition dbg.hpp:2633
bool idaapi get_bpt_group(qstring *grp_name, const bpt_location_t &bptloc)
Retrieve the absolute path to the folder of the bpt based on the bpt_location find_bpt is called to r...
Definition dbg.hpp:2679
int idaapi internal_ioctl(int fn, const void *buf, size_t size, void **poutbuf, ssize_t *poutsize)
Definition dbg.hpp:2647
int idaapi get_dbg_memory_info(meminfo_vec_t *ranges)
Definition dbg.hpp:2650
bool idaapi add_virt_module(const modinfo_t *mod)
Definition dbg.hpp:2642
bool idaapi del_bptgrp(const char *name)
Delete a folder, bpt that were part of this folder are moved to the root folder.
Definition dbg.hpp:2701
void idaapi get_manual_regions(meminfo_vec_t *ranges)
Definition dbg.hpp:2637
void idaapi enable_manual_regions(bool enable)
Definition dbg.hpp:2640
int idaapi get_tev_type(int n)
Definition dbg.hpp:2634
bool idaapi set_bpt_group(bpt_t &bpt, const char *grp_name)
Move a bpt into a folder in the breakpoint dirtree if the folder didn't exists, it will be created.
Definition dbg.hpp:2659
void idaapi edit_manual_regions()
Definition dbg.hpp:2639
ssize_t idaapi get_grp_bpts(bpt_vec_t *bpts, const char *grp_name)
Retrieve a copy the bpts stored in a folder.
Definition dbg.hpp:2709
bool idaapi get_local_vars(srcinfo_provider_t *prov, ea_t ea, source_items_t *out)
Definition dbg.hpp:2720
bool idaapi del_virt_module(const ea_t base)
Definition dbg.hpp:2643
bool idaapi srcdbg_request_step_over(void)
Definition dbg.hpp:2722
int idaapi handle_debug_event(const debug_event_t *ev, int rqflags)
Definition dbg.hpp:2641
int idaapi get_tev_tid(int n)
Definition dbg.hpp:2635
size_t idaapi list_bptgrps(qstrvec_t *bptgrps)
Retrieve the list of absolute path of all folders of bpt dirtree.
Definition dbg.hpp:2686
bool idaapi set_bptloc_group(const bpt_location_t &bptloc, const char *grp_name)
Move a bpt into a folder in the breakpoint dirtree based on the bpt_location find_bpt is called to re...
Definition dbg.hpp:2669
int idaapi internal_get_sreg_base(ea_t *answer, thid_t tid, int sreg_value)
Definition dbg.hpp:2646
bool idaapi rename_bptgrp(const char *old_name, const char *new_name)
Rename a folder of bpt dirtree.
Definition dbg.hpp:2694
void idaapi set_manual_regions(const meminfo_vec_t *ranges)
Definition dbg.hpp:2638
bool idaapi srcdbg_request_step_into(void)
Definition dbg.hpp:2721
bool idaapi run_to(ea_t ea, pid_t pid=NO_PROCESS, thid_t tid=NO_THREAD)
Execute the process until the given address is reached.
Definition dbg.hpp:702
bool idaapi request_step_over(void)
Post a step_over() request.
Definition dbg.hpp:662
bool idaapi step_into(void)
Execute one instruction in the current thread.
Definition dbg.hpp:645
bool idaapi request_run_to(ea_t ea, pid_t pid=NO_PROCESS, thid_t tid=NO_THREAD)
Post a run_to() request.
Definition dbg.hpp:706
bool idaapi request_step_into(void)
Post a step_into() request.
Definition dbg.hpp:649
bool idaapi step_until_ret(void)
Execute instructions in the current thread until a function return instruction is executed (aka "step...
Definition dbg.hpp:732
bool idaapi set_resume_mode(thid_t tid, resume_mode_t mode)
How to resume the application.
Definition dbg.hpp:742
bool idaapi request_set_resume_mode(thid_t tid, resume_mode_t mode)
Post a set_resume_mode() request.
Definition dbg.hpp:746
bool idaapi request_step_into_backwards(void)
Post a step_into_backwards() request.
Definition dbg.hpp:674
bool idaapi request_step_until_ret(void)
Post a step_until_ret() request.
Definition dbg.hpp:736
bool idaapi request_run_to_backwards(ea_t ea, pid_t pid=NO_PROCESS, thid_t tid=NO_THREAD)
Post a run_to_backwards() request.
Definition dbg.hpp:723
bool idaapi step_into_backwards(void)
Execute one instruction backwards in the current thread.
Definition dbg.hpp:670
bool idaapi run_to_backwards(ea_t ea, pid_t pid=NO_PROCESS, thid_t tid=NO_THREAD)
Execute the process backwards until the given address is reached.
Definition dbg.hpp:719
bool idaapi step_over_backwards(void)
Execute one instruction backwards in the current thread, but without entering into functions.
Definition dbg.hpp:683
bool idaapi step_over(void)
Execute one instruction in the current thread, but without entering into functions.
Definition dbg.hpp:658
bool idaapi request_step_over_backwards(void)
Post a step_over_backwards() request.
Definition dbg.hpp:687
dbg_event_code_t idaapi wait_for_next_event(int wfne, int timeout)
Wait for the next event.
Definition dbg.hpp:1997
uint idaapi set_debugger_options(uint options)
Set debugger options.
Definition dbg.hpp:2009
dbg_event_code_t
Wait for the next debugger event.
Definition dbg.hpp:1941
THREAD_SAFE bool have_set_options(const debugger_t *_dbg)
Is set_dbg_options() implemented in debugger_t?
Definition dbg.hpp:2085
void idaapi set_remote_debugger(const char *host, const char *pass, int port=-1)
Set remote debugging options.
Definition dbg.hpp:2019
void idaapi get_process_options(qstring *path, qstring *args, launch_env_t *out_envs, qstring *sdir, qstring *host, qstring *pass, int *port)
Get process options.
Definition dbg.hpp:2025
const debug_event_t *idaapi get_debug_event(void)
Get the current debugger event.
Definition dbg.hpp:2002
const char *idaapi set_int_dbg_options(debugger_t *_dbg, const char *keyword, int32 value)
Definition dbg.hpp:2116
excvec_t *idaapi retrieve_exceptions(void)
Retrieve the exception information.
Definition dbg.hpp:2059
bool idaapi store_exceptions(void)
Update the exception information stored in the debugger module by invoking its dbg->set_exception_inf...
Definition dbg.hpp:2065
const char *idaapi set_dbg_default_options(debugger_t *_dbg, const char *keyword, int value_type, const void *value)
Definition dbg.hpp:2107
void idaapi set_process_options(const char *path, const char *args, const launch_env_t *envs, const char *sdir, const char *host, const char *pass, int port)
Set process options.
Definition dbg.hpp:2041
const char *idaapi define_exception(uint code, const char *name, const char *desc, int flags)
Convenience function: define new exception code.
Definition dbg.hpp:2076
const char *idaapi set_dbg_options(debugger_t *_dbg, const char *keyword, int pri, int value_type, const void *value)
Convenience function to set debugger specific options.
Definition dbg.hpp:2093
@ DEC_NOTASK
process does not exist
Definition dbg.hpp:1942
@ DEC_TIMEOUT
timeout
Definition dbg.hpp:1944
@ DEC_ERROR
error
Definition dbg.hpp:1943
idaman bool ida_export is_debugger_on(void)
Is the debugger currently running?
idaman void ida_export set_dbgmem_source(range_t *(idaapi *dbg_get_memory_config)(int *n), int(idaapi *memory_read)(ea_t ea, void *buffer, int size), int(idaapi *memory_write)(ea_t ea, const void *buffer, int size))
Set the memory information source for IDA kernel.
idaman bool ida_export is_debugger_memory(ea_t ea)
Is the address mapped to debugger memory?
idaman void ida_export invalidate_dbgmem_config(void)
Invalidate the debugged process memory configuration.
idaman void ida_export invalidate_dbgmem_contents(ea_t ea, asize_t size)
Invalidate the debugged process memory contents.
bool idaapi get_first_module(modinfo_t *modinfo)
Definition dbg.hpp:622
bool idaapi get_next_module(modinfo_t *modinfo)
Definition dbg.hpp:625
bool idaapi get_sp_val(ea_t *out)
Get value of the SP register for the current thread.
Definition dbg.hpp:789
bool idaapi is_reg_custom(const char *regname)
Does a register contain a value of a custom data type?
Definition dbg.hpp:828
bool idaapi request_set_reg_val(const char *regname, const regval_t *regval)
Post a set_reg_val() request.
Definition dbg.hpp:807
bool idaapi get_ip_val(ea_t *out)
Get value of the IP (program counter) register for the current thread.
Definition dbg.hpp:793
bool idaapi is_reg_float(const char *regname)
Does a register contain a floating point value?
Definition dbg.hpp:821
bool idaapi get_reg_val(const char *regname, regval_t *regval)
Read a register value from the current thread.
Definition dbg.hpp:780
bool idaapi get_dbg_reg_info(const char *regname, register_info_t *ri)
Get register information.
Definition dbg.hpp:774
bool idaapi set_reg_val(const char *regname, const regval_t *regval)
Write a register value to the current thread.
Definition dbg.hpp:799
bool idaapi is_reg_integer(const char *regname)
Does a register contain an integer value?
Definition dbg.hpp:814
source_view_t * create_source_viewer(TWidget **out_ccv, TWidget *parent, TWidget *custview, source_file_ptr sf, strvec_t *lines, int lnnum, int colnum, int flags)
Create a source code view.
Definition dbg.hpp:2533
qiterator< source_item_ptr > _source_item_iterator
Iterator for source items.
Definition dbg.hpp:2187
bool idaapi unregister_srcinfo_provider(srcinfo_provider_t *sp)
Unregister a source information provider.
Definition dbg.hpp:2525
qrefcnt_t< _source_file_iterator > source_file_iterator
Maintain a reference count for source file iterators.
Definition dbg.hpp:2246
qrefcnt_t< source_item_t > source_item_ptr
Maintain a reference count for source items.
Definition dbg.hpp:2185
bool idaapi register_srcinfo_provider(srcinfo_provider_t *sp)
Register a source information provider.
Definition dbg.hpp:2519
qiterator< source_file_ptr > _source_file_iterator
Iterator for source files.
Definition dbg.hpp:2244
qrefcnt_t< source_file_t > source_file_ptr
Maintain a reference count for source file objects.
Definition dbg.hpp:2242
idaman bool ida_export put_dbg_byte(ea_t ea, uint32 x)
Change one byte of the debugged process memory.
idaman bool ida_export get_dbg_byte(uint32 *out, ea_t ea)
Get one byte of the debugged process memory.
qvector< source_item_ptr > source_items_t
Vector of source items.
Definition dbg.hpp:2191
src_item_kind_t
Kinds of source items.
Definition dbg.hpp:2255
qrefcnt_t< _source_item_iterator > source_item_iterator
Maintain a reference count for source item iterators.
Definition dbg.hpp:2189
@ SRCIT_MODULE
module
Definition dbg.hpp:2257
@ SRCIT_STTVAR
static variable/code
Definition dbg.hpp:2261
@ SRCIT_EXPR
an expression (a+b*c)
Definition dbg.hpp:2260
@ SRCIT_FUNC
function
Definition dbg.hpp:2258
@ SRCIT_STMT
a statement (if/while/for...)
Definition dbg.hpp:2259
@ SRCIT_LOCVAR
a stack, register, or register-relative local variable or parameter
Definition dbg.hpp:2262
@ SRCIT_NONE
unknown
Definition dbg.hpp:2256
bool idaapi is_step_trace_enabled(void)
Get current state of step tracing.
Definition dbg.hpp:1355
bool disable_step_trace(void)
Definition dbg.hpp:1371
bool idaapi enable_step_trace(int enable=1)
Definition dbg.hpp:1370
bool idaapi request_enable_step_trace(int enable=1)
Definition dbg.hpp:1372
int idaapi get_step_trace_options(void)
Get current step tracing options.
Definition dbg.hpp:1406
void idaapi request_set_step_trace_options(int options)
Post a set_step_trace_options() request.
Definition dbg.hpp:1416
bool request_disable_step_trace(void)
Definition dbg.hpp:1373
void idaapi set_step_trace_options(int options)
Modify step tracing options.
Definition dbg.hpp:1412
int idaapi resume_thread(thid_t tid)
Resume thread.
Definition dbg.hpp:595
bool idaapi request_select_thread(thid_t tid)
Post a select_thread() request.
Definition dbg.hpp:567
bool idaapi select_thread(thid_t tid)
Select the given thread as the current debugged thread.
Definition dbg.hpp:563
const char *idaapi getn_thread_name(int n)
Get the NAME of a thread.
Definition dbg.hpp:552
int idaapi request_suspend_thread(thid_t tid)
Post a suspend_thread() request.
Definition dbg.hpp:584
int idaapi suspend_thread(thid_t tid)
Suspend thread.
Definition dbg.hpp:580
int idaapi request_resume_thread(thid_t tid)
Post a resume_thread() request.
Definition dbg.hpp:599
thid_t idaapi getn_thread(int n)
Get the ID of a thread.
Definition dbg.hpp:535
thid_t idaapi get_current_thread(void)
Get current thread ID.
Definition dbg.hpp:542
int idaapi get_thread_qty(void)
Get number of threads.
Definition dbg.hpp:526
bool request_disable_bblk_trace(void)
Definition dbg.hpp:1539
bool idaapi enable_bblk_trace(bool enable=true)
Definition dbg.hpp:1536
void idaapi set_bblk_trace_options(int options)
Modify basic block tracing options (see BT_LOG_INSTS)
Definition dbg.hpp:1553
int idaapi get_bblk_trace_options(void)
Get current basic block tracing options.
Definition dbg.hpp:1548
bool idaapi is_bblk_trace_enabled(void)
Definition dbg.hpp:1540
bool disable_bblk_trace(void)
Definition dbg.hpp:1537
bool idaapi request_enable_bblk_trace(bool enable=true)
Definition dbg.hpp:1538
void idaapi request_set_bblk_trace_options(int options)
Post a set_bblk_trace_options() request.
Definition dbg.hpp:1557
void idaapi request_clear_trace(void)
Post a clear_trace() request.
Definition dbg.hpp:1333
bool idaapi set_trace_size(int size)
Specify the new size of the circular buffer.
Definition dbg.hpp:1322
void idaapi clear_trace(void)
Clear all events in the trace buffer.
Definition dbg.hpp:1329
bool idaapi get_insn_tev_reg_result(int n, const char *regname, regval_t *regval)
Read the resulting register value from an instruction trace event.
Definition dbg.hpp:1661
qvector< tev_info_reg_t > tevinforeg_vec_t
vector of trace elements
Definition dbg.hpp:1783
bool idaapi get_insn_tev_reg_mem(int n, memreg_infos_t *memmap)
Read the memory pointed by register values from an instruction trace event.
Definition dbg.hpp:1649
int idaapi get_tev_qty(void)
Get number of trace events available in trace buffer.
Definition dbg.hpp:1611
qvector< tev_info_t > tevinfo_vec_t
vector of trace event info objects
Definition dbg.hpp:1592
void idaapi dbg_add_thread(thid_t tid)
Add a thread to the current trace.
Definition dbg.hpp:1744
bool idaapi get_tev_event(int n, debug_event_t *d)
Get the corresponding debug event, if any, for the specified tev object.
Definition dbg.hpp:1722
qvector< memreg_info_t > memreg_infos_t
Definition dbg.hpp:1602
void idaapi set_trace_base_address(ea_t ea)
Set the base address of the current trace.
Definition dbg.hpp:1737
qvector< debug_event_t > dbgevt_vec_t
vector of debug events
Definition dbg.hpp:1583
bool idaapi dbg_add_bpt_tev(thid_t tid, ea_t ea, ea_t bp)
Add a new breakpoint trace element to the current trace.
Definition dbg.hpp:1817
tev_type_t
Trace event types.
Definition dbg.hpp:1572
void idaapi dbg_add_tev(tev_type_t type, thid_t tid, ea_t address)
Add a new trace element to the current trace.
Definition dbg.hpp:1758
bool idaapi get_insn_tev_reg_val(int n, const char *regname, regval_t *regval)
Read a register value from an instruction trace event.
Definition dbg.hpp:1636
ea_t idaapi get_trace_base_address(void)
Get the base address of the current trace.
Definition dbg.hpp:1730
void idaapi dbg_add_debug_event(debug_event_t *event)
Add a new debug event to the current trace.
Definition dbg.hpp:1838
void idaapi dbg_del_thread(thid_t tid)
Delete a thread from the current trace.
Definition dbg.hpp:1751
save_reg_values_t
Se dbg_add_insn_tev()
Definition dbg.hpp:1788
ea_t idaapi get_bpt_tev_ea(int n)
Get the address associated to a read, read/write or execution trace event.
Definition dbg.hpp:1698
bool idaapi dbg_add_many_tevs(tevinforeg_vec_t *new_tevs)
Add many new trace elements to the current trace.
Definition dbg.hpp:1801
ea_t idaapi get_ret_tev_return(int n)
Get the return address from a function return trace event.
Definition dbg.hpp:1683
qvector< tev_reg_value_t > tev_reg_values_t
vector of trace event reg values
Definition dbg.hpp:1774
bool idaapi get_tev_info(int n, tev_info_t *tev_info)
Get main information about a trace event.
Definition dbg.hpp:1622
bool idaapi dbg_add_insn_tev(thid_t tid, ea_t ea, save_reg_values_t save=SAVE_DIFF)
Add a new instruction trace element to the current trace.
Definition dbg.hpp:1809
void idaapi dbg_add_call_tev(thid_t tid, ea_t caller, ea_t callee)
Add a new call trace element to the current trace.
Definition dbg.hpp:1824
bool idaapi get_tev_memory_info(int n, meminfo_vec_t *mi)
Get the memory layout, if any, for the specified tev object.
Definition dbg.hpp:1710
void idaapi dbg_add_ret_tev(thid_t tid, ea_t ret_insn, ea_t return_to)
Add a new return trace element to the current trace.
Definition dbg.hpp:1831
ea_t idaapi get_call_tev_callee(int n)
Get the called function from a function call trace event.
Definition dbg.hpp:1673
@ tev_max
first unused event type
Definition dbg.hpp:1580
@ tev_insn
an instruction trace
Definition dbg.hpp:1574
@ tev_bpt
write, read/write, execution trace
Definition dbg.hpp:1577
@ tev_none
no event
Definition dbg.hpp:1573
@ tev_call
a function call trace
Definition dbg.hpp:1575
@ tev_mem
memory layout changed
Definition dbg.hpp:1578
@ tev_event
debug event occurred
Definition dbg.hpp:1579
@ tev_ret
a function return trace
Definition dbg.hpp:1576
@ SAVE_DIFF
Definition dbg.hpp:1790
@ SAVE_NONE
Definition dbg.hpp:1791
@ SAVE_ALL_VALUES
Definition dbg.hpp:1789
bool disable_func_trace(void)
Definition dbg.hpp:1493
void idaapi request_set_func_trace_options(int options)
Post a set_func_trace_options() request.
Definition dbg.hpp:1515
int idaapi get_func_trace_options(void)
Get current function tracing options.
Definition dbg.hpp:1504
void idaapi set_func_trace_options(int options)
Modify function tracing options.
Definition dbg.hpp:1511
bool request_disable_func_trace(void)
Definition dbg.hpp:1495
bool idaapi request_enable_func_trace(bool enable=true)
Definition dbg.hpp:1494
bool idaapi enable_func_trace(bool enable=true)
Definition dbg.hpp:1492
bool idaapi is_func_trace_enabled(void)
Get current state of functions tracing.
Definition dbg.hpp:1485
int idaapi get_insn_trace_options(void)
Get current instruction tracing options.
Definition dbg.hpp:1455
bool disable_insn_trace(void)
Definition dbg.hpp:1444
bool idaapi is_insn_trace_enabled(void)
Get current state of instruction tracing.
Definition dbg.hpp:1437
void idaapi set_insn_trace_options(int options)
Modify instruction tracing options.
Definition dbg.hpp:1462
bool request_disable_insn_trace(void)
Definition dbg.hpp:1446
bool idaapi enable_insn_trace(bool enable=true)
Definition dbg.hpp:1443
bool idaapi request_enable_insn_trace(bool enable=true)
Definition dbg.hpp:1445
void idaapi request_set_insn_trace_options(int options)
Post a set_insn_trace_options() request.
Definition dbg.hpp:1466
void idaapi set_trace_dynamic_register_set(dynamic_register_set_t &idaregs)
Set dynamic register set of current trace.
Definition dbg.hpp:1915
const char *idaapi get_trace_platform()
Get platform name of current trace.
Definition dbg.hpp:1910
bool idaapi is_valid_trace_file(const char *filename)
Is the specified file a valid trace file for the current database?
Definition dbg.hpp:1864
bool idaapi get_trace_file_desc(qstring *buf, const char *filename)
Get the file header of the specified trace file.
Definition dbg.hpp:1874
bool idaapi choose_trace_file(qstring *buf)
Show the choose trace dialog.
Definition dbg.hpp:1879
void idaapi set_trace_platform(const char *platform)
Set platform name of current trace.
Definition dbg.hpp:1905
void idaapi get_trace_dynamic_register_set(dynamic_register_set_t *idaregs)
Get dynamic register set of current trace.
Definition dbg.hpp:1920
void idaapi set_highlight_trace_options(bool hilight, bgcolor_t color, bgcolor_t diff)
Set highlight trace parameters.
Definition dbg.hpp:1894
bool idaapi save_trace_file(const char *filename, const char *description)
Save the current trace in the specified file.
Definition dbg.hpp:1859
bool idaapi graph_trace(void)
Show the trace callgraph.
Definition dbg.hpp:1889
bool idaapi diff_trace_file(const char *NONNULL filename)
Show difference between the current trace and the one from 'filename'.
Definition dbg.hpp:1884
bool idaapi load_trace_file(qstring *buf, const char *filename)
Load a recorded trace file in the 'Tracing' window.
Definition dbg.hpp:1854
bool idaapi set_trace_file_desc(const char *filename, const char *description)
Change the description of the specified trace file.
Definition dbg.hpp:1869
bool is_request_running(void)
Is a request currently running?
Definition dbg.hpp:263
dbg_notification_t idaapi get_running_notification(void)
Get the notification associated (if any) with the current running request.
Definition dbg.hpp:271
void idaapi clear_requests_queue(void)
Clear the queue of waiting requests.
Definition dbg.hpp:279
bool idaapi run_requests(void)
Execute requests until all requests are processed or an asynchronous function is called.
Definition dbg.hpp:250
ui_notification_t idaapi get_running_request(void)
Get the current running request.
Definition dbg.hpp:258
int code
Definition fpro.h:88
idaman size_t n
Definition pro.h:997
const tinfo_t & type
Definition hexrays.hpp:7301
carglist_t * args
Definition hexrays.hpp:7323
Contains definition of the interface to IDD modules.
qvector< exception_info_t > excvec_t
vector of exception info objects
Definition idd.hpp:557
drc_t
Debugger return codes.
Definition idd.hpp:926
resume_mode_t
How to resume the application.
Definition idd.hpp:901
int pid_t
process id
Definition idd.hpp:34
int thid_t
thread id
Definition idd.hpp:35
int bpttype_t
hardware breakpoint type (see Hardware breakpoint ids)
Definition idd.hpp:515
qvector< process_info_t > procinfo_vec_t
Definition idd.hpp:52
Contains definition of the interface to IDP modules.
Defines the interface between the kernel and the UI.
char * answer
Definition kernwin.hpp:8023
uval_t uval_t
Definition kernwin.hpp:1878
callui(ui_mbox, mbox_replace, format, va)
ui_notification_t
Events marked as 'ui:' should be used as a parameter to callui().
Definition kernwin.hpp:365
@ ui_dbg_get_trace_file_desc
Definition kernwin.hpp:1217
@ ui_dbg_request_add_bpt
Definition kernwin.hpp:1229
@ ui_dbg_request_enable_bpt
Definition kernwin.hpp:1200
@ ui_dbg_get_reg_val
Definition kernwin.hpp:1174
@ ui_dbg_request_step_over
Definition kernwin.hpp:1102
@ ui_dbg_get_bptloc_string
Definition kernwin.hpp:1187
@ ui_dbg_get_local_var
Definition kernwin.hpp:1274
@ ui_dbg_set_trace_platform
Definition kernwin.hpp:1249
@ ui_dbg_del_vmod
Definition kernwin.hpp:1183
@ ui_dbg_get_insn_tev_reg_val_i
Definition kernwin.hpp:1290
@ ui_dbg_add_tev
Definition kernwin.hpp:1238
@ ui_dbg_set_insn_trace_options
Definition kernwin.hpp:1127
@ ui_dbg_wait_for_next_event
Definition kernwin.hpp:1150
@ ui_dbg_get_reg_val_i
Definition kernwin.hpp:1292
@ ui_dbg_get_tev_event
Definition kernwin.hpp:1222
@ ui_dbg_set_trace_file_desc
Definition kernwin.hpp:1216
@ ui_dbg_edit_manual_regions
Definition kernwin.hpp:1171
@ ui_dbg_retrieve_exceptions
Definition kernwin.hpp:1155
@ ui_dbg_add_call_tev
Definition kernwin.hpp:1240
@ ui_dbg_add_path_mapping
Definition kernwin.hpp:1276
@ ui_dbg_request_del_bpt
Definition kernwin.hpp:1202
@ ui_dbg_save_trace_file
Definition kernwin.hpp:1214
@ ui_dbg_register_provider
Definition kernwin.hpp:1179
@ ui_dbg_read_memory
Definition kernwin.hpp:1192
@ ui_dbg_getn_thread
Definition kernwin.hpp:1096
@ ui_dbg_request_attach_process
Definition kernwin.hpp:1143
@ ui_dbg_step_until_ret
Definition kernwin.hpp:1105
@ ui_dbg_compare_bpt_locs
Definition kernwin.hpp:1184
@ ui_dbg_update_bpt
Definition kernwin.hpp:1230
@ ui_dbg_request_continue_process
Definition kernwin.hpp:1092
@ ui_dbg_write_register
Definition kernwin.hpp:1195
@ ui_dbg_get_running_notification
Definition kernwin.hpp:1084
@ ui_dbg_add_insn_tev
Definition kernwin.hpp:1239
@ ui_dbg_suspend_thread
Definition kernwin.hpp:1158
@ ui_dbg_is_valid_trace_file
Definition kernwin.hpp:1215
@ ui_dbg_set_reg_val_i
Definition kernwin.hpp:1293
@ ui_dbg_request_del_oldbpt
Definition kernwin.hpp:1111
@ ui_dbg_add_bpt
Definition kernwin.hpp:1228
@ ui_dbg_srcdbg_step_into
Definition kernwin.hpp:1280
@ ui_dbg_set_bptloc_string
Definition kernwin.hpp:1186
@ ui_dbg_request_run_to
Definition kernwin.hpp:1104
@ ui_dbg_request_suspend_process
Definition kernwin.hpp:1090
@ ui_dbg_set_func_trace_options
Definition kernwin.hpp:1133
@ ui_dbg_clear_trace
Definition kernwin.hpp:1115
@ ui_dbg_set_manual_regions
Definition kernwin.hpp:1166
@ ui_dbg_get_reg_value_type
Definition kernwin.hpp:1140
@ ui_dbg_set_process_state
Definition kernwin.hpp:1164
@ ui_dbg_suspend_process
Definition kernwin.hpp:1089
@ ui_dbg_get_local_vars
Definition kernwin.hpp:1275
@ ui_dbg_request_select_thread
Definition kernwin.hpp:1098
@ ui_dbg_define_exception
Definition kernwin.hpp:1157
@ ui_dbg_is_insn_trace_enabled
Definition kernwin.hpp:1123
@ ui_dbg_set_event_cond
Definition kernwin.hpp:1198
@ ui_dbg_run_requests
Definition kernwin.hpp:1082
@ ui_dbg_get_ip_val
Definition kernwin.hpp:1173
@ ui_dbg_step_into
Definition kernwin.hpp:1099
@ ui_dbg_get_bpt
Definition kernwin.hpp:1226
@ ui_dbg_add_bpt_tev
Definition kernwin.hpp:1242
@ ui_dbg_enable_manual_regions
Definition kernwin.hpp:1167
@ ui_dbg_get_tev_type
Definition kernwin.hpp:1233
@ ui_dbg_get_first_module
Definition kernwin.hpp:1146
@ ui_dbg_find_bpt
Definition kernwin.hpp:1227
@ ui_dbg_set_remote_debugger
Definition kernwin.hpp:1153
@ ui_dbg_add_vmod
Definition kernwin.hpp:1182
@ ui_dbg_add_debug_event
Definition kernwin.hpp:1243
@ ui_dbg_request_detach_process
Definition kernwin.hpp:1145
@ ui_dbg_set_resume_mode
Definition kernwin.hpp:1257
@ ui_dbg_request_set_step_trace_options
Definition kernwin.hpp:1122
@ ui_dbg_select_thread
Definition kernwin.hpp:1097
@ ui_dbg_get_tev_info
Definition kernwin.hpp:1136
@ ui_dbg_enable_func_trace
Definition kernwin.hpp:1130
@ ui_dbg_get_process_options
Definition kernwin.hpp:1162
@ ui_dbg_get_tev_tid
Definition kernwin.hpp:1234
@ ui_dbg_get_insn_tev_reg_result_i
Definition kernwin.hpp:1291
@ ui_dbg_del_bpt
Definition kernwin.hpp:1201
@ ui_dbg_get_thread_qty
Definition kernwin.hpp:1095
@ ui_dbg_srcdbg_step_until_ret
Definition kernwin.hpp:1284
@ ui_dbg_set_process_options
Definition kernwin.hpp:1168
@ ui_dbg_request_add_oldbpt
Definition kernwin.hpp:1109
@ ui_dbg_get_memory_info
Definition kernwin.hpp:1196
@ ui_dbg_request_enable_oldbpt
Definition kernwin.hpp:1113
@ ui_dbg_request_enable_bblk_trace
Definition kernwin.hpp:1208
@ ui_dbg_graph_trace
Definition kernwin.hpp:1220
@ ui_dbg_store_exceptions
Definition kernwin.hpp:1156
@ ui_dbg_is_func_trace_enabled
Definition kernwin.hpp:1129
@ ui_dbg_attach_process
Definition kernwin.hpp:1142
@ ui_dbg_del_thread
Definition kernwin.hpp:1245
@ ui_dbg_internal_get_sreg_base
Definition kernwin.hpp:1190
@ ui_dbg_srcdbg_request_step_until_ret
Definition kernwin.hpp:1285
@ ui_dbg_run_to_backwards
Definition kernwin.hpp:1310
@ ui_dbg_request_step_over_backwards
Definition kernwin.hpp:1309
@ ui_dbg_step_into_backwards
Definition kernwin.hpp:1306
@ ui_dbg_exit_process
Definition kernwin.hpp:1093
@ ui_dbg_get_call_tev_callee
Definition kernwin.hpp:1137
@ ui_dbg_get_sp_val
Definition kernwin.hpp:1172
@ ui_dbg_diff_trace_file
Definition kernwin.hpp:1219
@ ui_dbg_enable_step_trace
Definition kernwin.hpp:1118
@ ui_dbg_request_exit_process
Definition kernwin.hpp:1094
@ ui_dbg_get_tev_qty
Definition kernwin.hpp:1135
@ ui_dbg_request_set_insn_trace_options
Definition kernwin.hpp:1128
@ ui_dbg_is_bblk_trace_enabled
Definition kernwin.hpp:1206
@ ui_dbg_get_module_info
Definition kernwin.hpp:1269
@ ui_create_source_viewer
ui: Create new source viewer.
Definition kernwin.hpp:772
@ ui_dbg_internal_set_elang
Definition kernwin.hpp:1253
@ ui_dbg_change_bptlocs
Definition kernwin.hpp:1265
@ ui_dbg_step_over_backwards
Definition kernwin.hpp:1308
@ ui_dbg_get_reg_info
Definition kernwin.hpp:1295
@ ui_dbg_enable_oldbpt
Definition kernwin.hpp:1112
@ ui_dbg_unregister_provider
Definition kernwin.hpp:1180
@ ui_null
Definition kernwin.hpp:366
@ ui_dbg_get_process_state
Definition kernwin.hpp:1086
@ ui_dbg_continue_process
Definition kernwin.hpp:1091
@ ui_dbg_get_bpt_group
Definition kernwin.hpp:1264
@ ui_dbg_write_memory
Definition kernwin.hpp:1193
@ ui_dbg_collect_stack_trace
Definition kernwin.hpp:1268
@ ui_dbg_del_oldbpt
Definition kernwin.hpp:1110
@ ui_dbg_get_insn_tev_reg_mem
Definition kernwin.hpp:1223
@ ui_dbg_set_trace_size
Definition kernwin.hpp:1114
@ ui_dbg_start_process
Definition kernwin.hpp:1087
@ ui_dbg_get_trace_dynamic_register_set
Definition kernwin.hpp:1298
@ ui_dbg_get_trace_platform
Definition kernwin.hpp:1250
@ ui_dbg_bring_to_front
Definition kernwin.hpp:1148
@ ui_dbg_set_bptloc_group
Definition kernwin.hpp:1259
@ ui_dbg_request_clear_trace
Definition kernwin.hpp:1116
@ ui_dbg_srcdbg_request_step_over
Definition kernwin.hpp:1283
@ ui_dbg_get_bpt_tev_ea
Definition kernwin.hpp:1139
@ ui_dbg_get_trace_base_address
Definition kernwin.hpp:1235
@ ui_dbg_continue_backwards
Definition kernwin.hpp:1304
@ ui_dbg_get_grp_bpts
Definition kernwin.hpp:1263
@ ui_dbg_internal_get_elang
Definition kernwin.hpp:1252
@ ui_dbg_request_resume_thread
Definition kernwin.hpp:1161
@ ui_dbg_request_step_into
Definition kernwin.hpp:1100
@ ui_dbg_get_current_source_line
Definition kernwin.hpp:1278
@ ui_dbg_get_srcinfo_provider
Definition kernwin.hpp:1272
@ ui_dbg_request_set_func_trace_options
Definition kernwin.hpp:1134
@ ui_dbg_getn_bpt
Definition kernwin.hpp:1225
@ ui_dbg_resume_thread
Definition kernwin.hpp:1160
@ ui_dbg_request_set_resume_mode
Definition kernwin.hpp:1258
@ ui_dbg_get_insn_tev_reg_val
Definition kernwin.hpp:1177
@ ui_dbg_get_tev_ea
Definition kernwin.hpp:1232
@ ui_dbg_check_bpt
Definition kernwin.hpp:1163
@ ui_dbg_get_ret_tev_return
Definition kernwin.hpp:1138
@ ui_dbg_request_suspend_thread
Definition kernwin.hpp:1159
@ ui_dbg_get_tev_memory_info
Definition kernwin.hpp:1221
@ ui_dbg_add_ret_tev
Definition kernwin.hpp:1241
@ ui_dbg_add_thread
Definition kernwin.hpp:1244
@ ui_dbg_hide_all_bpts
Definition kernwin.hpp:1170
@ ui_dbg_read_registers
Definition kernwin.hpp:1194
@ ui_dbg_enable_bptgrp
Definition kernwin.hpp:1301
@ ui_dbg_enable_bpt
Definition kernwin.hpp:1199
@ ui_dbg_add_oldbpt
Definition kernwin.hpp:1108
@ ui_dbg_list_bptgrps
Definition kernwin.hpp:1260
@ ui_dbg_request_enable_step_trace
Definition kernwin.hpp:1119
@ ui_dbg_enable_insn_trace
Definition kernwin.hpp:1124
@ ui_dbg_get_insn_tev_reg_result
Definition kernwin.hpp:1178
@ ui_dbg_set_trace_dynamic_register_set
Definition kernwin.hpp:1297
@ ui_dbg_getn_thread_name
Definition kernwin.hpp:1287
@ ui_dbg_get_step_trace_options
Definition kernwin.hpp:1120
@ ui_dbg_get_event_cond
Definition kernwin.hpp:1197
@ ui_dbg_load_debugger
Definition kernwin.hpp:1154
@ ui_dbg_request_step_into_backwards
Definition kernwin.hpp:1307
@ ui_dbg_get_next_module
Definition kernwin.hpp:1147
@ ui_dbg_set_reg_val
Definition kernwin.hpp:1175
@ ui_dbg_get_func_trace_options
Definition kernwin.hpp:1132
@ ui_dbg_get_current_source_file
Definition kernwin.hpp:1277
@ ui_dbg_get_debug_event
Definition kernwin.hpp:1151
@ ui_dbg_request_continue_backwards
Definition kernwin.hpp:1305
@ ui_dbg_internal_cleanup_appcall
Definition kernwin.hpp:1189
@ ui_dbg_load_trace_file
Definition kernwin.hpp:1213
@ ui_dbg_request_set_reg_val
Definition kernwin.hpp:1176
@ ui_dbg_enable_bblk_trace
Definition kernwin.hpp:1207
@ ui_dbg_request_start_process
Definition kernwin.hpp:1088
@ ui_dbg_add_many_tevs
Definition kernwin.hpp:1246
@ ui_dbg_set_trace_base_address
Definition kernwin.hpp:1237
@ ui_dbg_srcdbg_request_step_into
Definition kernwin.hpp:1281
@ ui_dbg_srcdbg_step_over
Definition kernwin.hpp:1282
@ ui_dbg_clear_requests_queue
Definition kernwin.hpp:1085
@ ui_dbg_is_step_trace_enabled
Definition kernwin.hpp:1117
@ ui_dbg_get_manual_regions
Definition kernwin.hpp:1165
@ ui_dbg_handle_debug_event
Definition kernwin.hpp:1181
@ ui_dbg_run_to
Definition kernwin.hpp:1103
@ ui_dbg_for_all_bpts
Definition kernwin.hpp:1231
@ ui_dbg_request_enable_func_trace
Definition kernwin.hpp:1131
@ ui_dbg_detach_process
Definition kernwin.hpp:1144
@ ui_dbg_request_run_to_backwards
Definition kernwin.hpp:1311
@ ui_dbg_request_set_bblk_trace_options
Definition kernwin.hpp:1211
@ ui_dbg_set_step_trace_options
Definition kernwin.hpp:1121
@ ui_dbg_set_highlight_trace_options
Definition kernwin.hpp:1248
@ ui_dbg_del_bptgrp
Definition kernwin.hpp:1262
@ ui_dbg_rename_bptgrp
Definition kernwin.hpp:1261
@ ui_dbg_get_bpt_qty
Definition kernwin.hpp:1107
@ ui_dbg_set_debugger_options
Definition kernwin.hpp:1152
@ ui_dbg_get_current_thread
Definition kernwin.hpp:1149
@ ui_dbg_set_bblk_trace_options
Definition kernwin.hpp:1210
@ ui_dbg_internal_ioctl
Definition kernwin.hpp:1191
@ ui_dbg_get_insn_trace_options
Definition kernwin.hpp:1126
@ ui_dbg_bin_search
Definition kernwin.hpp:1288
@ ui_dbg_request_step_until_ret
Definition kernwin.hpp:1106
@ ui_dbg_choose_trace_file
Definition kernwin.hpp:1218
@ ui_dbg_get_processes
Definition kernwin.hpp:1141
@ ui_dbg_request_enable_insn_trace
Definition kernwin.hpp:1125
@ ui_dbg_set_bpt_group
Definition kernwin.hpp:1247
@ ui_dbg_get_running_request
Definition kernwin.hpp:1083
@ ui_dbg_get_global_var
Definition kernwin.hpp:1273
@ ui_dbg_get_bblk_trace_options
Definition kernwin.hpp:1209
@ ui_dbg_step_over
Definition kernwin.hpp:1101
@ ui_dbg_is_busy
Definition kernwin.hpp:1169
idaman callui_t ida_export_data(idaapi *callui)(ui_notification_t what
Pointer to the user-interface dispatcher function.
asize_t size
Definition kernwin.hpp:6339
QT::QWidget TWidget
Definition kernwin.hpp:2024
qvector< simpleline_t > strvec_t
A collection of simple lines to populate a custom view.
Definition kernwin.hpp:1732
unsigned __int64 uint64
Definition llong.hpp:13
unsigned int uint32
unsigned 32 bit value
Definition pro.h:348
uint64 asize_t
Definition pro.h:423
uint32 bgcolor_t
background color in RGB
Definition pro.h:5012
adiff_t sval_t
signed value used by the processor.
Definition pro.h:446
uint64 ea_t
Definition pro.h:421
int int32
signed 32 bit value
Definition pro.h:347
unsigned int uint
unsigned 32 bit value
Definition pro.h:339
qvector< ea_t > eavec_t
vector of addresses
Definition pro.h:2764
uval_t inode_t
The inode_t type is the specialization specific inode number.
Definition pro.h:464
ptrdiff_t ssize_t
Signed size_t - used to check for size overflows when the counter becomes negative.
Definition pro.h:381
void idaapi setflag(T &where, U bit, bool cnd)
Set a 'bit' in 'where' if 'value' if not zero.
Definition pro.h:1527
unsigned char uint8
unsigned 8 bit value
Definition pro.h:344
_qstring< char > qstring
regular string
Definition pro.h:3694
qvector< qstring > qstrvec_t
vector of strings
Definition pro.h:3697
Describes a breakpoint location.
Definition dbg.hpp:884
bool operator!=(const bpt_location_t &r) const
Definition dbg.hpp:938
bool is_empty_path(void) const
No path/filename specified? (BPLT_REL, BPLT_SRC)
Definition dbg.hpp:891
const char * symbol(void) const
Get symbol name (BPLT_SYM)
Definition dbg.hpp:893
void set_src_bpt(const char *fn, int _lineno)
Specify a source level location.
Definition dbg.hpp:908
uval_t offset(void) const
Get offset (BPLT_REL, BPLT_SYM)
Definition dbg.hpp:895
int compare(const bpt_location_t &r) const
Lexically compare two breakpoint locations.
Definition dbg.hpp:936
void set_sym_bpt(const char *_symbol, uval_t _offset=0)
Specify a symbolic location.
Definition dbg.hpp:916
void set_abs_bpt(ea_t a)
Specify an absolute address location.
Definition dbg.hpp:901
size_t print(qstring *buf) const
Internal function.
bool operator<=(const bpt_location_t &r) const
Definition dbg.hpp:941
bool operator<(const bpt_location_t &r) const
Definition dbg.hpp:939
bool operator>=(const bpt_location_t &r) const
Definition dbg.hpp:942
ea_t info
Definition dbg.hpp:886
const char * path(void) const
Get path/filename (BPLT_REL, BPLT_SRC)
Definition dbg.hpp:892
int index
Definition dbg.hpp:887
bpt_location_t(void)
Constructor (default type is BPLT_ABS)
Definition dbg.hpp:898
bool operator==(const bpt_location_t &r) const
Definition dbg.hpp:937
int lineno(void) const
Get line number (BPLT_SRC)
Definition dbg.hpp:894
void set_rel_bpt(const char *mod, uval_t _offset)
Specify a relative address location.
Definition dbg.hpp:924
bool operator>(const bpt_location_t &r) const
Definition dbg.hpp:940
ea_t ea(void) const
Get address (BPLT_ABS)
Definition dbg.hpp:896
bpt_loctype_t loctype
Definition dbg.hpp:888
bpt_loctype_t type(void) const
Get bpt type.
Definition dbg.hpp:890
Characteristics of a breakpoint.
Definition dbg.hpp:951
void set_abs_bpt(ea_t a)
Set bpt location to an absolute address.
Definition dbg.hpp:1025
int get_size(void) const
Get bpt size.
Definition dbg.hpp:1023
uint32 props
Internal breakpoint properties
Definition dbg.hpp:983
bool is_symbpt(void) const
Is symbolic breakpoint?
Definition dbg.hpp:1035
int cndidx
Internal number of the condition (<0-none)
Definition dbg.hpp:1000
bool set_trace_action(bool enable, int trace_types)
Configure tracing options.
Definition dbg.hpp:1045
bool is_tracemodebpt(void) const
Does breakpoint trace anything?
Definition dbg.hpp:1039
bool enabled(void) const
Is breakpoint enabled?
Definition dbg.hpp:1008
int pass_count
Number of times the breakpoint is hit before stopping (default is 0: stop always)
Definition dbg.hpp:959
thid_t tid
breakpoint thread id
Definition dbg.hpp:956
size_t get_cnd_elang_idx() const
Definition dbg.hpp:1062
void set_cond(const char *cnd)
Internal function.
bool is_active(void) const
Written completely to process?
Definition dbg.hpp:1014
bool is_page_bpt(void) const
Page breakpoint?
Definition dbg.hpp:1020
inode_t bptid
Internal breakpoint id.
Definition dbg.hpp:1001
int size
Size of the breakpoint (0 for software breakpoints)
Definition dbg.hpp:999
pid_t pid
breakpoint process id
Definition dbg.hpp:955
void set_sym_bpt(const char *sym, uval_t o)
Set bpt location to a symbol.
Definition dbg.hpp:1029
bpt_t(void)
Definition dbg.hpp:1003
bool is_relbpt(void) const
Is relative address breakpoint?
Definition dbg.hpp:1034
qstring cndbody
Condition as entered by the user.
Definition dbg.hpp:953
bool is_traceonbpt(void) const
Is this a tracing breakpoint, and is tracing enabled?
Definition dbg.hpp:1041
bpt_location_t loc
Location.
Definition dbg.hpp:954
bool listbpt(void) const
Include in the bpt list?
Definition dbg.hpp:1011
uint32 flags
Breakpoint property bits
Definition dbg.hpp:961
bool is_inactive(void) const
Not written to process at all?
Definition dbg.hpp:1018
bool is_traceoffbpt(void) const
Is this a tracing breakpoint, and is tracing disabled?
Definition dbg.hpp:1043
bool is_compiled(void) const
Condition has been compiled?
Definition dbg.hpp:1012
bool is_low_level(void) const
Is bpt condition calculated at low level?
Definition dbg.hpp:1009
bool eval_cond(ea_t ea, bool *fire, const char *bpt_type)
Internal function.
bool is_absbpt(void) const
Is absolute address breakpoint?
Definition dbg.hpp:1033
bool is_srcbpt(void) const
Is source level breakpoint?
Definition dbg.hpp:1036
bool badbpt(void) const
Failed to write bpt to process memory?
Definition dbg.hpp:1010
bpttype_t type
Breakpoint type.
Definition dbg.hpp:958
bool is_partially_active(void) const
Written partially to process?
Definition dbg.hpp:1016
bool set_cnd_elang(const char *name)
Set the scripting language name for the condition string.
Definition dbg.hpp:2759
ea_t ea
Address, if known. For BPLT_SRC, index into an internal data struct.
Definition dbg.hpp:957
bool is_hwbpt(void) const
Is hardware breakpoint?
Definition dbg.hpp:1007
void set_src_bpt(const char *fn, int lineno)
Set bpt location to a source line.
Definition dbg.hpp:1027
void set_rel_bpt(const char *mod, uval_t o)
Set bpt location to a relative address.
Definition dbg.hpp:1031
size_t cb
size of this structure
Definition dbg.hpp:952
const char * get_cnd_elang() const
Get the scripting language name for the condition string.
Definition dbg.hpp:2758
range_t range
if specified, restricts the address range
Definition dbg.hpp:1262
const char * name
if specified, restricts bpts to the ones that match the given name
Definition dbg.hpp:1263
bpt_visitor_t(void)
Definition dbg.hpp:1264
int idaapi for_all_bpts(int bvflags)
Definition dbg.hpp:1267
virtual int idaapi visit_bpt(const bpt_t *bpt)=0
Defines action taken when breakpoint is visited.
Definition dbg.hpp:864
bpt_t * bpt
Definition dbg.hpp:865
defined as struct so it can be forward-declared
Definition idd.hpp:751
This structure is used only when detailed information about a debug event is needed.
Definition idd.hpp:362
This structure describes a debugger API module.
Definition idd.hpp:948
bool have_set_options() const
Definition idd.hpp:2052
drc_t set_dbg_options(const char **res, const char *keyword, int pri, int value_type, const void *value)
Definition idd.hpp:2048
bool may_disturb() const
Definition idd.hpp:1077
Definition idd.hpp:125
Used by debugger modules to launching processes with environment variables.
Definition idd.hpp:277
vector of memory info objects
Definition idd.hpp:260
Required typedef for get_insn_tev_reg_mem()
Definition dbg.hpp:1597
ea_t ea
Definition dbg.hpp:1598
bytevec_t bytes
Definition dbg.hpp:1599
Describes a module load event.
Definition idd.hpp:329
Definition dbg.hpp:1069
bpt_location_t to
Definition dbg.hpp:1071
bpt_location_t from
Definition dbg.hpp:1070
Base class for an range.
Definition range.hpp:35
Debuggee register information.
Definition idd.hpp:95
Structure to hold a register value.
Definition idd.hpp:563
Structure used for dbg_add_many_tevs()
Definition dbg.hpp:1778
tev_info_t info
Definition dbg.hpp:1779
tev_reg_values_t registers
Definition dbg.hpp:1780
Common information for all trace events.
Definition dbg.hpp:1587
ea_t ea
address where the event occurred
Definition dbg.hpp:1590
thid_t tid
thread where the event was recorded
Definition dbg.hpp:1589
tev_type_t type
trace event type
Definition dbg.hpp:1588
Structure used for dbg_add_many_tevs()
Definition dbg.hpp:1764
regval_t value
Definition dbg.hpp:1765
int reg_idx
Definition dbg.hpp:1766
tev_reg_value_t(int _reg_idx=-1, uint64 _value=uint64(-1))
Definition dbg.hpp:1768