This commit is contained in:
Antoni Boucher 2023-01-03 08:56:00 -05:00
parent b0cf0e8c06
commit 71d7e561bd
2 changed files with 18 additions and 0 deletions

View File

@ -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`).

View File

@ -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.