summaryrefslogtreecommitdiff
path: root/debugger
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Use ocamlyacc's support for OCaml-style comments"Antonin Décimo2023-03-311-35/+35
| | | | | | | | | | | | | | | | | | | | | This reverts commit 514a830eae3991aec12146d3f6aeff3aa2d8406a. > The dune build system for the OCaml compiler is morally a hack, it > uses the tools from the ambient opam switch to build the compiler > codebase -- which can break whenever the compiler distribution has > more recent tools than the opam switch, and uses the more recent > features in its own codebase. > This is what is going on here: @DemiMarie introduced a new ocamlyacc > feature, and also started using it in the compiler codebase in the > non-essential commit 514a830. If we want dune to work well, a > reasonable solution is to revert 514a830 for now, and wait until the > next OCaml version is released (with the new ocamlyacc feature) to > merge it again. At this point the dune build will be possible with > the most recent OCaml release as your opam switch. from Gabriel Scherer, https://github.com/ocaml/ocaml/pull/11718#issuecomment-1475338016
* Merge pull request #12088 from damiendoligez/fix-11949Gabriel Scherer2023-03-231-1/+1
|\ | | | | one-line fix for #9265, #11949
| * one-line fix for #11949Damien Doligez2023-03-081-1/+1
| |
* | Bytesections: cleanup API (#11623)hhugo2023-03-111-9/+11
|/
* Use ocamlyacc's support for OCaml-style commentsDemi Marie Obenour2023-02-271-35/+35
| | | | | | Now that it exists, use it. Reviewd by Damien Doligez.
* Do not build bytecode executables with -g by defaultXavier Leroy2023-02-021-1/+1
| | | | | | 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.
* Less verbose logs from `make` (#11844)Xavier Leroy2023-01-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* rename wrap_def -> with_local_level, etc.Takafumi Saikawa2022-12-271-1/+1
|
* Introduce wrapper functions for level management ([Ctype.wrap_def], etc)Takafumi Saikawa2022-12-271-8/+7
| | | | | | | | 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]).
* Define printer types manually rather than parsing them from stringsSébastien Hinderer2022-11-242-32/+10
|
* Embed printer types in toplevels and debuggerSébastien Hinderer2022-11-247-42/+36
| | | | | | | | | | | | | | | | | | | 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.
* Remove dead codeChris Casinghino2022-11-043-297/+0
|
* Stop passing -safe-string when building the compiler and in the testsuiteSébastien Hinderer2022-09-111-1/+1
| | | | | | 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.
* Pass the same flags to ocamlyacc consistentlySébastien Hinderer2022-08-251-1/+1
| | | | | | | 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.
* Restore basic functionality to the bytecode debugger (#11065)Damien Doligez2022-07-0111-47/+99
| | | | | | | | | | | | | * 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
* Display an alert if -I +unix, etc is missingDavid Allsopp2022-05-244-3/+10
|
* otherlibs: Merge win32unix into unixSébastien Hinderer2022-04-102-21/+20
|
* Factorize the definition of the standard library flagsSébastien Hinderer2022-03-311-1/+1
|
* Build system: also factorize the inclusion of directories when calling ocamldepSébastien Hinderer2022-03-221-2/+2
|
* Build system: factorize the definitions related to ocamldepSébastien Hinderer2022-03-221-3/+1
|
* Build system: normalize the invocations of ocamldepSébastien Hinderer2022-03-221-4/+4
|
* Remove uses of ;; from the codebaseSébastien Hinderer2022-02-2512-40/+33
|
* Add the distclean target to debugger/MakefileSébastien Hinderer2022-01-181-0/+4
|
* Wrong unmarshaling of function pointers in debugger mode (#10709)Xavier Leroy2021-10-191-1/+1
| | | | | | | | | | | | | | | | | | | 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
* Pack ocamldebug modules to minimize clashes (#9621)sonologico2021-09-094-8/+18
|
* Normalize type_expr nodes on access (#10337)Jacques Garrigue2021-06-243-5/+3
| | | Co-authored-by: Takafumi Saikawa <tscompor@gmail.com>
* Add {Int,Int32,Int64,NativeInt}.{min,max} (#10392)Alain Frisch2021-05-112-3/+3
|
* Build system: replace suffix rules by pattern rulesSébastien Hinderer2021-04-271-5/+2
|
* Build system: provide a default value for OCAMLLEXSébastien Hinderer2021-04-141-1/+0
| | | | Each directory can override this default value.
* added warning for missing mli interface fileAnukriti122021-03-311-1/+1
|
* stop using single letter in warning settingsoctachron2021-03-151-1/+1
| | | | | | - 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
* Build system: deduplicate the rules used to generate the lexers and parsersSébastien Hinderer2021-03-021-6/+0
|
* {debugger,lex}/Makefile: make it possible to override lexer andparser generatorSébastien Hinderer2021-03-021-6/+7
| | | | Also use generic (pattern) build rules
* Build system: rename the OCAMLLEX_FLAGS to OCAMLLEXFLAGSSébastien Hinderer2021-03-021-1/+1
|
* Remove useless / wrong definitions of the CAMLRUN build variableSébastien Hinderer2021-02-081-1/+0
|
* Introduce warning 68 to warn about hidden allocation due to pattern match of ↵hhugo2020-08-171-1/+1
| | | | | mutable field in curried functions (#9751) Introduce new warning 68
* Get rid of the YACCFLAGS build variableSébastien Hinderer2020-08-051-1/+0
| | | | | It was not used, except in lex/Makefile where this commit replaces its unique occurrence by its definition in the same file.
* Build system: simplify installation rulesSébastien Hinderer2020-06-181-1/+1
| | | | | | 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.
* makefiles: move the inclusion of Makefile.build_config in Makefile.commonGabriel Scherer2020-05-061-1/+0
|
* Introduce Makefile.build_config.inDavid Allsopp2020-04-171-2/+2
| | | | | | | | | | | | 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.
* Use Fun.protect where possibleDavid Allsopp2019-10-195-49/+24
|
* Don't ever call stop_user_input in line_loopDavid Allsopp2019-10-192-3/+5
| | | | | The caller is now always responsible for calling stop_user_input, rather than only responsible for calling it on error.
* Remove use of Printexc.catch from debuggerDavid Allsopp2019-10-191-1/+1
| | | | | | 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.
* Preserve backtraces in debuggerDavid Allsopp2019-10-199-21/+26
| | | | | Add Primitives.cleanup which allows handlers for unexpected exceptions to cleanup and reraise the exception with its backtrace.
* Ensure make distclean works on an unconfigured treeDavid Allsopp2019-10-151-1/+1
|
* Allow make to be invoked before configureDavid Allsopp2018-12-041-2/+2
| | | | | This should be improved to give better warnings for when Makefile.config and Makefile.common are required.
* ocamldebug: initialize all functions in Env (#9356)Florian Angeletti2020-03-111-29/+5
| | | | | 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.
* compilerlibs: expose parsers for 'Longident.t'sFlorian Angeletti2020-01-091-1/+2
|
* debugger: rename parser and lexer modulesFlorian Angeletti2020-01-067-46/+49
|
* Avoid duplicated mark_loopsFlorian Angeletti2019-10-172-2/+0
|