# Issue with get\_func\_name

**URL:** <https://community.hex-rays.com/t/issue-with-get-func-name/383>\
**Category:** C++ SDK & IDAPython\
**Created:** [July 11, 2025, 3:58pm UTC](https://community.hex-rays.com/t/issue-with-get-func-name/383 "2025-07-11T15:58:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![berk000](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/berk000/32/182_2.png) [@berk000](https://community.hex-rays.com/u/berk000)\
**Post date:** [July 11, 2025, 3:59pm UTC](https://community.hex-rays.com/t/issue-with-get-func-name/383/1 "2025-07-11T15:59:00Z")

</div>

Hello everyone,

I’m trying to make a simple plugin that prints out all of the function names from the loaded binary using IDA’s C++ SDK. Get\_func\_qty returns the correct number of functions, but no matter what I try, get\_func\_name fails (returns -1), and the output parameter remains empty. Instead of getn\_func, I’ve also tried get\_screen\_ea, inf\_get\_min\_ea, etc., but I get the same result. Any recommendations would be highly appreciated.

IDA version: IDA Pro 9.1 & IDA SDK 9.1

Plugin code:

```cpp
plugmod_t* idaapi init() {
    return PLUGIN_OK;
}

void idaapi term() {
}

bool idaapi run(size_t arg) {
    int FuncNum = get_func_qty();
    msg("FuncNum: (%d)\n", FuncNum);

    for (int i = 0; i < FuncNum; i++) {
        func_t* CurFunc = getn_func(i);
        if (CurFunc == nullptr) {
            msg("getn_func failed\n");
            return true;
        }

        qstring FuncName;
        if (get_func_name(&FuncName, CurFunc->start_ea) <= 0) {
            msg("Failed to get function name.\n");
            return true;
        }

        msg("FuncName: (%s) CurFunc: (%a)\n", FuncName.c_str(), CurFunc->start_ea);
    }

    return true;
}

__declspec(dllexport) plugin_t PLUGIN = {
    IDP_INTERFACE_VERSION,
    PLUGIN_PROC,   
    init,            
    term,       
    run,               
    "Description",
    "Help",
    "PluginTest",
    "Ctrl-Alt-S" 
};

```

I’ve also tried letting the code continue even after it fails, but the result is the same. Not only are the subs missing, but none of the other function names are printed either. Below is the output of the code without error checking in get\_func\_name(), which fails:

```auto
FuncNum: (54)
FuncName: () CurFunc: (80001000)
FuncName: () CurFunc: (80001040)
FuncName: () CurFunc: (80001060)
...

```

---

<div class="post-metadata">

**Author:** ![teresa\_hexrays](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/teresa_hexrays/32/11_2.png) [@teresa\_hexrays](https://community.hex-rays.com/u/teresa_hexrays)\
**Post date:** [July 14, 2025, 10:38am UTC](https://community.hex-rays.com/t/issue-with-get-func-name/383/2 "2025-07-14T10:38:45Z")

</div>

Hello @berk000,  
At first glance, we didn’t notice anything peculiar that might explain such unexpected behavior.  
Would you be able to share a sample IDB (you can do this via our [support](https://support.hex-rays.com/) channel) so we can investigate this further?

---

<div class="post-metadata">

**Author:** ![berk000](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/berk000/32/182_2.png) [@berk000](https://community.hex-rays.com/u/berk000)\
**Post date:** [July 14, 2025, 12:33pm UTC](https://community.hex-rays.com/t/issue-with-get-func-name/383/3 "2025-07-14T12:33:50Z")

</div>

Hello, thanks for the response. Sure, I’ll reach out through support soon and share the IDB

---

<div class="post-metadata">

**Author:** ![igor](https://sea2.discourse-cdn.com/flex002/user_avatar/community.hex-rays.com/igor/32/35_2.png) [@igor](https://community.hex-rays.com/u/igor)\
**Post date:** [July 18, 2025, 3:11pm UTC](https://community.hex-rays.com/t/issue-with-get-func-name/383/4 "2025-07-18T15:11:20Z")

</div>

for the record, the issue was caused by the not defined ` __EA64__ `, which is required since IDA 9.0 dropped support for 32-bit databases.
