there is a project called pystack . which used to print the python
process's stack info . pystack will use gdb to attach the python process
and call some function defined in python's executable file or python
library
such as
call (void *) PyGILState_Ensure()
call (void) PyRun_SimpleString("exec(r\"f = open('/tmp/pystack', 'w'); \
itervalues = lambda d:getattr(d,'itervalues',d.values)();import gc,traceback,itertools,sys; \
f.write('Dumping Threads\\n\\n\\n');f.write('\\n---------------\\n'.join(str(traceback.format_stack(o)
) for o in itervalues(sys._current_frames())));f.close()\")")
...
but the symbol PyGILState_Ensure also defined in gdal .so if a python
script use gdal , we can't use pystack to debug this .
so i changed the symbol of gdal by add Lib infix
Co-authored-by: kk <kaihaojiang@tencent.com>
Current GDAL does not support build using CMake but
there are external project to add CMake project files
to GDAL.
To avoid merging CMake related files into GDAL project,
Add it to gitignore.
Signed-off-by: Hiroshi Miura <miurahr@linux.com>