| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
This makes them too big. Just use -g for selected executables that we often
want to debug using ocamldebug (ocamlc, ocamlopt), and for the ocaml toplevel,
which can be run with backtraces enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Print concise summaries instead of full commands for some of the most verbose
commands. For example, print
```
OCAMLC lambda/switch.cmo
```
instead of
```
./boot/ocamlrun ./boot/ocamlc -nostdlib -I ./boot -use-prims runtime/primitives -g -strict-sequence -principal -absname -w +a-4-9-40-41-42-44-45-48 -warn-error +a -bin-annot -strict-formats -I lambda -I utils -I parsing -I typing -I bytecomp -I file_formats -I lambda -I middle_end -I middle_end/closure -I middle_end/flambda -I middle_end/flambda/base_types -I asmcomp -I driver -I toplevel -I tools -c lambda/switch.ml
```
and
```
CC runtime/addrmap.b.o
```
instead of
```
gcc -c -O2 -fno-strict-aliasing -fwrapv -pthread -g -Wall -Werror -fno-common -fexcess-precision=standard -fno-tree-vrp -ffunction-sections -I./runtime -D_FILE_OFFSET_BITS=64 -DCAMLDLLIMPORT= -DIN_CAML_RUNTIME -o runtime/addrmap.b.o runtime/addrmap.c
```
The output is generated with the Make function `$(info ...)` to avoid shelling
out to `echo` each time, which can be expensive under Cygwin.
A variable `V` controls whether to use the new style. When `V=0` (the default),
it is used. If `V=1`, then the usual full output is used instead.
Co-authored-by: Nicolás Ojeda Bär <n.oje.bar@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
and for type variable scoping ([Typetexp.wrap_type_variable_scope]).
The older API ([Ctype.(begin_def,end_def)], [Typetexp.(narrow,widen)], etc.)
is now removed.
The scope of some level management is refined (in particular for [type_application]).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The debugger and toplevels let users install printers for their data types.
To make sure the provided printers have the right type, both the debugger and
the toplevel need to know the internal OCaml representation of
the expected types.
So far, both the debugger and the toplevels used to extract the expected
representatioons from topdirs.cmi which they were reading at runtime.
This creates problems (e.g. when the compiler has not yet been installed)
and yields not so easy to read code.
In this commit, the type of the printers are defined in strings as they
would be written in OCaml in topdirs.ml. These strings are parsed
at runtime and the corresponding typing declarations are added to the
environment.
|
| |
|
|
|
|
|
|
| |
PR #1252 has made the safe-string mode the default so passing -safe-string
explicitly has become useless since this PR has been merged, even more
useless since support for mutable strings was removed in OCaml 5.0.
|
|
|
|
|
|
|
| |
Make sure ocamlyacc is always called with -v and --strict.
Before this commit, the parsers of the debugger and of ocamltest
were not generated using these options.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* debugger: the main program is now code fragment number 3 instead of 0
* debugger: update to handle stack backtrace in the presence of fibers
* Fix embedded file name (and line number) for stdlib.ml.in to get error
messages right and install it so the debugger can step through it.
* Stop cleanly if a program being debugged spawns a domain. It is still possible to debug the program up to the point it spawns a new domain. This is the same solution we used in #10594 for programs that create threads.
* fix the trap barrier and make it work with algebraic effects (aka fibers)
* use Caml_inline instead of inline
* debugger: use fiber id instead of address
* re-enable debugger tests
* re-enable dynlink debugging
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In debugger mode, closures sent by the debuggee have their code pointer
modified so that it points to the `function_placeholder` code in
debugger/main.ml.
This modification was performed incorrectly: the whole closure for
`function_placeholder` was used as the code pointer for the
unmarshalled closure.
This commit implements the correct operation: the code pointer from
`function_placeholder` is used as code pointer for the unmarshaled
closure.
Also: raise a more informative exception when custom printer invokes
closure from debuggee.
Fixes: #9214
|
| |
|
|
|
| |
Co-authored-by: Takafumi Saikawa <tscompor@gmail.com>
|
| |
|
| |
|
|
|
|
| |
Each directory can override this default value.
|
| |
|
|
|
|
|
|
| |
- Replace -w A with -w +A in various makefiles and tests.
- Replace -w a with -w -a in tests.
- Replace -w Ae with -w +A -w -fragile-matching
|
| |
|
|
|
|
| |
Also use generic (pattern) build rules
|
| |
|
| |
|
|
|
|
|
| |
mutable field in curried functions (#9751)
Introduce new warning 68
|
|
|
|
|
| |
It was not used, except in lex/Makefile where this commit replaces its
unique occurrence by its definition in the same file.
|
|
|
|
|
|
| |
Now that programs are built with their $(EXE) suffix, their installation
rules can be simplified a bit because most of the programs get installed
under the name they have been built with.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves the configure-generated parts of Makefile.common to a
separate (generated) Makefile, allowing Makefile.common to be a normal
Makefile.
OCaml's build system Makefile's now include Makefile.build_config (which
itself includes Makefile.config) but Makefile.config is still installed
as before. This allows configure to generate variables which are
specific to the build process and are not intended to be exported to the
installation.
|
| |
|
|
|
|
|
| |
The caller is now always responsible for calling stop_user_input, rather
than only responsible for calling it on error.
|
|
|
|
|
|
| |
Allow the runtime to display details of any uncaught exception (with
backtraces, if enabled). Unix.handle_unix_error is still used to convert
errors from system calls to a less unmeaningful form.
|
|
|
|
|
| |
Add Primitives.cleanup which allows handlers for unexpected exceptions
to cleanup and reraise the exception with its backtrace.
|
| |
|
|
|
|
|
| |
This should be improved to give better warnings for when Makefile.config
and Makefile.common are required.
|
|
|
|
|
| |
Switch ocamldebug to compiler-libs in order to avoid hidden dependencies issue.
In particular, the Env module is only fully initialized after the Typemod and Includemod modules have been linked. Calling `Env.find_type` before that initialization may result in an assert false when functor-derived types are involved.
|
| |
|
| |
|
| |
|
|
|
|
| |
On my machine the sequential build time goes from 3.7s to 1.3s
|
|
|
|
| |
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This commit adds dynlink support for ocamldebug. As a side effect, it also:
- factorizes the various functions searching for a code fragment into one,
called [caml_find_code_fragment];
- removes the [caml_register_code_fragment], which does not seem to
be used anywhere, and which clearly should not be used by external code.
|