Skip to content

Commit 71d7e56

Browse files
committed
Comment
1 parent b0cf0e8 commit 71d7e56

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

Readme.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,16 @@ debug_gimple_stmt(gimple_struct)
172172
173173
To get the `rustc` command to run in `gdb`, add the `--verbose` flag to `cargo build`.
174174
175+
To have the correct file paths in `gdb` instead of `/usr/src/debug/gcc/libstdc++-v3/libsupc++/eh_personality.cc`, TODO
176+
177+
Maybe by calling the following at the beginning of gdb:
178+
179+
```
180+
set substitute-path /usr/src/debug/gcc /home/bouanto/Ordinateur/Programmation/Projets/gcc-repo/gcc
181+
```
182+
183+
TODO: but that's not what I remember I was doing.
184+
175185
### How to use a custom-build rustc
176186
177187
* Build the stage2 compiler (`rustup toolchain link debug-current build/x86_64-unknown-linux-gnu/stage2`).

src/builder.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,14 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
12101210
fn cleanup_landing_pad(&mut self, _ty: Type<'gcc>, pers_fn: RValue<'gcc>) -> RValue<'gcc> {
12111211
self.set_personality_fn(pers_fn);
12121212

1213+
/*
1214+
* Matching GCC exception handling with LLVM:
1215+
*
1216+
* GCC LLVM
1217+
* CATCH_EXPR landing pad catch clause
1218+
* TRY_FINALLY_EXPR cleanup
1219+
*/
1220+
12131221
self.cleanup_blocks.borrow_mut().insert(self.block);
12141222

12151223
// FIXME: we're probably not creating a real cleanup pad here.

0 commit comments

Comments
 (0)