how can i get consumer-typeset exe in debug mode

Hi All,

I have made some changes in AArch64LoadStoreOptimizer.cpp file and with check-llvm all tests are passing successfully.

But in llvm-test suite some tests are failing, like consumer-typeset tests are failing.

Now I want to debug with ‘consumer-typeset’ exe from SANDBOX. But it is release build.

How can I debug this issue in this case and how can I get ‘consumer-typeset’ exe in debug mode?

Could any one please give your suggestions on this issue.

Thanks & Regards,

Ramakota Reddy.

Hi Ramakota,

You can get consumer-typeset in debug mode using the -g flag in Clang.

I don’t think this will necessarily help you a lot though. You’re debugging the compiler, not the consumer-typeset source code. Personally, I find the output assembly a bit more useful than actual test source information in this situation.

In situations like this, it’s probably better to see if you can find a SingleSource test failure. These are usually a bit easier to work with than large MultiSource tests. If there are no such failures, you can usually narrow things down by bisecting on object files.


1) Compile consumer-typeset with a good compiler
2) Compile consumer-typeset with the compiler you want to debug
3) Link half the object files from the good consumer-typeset with half the object files from the bad consumer-typeset
4) Run the test and see if it fails
5) Repeat until you (hopefully) find one file that causes the issue

From there, you’re usually in a much better position to start debugging the compiler.

- Jessica

Thanks Jessica.

With Regards,