diff options
| author | Antoni Boucher <bouanto@zoho.com> | 2023-01-03 08:56:00 -0500 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2023-01-03 08:56:00 -0500 |
| commit | 71d7e561bdc2e58cef7fedcec1970dafc852bb61 (patch) | |
| tree | af5eb69a6175d418b18f8d85bc751b18c9cc62c8 | |
| parent | b0cf0e8c0653aab2c89de7b5e1ef34a24bf8ea80 (diff) | |
| download | rust-71d7e561bdc2e58cef7fedcec1970dafc852bb61.tar.gz rust-71d7e561bdc2e58cef7fedcec1970dafc852bb61.zip | |
Comment
| -rw-r--r-- | Readme.md | 10 | ||||
| -rw-r--r-- | src/builder.rs | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Readme.md b/Readme.md index a74750228ba..e9c719d8472 100644 --- a/Readme.md +++ b/Readme.md @@ -172,6 +172,16 @@ debug_gimple_stmt(gimple_struct) To get the `rustc` command to run in `gdb`, add the `--verbose` flag to `cargo build`. +To have the correct file paths in `gdb` instead of `/usr/src/debug/gcc/libstdc++-v3/libsupc++/eh_personality.cc`, TODO + +Maybe by calling the following at the beginning of gdb: + +``` +set substitute-path /usr/src/debug/gcc /home/bouanto/Ordinateur/Programmation/Projets/gcc-repo/gcc +``` + +TODO: but that's not what I remember I was doing. + ### How to use a custom-build rustc * Build the stage2 compiler (`rustup toolchain link debug-current build/x86_64-unknown-linux-gnu/stage2`). diff --git a/src/builder.rs b/src/builder.rs index 082b7be8c4e..fd674ed0b87 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -1210,6 +1210,14 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> { fn cleanup_landing_pad(&mut self, _ty: Type<'gcc>, pers_fn: RValue<'gcc>) -> RValue<'gcc> { self.set_personality_fn(pers_fn); + /* + * Matching GCC exception handling with LLVM: + * + * GCC LLVM + * CATCH_EXPR landing pad catch clause + * TRY_FINALLY_EXPR cleanup + */ + self.cleanup_blocks.borrow_mut().insert(self.block); // FIXME: we're probably not creating a real cleanup pad here. |
