Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Getting rid of C exceptions
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 6 Jun 2016 14:22:59 +0000 (16:22 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 9 Jun 2016 14:33:48 +0000 (16:33 +0200)
commit138e6f86566611611b1115c957cae0a1c6a85a4b
tree1efcd127855be34445c77ccc7eef897cf992ae2b
parentc65262b0c284780b8499ffe9a55cd3cc2ca4a4a6
Getting rid of C exceptions

The goal if to used native C++ exception instead our own SLJL-based C
exceptions:

* this removes the problem of exception conversion between C and C++
  context and the lack of interoperability of SimGrid THROW/TRY/CATCH
  with its C++ counterpart;

* we can still throw exceptions from C;

* but we can't catch exception from C anymore, you should use C++
  instead if order to do that;

Things to do afterwards:

* remove exceptions from the C public APIs;

* restore the multiple usage debugging;

* fix the backtrace code and separate from the exception code in order
  to be able to add backtraces to any exception and get backtraces
  without generating exceptions;

* add support for attaching backtraces to any exception;

* attach context (baktraces and cause) everywhere;
54 files changed:
examples/msg/app-bittorrent/peer.c
examples/simdag/CMakeLists.txt
examples/simdag/scheduling/sd_scheduling.c
examples/simdag/test/sd_test.cpp [moved from examples/simdag/test/sd_test.c with 95% similarity]
include/xbt/dynar.h
include/xbt/ex.h
src/bindings/java/JavaContext.cpp
src/bindings/java/jmsg_process.cpp
src/bindings/java/jmsg_synchro.cpp
src/bindings/java/jmsg_vm.cpp
src/instr/instr_paje_values.cpp
src/msg/msg_gos.cpp
src/msg/msg_mailbox.cpp
src/msg/msg_private.h
src/msg/msg_synchro.cpp
src/msg/msg_task.cpp
src/msg/msg_vm.cpp
src/simix/smx_deployment.cpp
src/simix/smx_environment.cpp
src/simix/smx_global.cpp
src/simix/smx_network.cpp
src/simix/smx_private.h
src/simix/smx_process.cpp
src/simix/smx_process_private.h
src/smpi/colls/smpi_automatic_selector.cpp [moved from src/smpi/colls/smpi_automatic_selector.c with 96% similarity]
src/smpi/smpi_bench.cpp
src/smpi/smpi_comm.cpp
src/smpi/smpi_mpi_dt.cpp
src/smpi/smpi_pmpi.cpp
src/surf/storage_n11.cpp
src/surf/surf_interface.cpp
src/xbt/backtrace_linux.c
src/xbt/config.cpp
src/xbt/cunit.cpp [moved from src/xbt/cunit.c with 99% similarity]
src/xbt/dict.cpp [moved from src/xbt/dict.c with 94% similarity]
src/xbt/dict_private.h
src/xbt/dynar.cpp [moved from src/xbt/dynar.c with 94% similarity]
src/xbt/ex.cpp [moved from src/xbt/ex.c with 69% similarity]
src/xbt/xbt_log_layout_format.c
src/xbt/xbt_os_thread.c
src/xbt/xbt_replay.cpp [moved from src/xbt/xbt_replay.c with 92% similarity]
src/xbt/xbt_str.cpp [moved from src/xbt/xbt_str.c with 96% similarity]
teshsuite/msg/CMakeLists.txt
teshsuite/msg/host_on_off_recv/host_on_off_recv.c
teshsuite/msg/host_on_off_wait/host_on_off_wait.c
teshsuite/msg/task_destroy_cancel/task_destroy_cancel.cpp [moved from teshsuite/msg/task_destroy_cancel/task_destroy_cancel.c with 95% similarity]
teshsuite/simdag/flatifier/flatifier.cpp
teshsuite/smpi/mpich3-test/perf/allredtrace.c
teshsuite/xbt/CMakeLists.txt
teshsuite/xbt/mmalloc/mmalloc_test.cpp [moved from teshsuite/xbt/mmalloc/mmalloc_test.c with 90% similarity]
tools/cmake/DefinePackages.cmake
tools/cmake/GCCFlags.cmake
tools/cmake/UnitTesting.cmake
tools/cmake/test_prog/prog_stacksetup.c