Commit d56cad3
committed
[OpenMP][OMPD] Fix GDB plugin to work correctly when installed
Fix the `sys.path` logic in the GDB plugin to insert the intended
self-path in the first position rather than appending it to the end.
The latter implied that if `sys.path` (naturally) contained the GDB's
`gdb-plugin` directory, `import ompd` would return the top-level
`ompd/__init__.py` module rather than the `ompd/ompd.py` submodule,
as intended by adding the `ompd/` directory to `sys.path`.
This is intended to be a minimal change necessary to fix the issue.
Alternatively, the code could be modified to import `ompd.ompd`
and stop modifying `sys.path` entirely. However, I do not know why this
option was chosen in teh first place, so I can't tell if this won't
break something.
Fixes #153954
Signed-off-by: Michał Górny <[email protected]>1 parent 1d73b2c commit d56cad3
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments