> For the complete documentation index, see [llms.txt](https://docs.hex-rays.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hex-rays.com/8.4/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/270.md).

# get\_name

Get name at the specified address. ea - linear address gtn\_flags - how exactly the name should be retrieved. combination of GN\_ bits returns: name

string get\_name(long ea, long gtn\_flags=0);

// GN\_ bits for [get\_name](/8.4/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/270.md)() function. // There is a convenience function calc\_gtn\_flags() to calculate the GN\_LOCAL flag #define GN\_VISIBLE 0x0001 // replace forbidden characters by SUBSTCHAR #define GN\_COLORED 0x0002 // return colored name #define GN\_DEMANGLED 0x0004 // return demangled name #define GN\_STRICT 0x0008 // fail if cannot demangle #define GN\_SHORT 0x0010 // use short form of demangled name #define GN\_LONG 0x0020 // use long form of demangled name #define GN\_LOCAL 0x0040 // try to get local name first; if failed, get global #define GN\_ISRET 0x0080 // for dummy names: use retloc #define GN\_NOT\_ISRET 0x0100 // for dummy names: do not use retloc

// Calculate flags for get\_name() function static calc\_gtn\_flags(from, ea) { return func\_contains(from, ea) ? GN\_LOCAL : 0; }


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hex-rays.com/8.4/developer-guide/idc/idc-api-reference/alphabetical-list-of-idc-functions/270.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
