aboutsummaryrefslogtreecommitdiffstats
path: root/debug/DebugInformation.ml
Commit message (Collapse)AuthorAgeFilesLines
* Remove the cparser/Builtins moduleXavier Leroy2019-07-171-1/+1
| | | | | | | | | Move its definitions to modules C (the type `builtins`) and Env (the operations that deal with the initial environment). Reasons for the refactoring: 1- The name "Builtins" will soon be reused for a Coq module 2- `Env.initial()` makes more sense than `Builtins.environment()`.
* Fix misspellings in messages, man pages, and commentsXavier Leroy2019-05-311-2/+2
| | | | | | This is a manual, partial merge of Github pull request #296 by @Fourchaux. flocq/, cparser/MenhirLib/ and parts of test/ have not been changed because these are local copies and the fixes should be performed upstream.
* Print only debug info for printed functions.Bernhard Schommer2019-04-161-6/+6
| | | | | | | | | | | Functions that are removed from the compilation unit, for example inline functions without extern, should not produce debug information. This commit reuses the mechanism used for variables in order to track additionally the printed functions. Therefore the printed variable versions are exchanged for a printed symbol version. Bug 26234
* Avoid generation of empty ranges.Bernhard Schommer2019-04-161-1/+4
| | | | | | As noted in the DWARF 3 specification empty ranges have no effect and can be left out. Bug 26234
* Simplified DebugInformation interface.Bernhard Schommer2017-02-061-0/+33
| | | | | Instead of exporting and setting all functions we just fill the struct already in DebugInformation with the correct functions.
* Do not print anonymous member names in debug infoBernhard Schommer2017-01-241-0/+1
| | | | | Anonymous members no longer are printed in the debug information. Fix 20798
* Use asprintf instead of printing to a buffer.Bernhard Schommer2016-07-261-5/+2
|
* Merge branch 'master' into cleanupBernhard Schommer2016-03-211-10/+0
|\
* | Added an interface file for DebugInformation.Bernhard Schommer2016-03-181-18/+30
| | | | | | | | | | | | The interface hides the implementation details, like the huge number of Hashtbls from the rest of the implementatio. Bug 18394
* | Code cleanup.Bernhard Schommer2016-03-101-4/+4
|/ | | | | | Removed some unused variables, functions etc. and resolved some problems which occur if all warnings except 3,4,9 and 29 are active. Bug 18394.
* More unique debug types.Bernhard Schommer2016-01-141-8/+8
| | | | | | The typdef, enumerator and function_type types form the DebugTypes and DwarfTypes shared a some fields. This commits renames them in order to make them more unique and avoid potential name clashes.
* Fixed regression introduce by merge of PR#69.Bernhard Schommer2015-12-031-0/+10
| | | | | | | Since the identifier of a function definition and of its declaration are equal we only should remove functions if the function iteself is removed. Bug 17724.
* bug 17567, typosMichael Schmidt2015-11-061-7/+7
|
* First step to implemente address ranges for the gnu backend.Bernhard Schommer2015-10-151-1/+11
| | | | | | | | | In contrast to the dcc, the gcc uses address ranges to express non-contiguous range of addresses. As a first step we set the start and end addresses for the different address ranges for the compilation unit by using the start and end addresses of functions. Bug 17392.
* Reworked the section interface for the debug information.Bernhard Schommer2015-10-141-4/+12
| | | | | | Instead of pushing strings around use the actual section. However the string is still used in the Hashtbl. Bug 17392.
* bug 17392: remove trailing whitespace in source filesMichael Schmidt2015-10-141-29/+29
|
* Removed unused function.Bernhard Schommer2015-10-131-7/+2
| | | | | The function exists_type is not really used so we can remove it. Bug 17392.
* Changed definition of implem for debug information.Bernhard Schommer2015-10-121-15/+1
| | | | | | | Instead of making each filed mutuable we use a reference to a record of type implem. Now only the default implementation and the default debug information need to be upated to add a new function. Bug 17392.
* Move strip functions to Cutil.Bernhard Schommer2015-10-121-41/+1
| | | | | | Since the strip functions might be useful in other context and is more general then the debug information. Bug 17392.
* Do not insert atom to global variable mapping.Bernhard Schommer2015-10-121-18/+1
| | | | | | The atom to global variable debug id mapping is never used so we do not need to insert global variables into it. Bug 17392.
* Unified function for adding the atom identifier.Bernhard Schommer2015-10-121-11/+17
| | | | | | | Instead of defining two functions for adding the mapping from atom to debug id we use one function which then sets the corresponding values. Bug 17392.
* Reset all Hashtables.Bernhard Schommer2015-10-081-1/+5
|
* Ensure that there are file directives for all files used in the debugBernhard Schommer2015-10-041-1/+4
| | | | information.
* Merge branch 'gnu-debug'Bernhard Schommer2015-10-021-3/+9
|\ | | | | | | | | Conflicts: debug/DebugInformation.ml
| * First try of debug information for gcc.Bernhard Schommer2015-10-021-3/+9
| |
* | Add also all files for local variables.Bernhard Schommer2015-10-021-0/+1
| |
* | Always call print debug_section in the prologue.Bernhard Schommer2015-10-021-1/+1
|/ | | | | Since files without function definition contain no function in the Section_text the filenum would be empty otherwise.
* Moved the types defined by the Debug Interface into a separate file.Bernhard Schommer2015-10-011-146/+1
|
* Use also fucntion id for local variables since atom is not unique.Bernhard Schommer2015-10-011-11/+11
|
* Only print locations for symbols that are present in the assembler.Bernhard Schommer2015-10-011-1/+7
|
* Remove unused globals also from the debug informations.Bernhard Schommer2015-10-011-11/+19
|
* More robust dwarf generation. Do not add incomplete local variablesBernhard Schommer2015-09-301-1/+1
| | | | in the Debuging information.
* Fixed minor issue with parameters that get put on the stack, madeBernhard Schommer2015-09-301-11/+8
| | | | the code more robust and added indentation for convertCompositeDef
* Avoid problem with implict declarations.Bernhard Schommer2015-09-301-3/+18
| | | | | | In order to avoid the problem that the stamp is not correct for implict declarations I insert all possible stamps of a function into my mapping and assign them one debug id.
* More fixes for the DebugInformation.Bernhard Schommer2015-09-291-13/+8
| | | | | | | Changed the sizeof function to take into account the bytes needed for the sleb128/uleb128 encoding of the DW_OP_* arguments and changed the end_live_range function to only close functions where the live range is currently open.
* Change the way the debug sections are printed.Bernhard Schommer2015-09-281-2/+23
| | | | | | If a user uses the #pragma use_section for functions the diab linker requires a separate debug_info section for each entry. This commit adds functionality to emulate this behavior.
* Added location for the formal parameters and move the end of allBernhard Schommer2015-09-281-7/+22
| | | | scopes before the last statement.
* Added translation of the range lists to location entries.Bernhard Schommer2015-09-251-9/+23
|
* Added support for the locations of stack allocated local variables.Bernhard Schommer2015-09-251-6/+82
| | | | | This commit adds furher support for location information for local variables and starts with the implementation of the debug_loc section.
* Added placing labels for live ranges etc.Bernhard Schommer2015-09-241-2/+15
| | | | | In order to avoid the usage of too many labels we replace the debug statements during the Asmexpand phase.
* Also convert the fun stamp + scope id to debug id Hashtable in anBernhard Schommer2015-09-231-4/+6
| | | | atom + scope id Hashtable.
* Added support for printing local variables and fixed issue with .textBernhard Schommer2015-09-231-3/+5
| | | | | | Local variables are now added with bogus lexical scopes to reflect the actually lexical scopes. Also this commit fixes assembler problems of the das when a user section with the name ".text" is defined.
* Record the scope structure during unblocking.Bernhard Schommer2015-09-221-19/+20
| | | | | | Instead of creating separate annotations for the local variables we call the Debug.add_lvar_scope and we construct a mapping from function id + scope id to scope information.
* New version of adding scopes etc.Bernhard Schommer2015-09-201-10/+45
| | | | | Instead of reimplementing the whole scope handling in the debug information use the existing functionality and fill the scopes explicitly in the functions.
* Started implementing the scope for the Debug Informations.Bernhard Schommer2015-09-181-10/+79
| | | | | | Scopes will be handled by a stack of all open scopes. This stack then can also be used to generate the debug directives to track the scopes through the rest of the passes.
* First version with computation of dwarf info from debug info.Bernhard Schommer2015-09-171-27/+53
| | | | | Introduced a new dwarf generation from the information collected in the DebugInformation and removed the old CtODwarf translation.
* Move more functionality in the new interface.Bernhard Schommer2015-09-161-5/+30
| | | | | | Added functions to add more information to the debuging interface, like the struct layout with offsets, bitifiled layout and removed the no longer needed mapping from stamp to atom.
* Add the debug interface file.Bernhard Schommer2015-09-161-10/+48
| | | | | | | | The new file Debug.ml contains the interface for generating and printing debug information. In order to generate debug information the init function initializes the necessary functions depending on the -g flag. If the -g is not there all functions are dummy functions which do nothing.
* Further function to add debug information.Bernhard Schommer2015-09-151-31/+67
| | | | | Added the rest of the global declarations and started adding functions to fill in the missing information about struct and union fields etc.
* Started adding function information to the debug information.Bernhard Schommer2015-09-151-3/+48
|