Hi
For some reason Ozone doesn't find source file when clicking on it in Disassembly Window.
Background:
Simplified project structure looks like this:
Display All
project is linking mylib.a static library.
Some time ago mylib.a library had absolute paths for debug symbols but it was inconvenient. To debug library we had to recompile it locally - otherwise absolute paths inside library didn't match (every developer has different absolute path to root). That's why we decided to use relative paths in mylib.a library.
We used following commands in CMakeLists.txt to make paths inside mylib.a relative to root directory.
We added Project.SetRootPath command in project_ozone.jdebug file so that it points to root directory:
Status:
What is working:
What is NOT working:
Does someone know how to fix problem with Disassembly Window?
Thanks in advance
Przemek
For some reason Ozone doesn't find source file when clicking on it in Disassembly Window.
Background:
Simplified project structure looks like this:
Source Code
project is linking mylib.a static library.
Some time ago mylib.a library had absolute paths for debug symbols but it was inconvenient. To debug library we had to recompile it locally - otherwise absolute paths inside library didn't match (every developer has different absolute path to root). That's why we decided to use relative paths in mylib.a library.
We used following commands in CMakeLists.txt to make paths inside mylib.a relative to root directory.
Source Code
- add_compile_options(-ffile-prefix-map=${PATH_TO_ROOT}=.) # PATH_TO_ROOT is passed to CMAKE automatically, so it works for every developer/environment.
- add_compile_options(-ffile-prefix-map=${CMAKE_CURRENT_BINARY_DIR}=.) # We had to convert paths to build directory as well. For some reason Ozone was concatenating path to build directory with path to the source file itself.
We added Project.SetRootPath command in project_ozone.jdebug file so that it points to root directory:
Status:
What is working:
- When using project_ozone.jdebug all source files which belong to mylib library (aaa.c, bbb.c etc) are corectly resolved - according to message in Console window
- All source file are also correctly listed in Source Files Window
- When program hits breakpoint inside mylib source file, Ozone opens this source files automatically
- When program is halted and it happen to execute source code from mylib (e.g. aaa.c), Ozone opens aaa.c source file automatically
What is NOT working:
- When clicking in Disassembly Window, Ozone cannot open source file which belongs to mylib. Following message is printed in console:
Does someone know how to fix problem with Disassembly Window?
Thanks in advance
Przemek