Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support debugging multithreaded programs until they create threads #10594

Merged
merged 2 commits into from
Sep 1, 2021

Commits on Aug 31, 2021

  1. Support debugging multithreaded programs until they create their firs…

    …t threads
    
    ocamldebug has never worked with multithreaded programs: multiple
    threads mess up the communication protocol with the debugger, and the
    fork()-based checkpointing mechanism breaks too.
    
    Up to 4.11, the debugger would work fine until the first thread was
    created.  Then, bizarre errors would be reported.
    
    In 4.12 (commit e678885), a check was
    added, causing any program linked with the threads library to report a
    fatal error at start-up time when run under the debugger.
    
    As reported in ocaml#10517, this check is too strong: some programs just
    happen to be linked with the threads library, e.g. because they use
    LWT, but may never start a thread.  There's no reason to refuse to
    debug these programs.
    
    This commit reverts the 4.12 change and adds a check in Thread.create
    that aborts the program if it is run under the debugger.  This way,
    programs linked with the threads library can still be debugged until
    the point where they create new threads.
    xavierleroy committed Aug 31, 2021
    Configuration menu
    Copy the full SHA
    f285fd9 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2021

  1. Changes for ocaml#10594

    xavierleroy committed Sep 1, 2021
    Configuration menu
    Copy the full SHA
    c53fe66 View commit details
    Browse the repository at this point in the history