rdbo / libmem

Advanced Game Hacking Library for C, Modern C++, Rust and Python (Windows/Linux/FreeBSD) (Process/Memory Hacking) (Hooking/Detouring) (Cross Platform) (x86/x64/ARM/ARM64) (DLL/SO Injection) (Internal/External) (Assembler/Disassembler)
GNU Affero General Public License v3.0
764 stars 92 forks source link

Add lm_symbol_t type #100

Closed rdbo closed 1 year ago

rdbo commented 1 year ago

There should be a lm_symbol_t type, something like this:

typedef struct {
        lm_cstring_t name;
        lm_address_t value;
} lm_symbol_t;
rdbo commented 1 year ago

Not a good idea: the symbol name is deleted after the callback finishes

rdbo commented 1 year ago

This might be a good idea, as long as only LM_EnumSymbols uses the lm_symbol_t type, because then you can just pass the pointer to the symbol to it and everything is still fine. On the other hand, LM_FindSymbol should not use lm_symbol_t because the lm_cstring_t name field is going to be deleted eventually.

rdbo commented 1 year ago

Done: 2ef08fce4691d13b5b06a1226dfbcb1ebf6c4028