36 Commits

Author SHA1 Message Date
Michael Gottesman
ef3298e44e [docs] Add some information to DebuggingTheCompiler.md about working with the various simulators.
I am adding this since I had to go spelunking around to find the SIMCTL_CHILD_
prefix which I need to debug an app. Rather than just forgetting it again, I
thought it made sense to just document it here so I can forget it again. I also
put in a little bit of other stuff about simctl as well while I was here.
2025-11-19 09:44:47 -08:00
Michael Gottesman
297307549f [DebuggingTheCompiler] Add a note about using -debug-cycles to debug request evaluator cycles. 2025-03-04 13:10:40 -08:00
Anthony Latsis
a6e5e19512 Sema: Minor adjustment to BindingSet dumping
Shorten some of the keys and format them consistently as sentence
fragments rather than identifiers.
2025-01-04 11:27:54 +00:00
Michael Gottesman
5bd179e5ee [docs] Move LSANFailureSymbolication information to DebuggingTheCompiler.md instead of having its own document.
This information is generally centralized in DebuggingTheCompiler.md to make it
easier to find.
2024-08-14 14:38:40 -07:00
LamTrinh.Dev
b6239b8cee [docs] Update links to repositories moved to https://github.com/swiftlang/ 2024-07-22 12:22:43 -07:00
Michael Gottesman
045c214522 [docs] Add a little section about Disabling PCH Verification. 2024-06-12 10:59:43 -07:00
Emil Pedersen
f6232a937d [DebugInfo] Fix wrong scope being used in AllocBoxToStack 2024-04-30 16:29:49 -07:00
Emil Pedersen
7e81fd60f1 [docs] Document the lost variables statistics option 2024-04-30 13:18:38 -07:00
Michael Gottesman
0922665c05 [Debugging The Compiler.md] Add documentation that says how to lookup Windows Error Codes
Specifically, I put information about the system error code lookup tool and links to Microsoft's documentation.
2024-04-05 13:39:14 -07:00
Erik Eckstein
04a6bbbb7a docs: add documentation for the -sil-pass-count-config-file option in DebuggingTheCompiler
Also, add this option in swift-autocomplete.bash.
Unrelated: support aliased commands in swift-autocomplete.bash
2024-01-11 11:10:05 +01:00
Anthony Latsis
82ac9328ae [NFC] CS: Misc minor debug output tweaks
* Use fancy arrows (`→`) because they are distinct from and shorter than `->`,
  and fancier.
* We have two ways of demarcating locators: `@ <locator>` and `[[<locator>]];`.
  Stick to the first, which is shorter and clearer.
* 'attempting type variable' → 'attempting binding'. *Bindings* are attempted,
  not type variables.
* `considering ->` → `considering:`. I think a colon is semantically more fit
  and makes things easier to read if the considered constraint has arrows in its
  description or types. It’s also shorter this way.
2023-04-18 22:42:59 +03:00
Amritpan Kaur
7ed3763503 Update Type Checker output example. 2022-09-14 20:32:56 -07:00
Josh Soref
0213f2dd88 Spelling docs (#42437)
* spelling: any

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: associated

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: async

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: classes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: clonability

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: conspicuously

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: constituent

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: constraint

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: contains

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: definition

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: digestible

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: for

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: github

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: javascript

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: manually

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: much

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: multi

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: occasionally

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: outputs

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: overriding

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: partition

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: propagation

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: protocol

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: quandary

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: redundant

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: responsible

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: right

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: specifically

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: suppose

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: that

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: the

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: with

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2022-04-19 14:04:59 -07:00
Luciano Almeida
ed7981f9a6 [Docs] Update section about integrated repl that was removed in Debugging the compiler docs file 2022-04-11 16:29:26 -03:00
Erik Eckstein
8fe36eedd8 SILPassManager: improve bisecting for debugging the optimizer
* Add the possibility to bisect the individual transforms of SILCombine and SimplifyCFG.
   To do so, the `-sil-opt-pass-count` option now accepts the format `<n>.<m>`, where `m` is the sub-pass number.
   The sub-pass number limits the number of individual transforms in SILCombine or SimplifyCFG.

* Add an option `-sil-print-last` to print the SIL of the currently optimized function before and after the last pass, which is specified with `-sil-opt-pass-count`.
2022-02-09 13:25:30 +01:00
Philip Turner
d0258c6677 Another small fix 2022-01-16 14:40:44 -05:00
Keith Smiley
75ccc66b9d Add note about --match-timestamp for bisects 2021-09-09 14:21:44 -07:00
Ikko Ashimine
6105452b9a [docs] Fix typo in DebuggingTheCompiler.md
preceeding -> preceding
2021-07-02 18:26:45 +09:00
Min-Yih Hsu
d00a6cc0e3 [SIL][Frontend] Simplify debug info generation flow for SIL files
- If any of the `-g<kind>` flag is given -- except `-gnone`, debug
   info will be printed into every generated SIL files.
 - The `-gsil` is deprecated in favor of `-sil-based-debuginfo`. The
   SILDebugInfoGenerator Pass now generates intermediate SIL file with
   name "<output file>.sil_dbg_<n>.sil". Other functionalities of that
   Pass remain the same.
2021-06-30 17:21:58 -07:00
Artem Chikin
ae2e856f9b Revert "Merge pull request #37114 from apple/revert-36377-NewDriverDefault"
This reverts commit 937e1a365c, reversing
changes made to a5440a8abd.
2021-04-28 15:11:36 -07:00
Artem Chikin
1e44ed00eb Revert "Always build SwiftDriver and use it as default compiler driver" 2021-04-28 11:20:21 -07:00
Artem Chikin
60a4af3dcc Add documentation about the compiler's standalone driver and its build procedure. 2021-04-26 12:17:56 -07:00
Varun Gandhi
a2cb5a8146 Merge pull request #35639 from varungandhi-apple/vg-doc-asm-obj-debugging
[docs] Document tips for debugging assembly & object code.
2021-03-22 18:36:58 -07:00
Varun Gandhi
7dcaf5ceb3 [docs] Mention useful debugging tools with short blurbs about usage.
Based on Dave Lee's suggestion in:
https://github.com/apple/swift/pull/35639#pullrequestreview-579556113
2021-03-22 14:59:39 -07:00
Varun Gandhi
bd93de8e2b [docs] Document tips for debugging assembly & object code. 2021-03-05 14:15:52 -08:00
Ikko Ashimine
bf2afe0b26 [docs] Fix typo in DebuggingTheCompiler.md
specfied -> specified
2021-02-27 17:33:24 +09:00
Erik Eckstein
ee5491a7c9 PassManager: simplify the options to print intermediate SIL.
* rename -sil-print-only-function to -sil-print-function and -sil-print-only-functions to -sil-print-functions
* to print single functions, don't require -Xllvm -sil-print-all. It's now sufficient to use e.g. -Xllvm -sil-print-function=<f>
But it's still possible to select functions with -sil-print-function(s) for other print options, -sil-print-after.
2021-02-09 09:12:06 +01:00
Slava Pestov
c997016bc6 Update some docs to talk about 'main' instead of 'master'
Fixes https://bugs.swift.org/browse/SR-14015 / rdar://problem/72819056
2021-01-11 22:57:51 -05:00
Max Desiatov
33bc25be80 Fix remaining hardcoded references to x86_64 2020-12-08 17:12:23 +00:00
Michael Gottesman
e7761cf997 [DebuggingTheCompiler] Document a few flags for dumping llvm-ir.
I needed to use these and realized they were not documented here. I had them in
my brain, but others may not, so seemed good to do.
2020-10-05 11:27:56 -05:00
Miller
88c82f477f change bash to sh
this code blocks don't have anything specific to bash.
2020-06-02 04:58:33 +06:00
swift-ci
4b7b78d33c Merge pull request #31636 from mikeash/add-debugging-tips 2020-05-10 15:56:45 -07:00
Mike Ash
d50a3f17de [docs] Add some memory inspection tips to DebuggingTheCompiler.md.
Add a section about viewing allocation history and reference info about a pointer, and a section about using the lldb `x` command.
2020-05-08 09:36:56 -04:00
Ben Rimmington
55fa3871df [docs] Update DebuggingTheCompiler.md 2020-05-08 03:36:31 +01:00
Michael Gottesman
8e31f37d60 [docs] Add a table of contents to DebuggingTheCompiler.md and re-organize slightly the layout to make things clearer.
I also improved some titles.
2020-05-07 12:31:45 -07:00
Robert Widmann
1d5d0d2187 De-RST DebuggingTheCompiler 2020-05-02 05:22:04 -07:00