Stream: t-compiler/help

Topic: Attach GDB to test

achan1989 (Sep 09 2019 at 19:19, on Zulip):

Hello, I'm new to hacking on the compiler. I've got to the stage where I'm running test src/test/ui/whateverand trying to figure out why my change to the parser isn't working properly.

I thought it might be helpful to step through the parser while it's building one of the test source files. What's the best way to run an test under a debugger?

Vadim Petrochenkov (Sep 09 2019 at 20:36, on Zulip):

I usually do something like gdb --args ./build/x86_64-pc-windows-gnu/stage1/bin/rustc src/test/ui/, but that becomes more annoying when there are dependencies in auxiliary, so integrating that into test would be really great.

Santiago Pastorino (Sep 09 2019 at 20:38, on Zulip):

btw, I wonder if this is explained on rustc-guide, because otherwise seems like an interesting thing to explain

achan1989 (Sep 09 2019 at 20:49, on Zulip):

As far as I could see, the rustc-guide only mentions using backtraces or debug logging.

Santiago Pastorino (Sep 09 2019 at 20:55, on Zulip): :)

Last update: Sep 18 2020 at 19:45UTC