Hello,
Something went wrong with running my Root C++ based program and core was dumped.
The root program is launched from a python script with the command
ROOT.ReadTree( list of arguments )
I would like to use gdb and the core file to see what is wrong.
How should I proceed? The trick is that the C++ file was launched through a python script via Root.
How in general (i.e. running in gdb, without using a core file) can I use gdb to debug programs launched in the way described above?
It depends on what you mean by " launched through a python script". If this means that it was launched as a separate process, your easiest route is likely to use a core file (like with ‘gdb root.exe core_file’). If you are executing C++ function through PyROOT, you can run gdb on the python executable:gdb python
gdb> run python_script.py
‘root.exe’ is the (file)name of the main ROOT executable; its starts a C++ interpreter (cling) as the command line prompt or can execute C++ scripts and commands passed as argument.
Oh I understood.
No, I don’t enter CLING (i.e. type root -l) to run my programs.
I use PyRoot (i.e. compiling my own macros) and already tested your method of running PyRoot in gdb.
So I test core files due to PyRoot as you suggested