Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/lib/include/idasql/decompiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,11 @@ struct ctree_collector_t : public ctree_parentee_t {
ci.ea = insn->ea;
ci.depth = parents.size();

#if IDA_SDK_VERSION >= 930
citem_t* p = parent_item();
#else
citem_t* p = parents.empty() ? nullptr : parents.back();
#endif
if (p) {
auto it = item_ids.find(p);
if (it != item_ids.end()) ci.parent_id = it->second;
Expand All @@ -433,7 +437,11 @@ struct ctree_collector_t : public ctree_parentee_t {
ci.ea = expr->ea;
ci.depth = parents.size();

#if IDA_SDK_VERSION >= 930
citem_t* p = parent_item();
#else
citem_t* p = parents.empty() ? nullptr : parents.back();
#endif
if (p) {
auto it = item_ids.find(p);
if (it != item_ids.end()) ci.parent_id = it->second;
Expand Down
6 changes: 5 additions & 1 deletion src/lib/include/idasql/entities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ inline bool get_func_tinfo(ea_t ea, tinfo_t& tif) {
return get_tinfo(&tif, ea);
}

// Helper to get calling convention name from callcnv_t
// Helper to get calling convention name
#if IDA_SDK_VERSION >= 930
inline const char* get_cc_name(callcnv_t cc) {
#else
inline const char* get_cc_name(cm_t cc) {
#endif
switch (cc) {
case CM_CC_CDECL: return "cdecl";
case CM_CC_STDCALL: return "stdcall";
Expand Down
4 changes: 4 additions & 0 deletions src/lib/include/idasql/entities_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,11 @@ struct FuncArgEntry {

inline const char* get_calling_convention_name(cm_t cc) {
// Extract calling convention from cm_t (using CM_CC_MASK)
#if IDA_SDK_VERSION >= 930
callcnv_t conv = cc & CM_CC_MASK;
#else
cm_t conv = cc & CM_CC_MASK;
#endif
switch (conv) {
case CM_CC_CDECL: return "cdecl";
case CM_CC_STDCALL: return "stdcall";
Expand Down
4 changes: 4 additions & 0 deletions src/plugin/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,11 @@ struct idasql_plugmod_t : public plugmod_t
static plugmod_t* idaapi init()
{
// Skip loading when running under idalib (e.g., idasql CLI)
#if IDA_SDK_VERSION >= 930
if (is_ida_library()) {
#else
if (is_ida_library(nullptr, 0, nullptr)) {
#endif
msg("IDASQL: Running under idalib, plugin skipped\n");
return nullptr;
}
Expand Down