llvm-project
14e941a0 - [OpenMP][OMPD] Add symbol lookup helper for GDB plugin (#221956)

Commit
51 days ago
[OpenMP][OMPD] Add symbol lookup helper for GDB plugin (#221956) On LLVM today, `libompd.so` exists with `dlopen`, finds each API with `dlsym` and checks error with `dlerror`. **Missing piece**: There is no single place that: load this library look up this name give me a real error string **Issues**: A later change would have to edit 30+ calls sites, `dlerror()` is easy to misuse, failures often drop the OS error string. **Fix**: Add these helpers: `ompd_load_library(path)` – load `libompd.so` `ompd_get_symbol(name)` – look up one function `ompd_get_dl_error()` – last error text or NULL The plugin still uses `dlopen/dlsym` inside that helper. No LLVM Support. No `setup.py`.
Author
Parents
Loading