On AIX, the default debugger is dbx so it is not necessary to explicitly set -debugger-tuning=dbx in the presence of -g.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Driver/ToolChains/AIX.h | ||
---|---|---|
91 | This sounds not right. Omitting -debugger-tuning=dbx does not mean we will change the default tuning debugger on AIX, right? i.e. DBX is still the default debugger on AIX no matter in the clang fe or llvm be. We should just be able to do some customization when we call RenderDebugEnablingArgs for AIX in https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Clang.cpp#L4367-L4368 |
LGTM except one minor in the testcase.
Thanks for adding this improvement.
clang/test/Driver/debug-options.c | ||
---|---|---|
121 | nit: we can check that no -debugger-tuning= is emitted by check G_NOTUNING |
clang/test/Driver/debug-options.c | ||
---|---|---|
121 | Ah thanks for catching this! Fixed. |
clang/lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
4373 | Seems like you should be able to return DebuggerKind::Default from getDefaultDebuggerTuning then you wouldn't need this complication? |
clang/lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
4373 | Ah thanks for the suggestion! We looked into an approach along this line in an earlier version (see https://reviews.llvm.org/D136187?id=468626), but it seemed that modifying the AIX default was not ideal. There are two drawbacks.
Therefore we ended up with this local change. That said, I am all ears for different ways to avoid the complication. |
This sounds not right. Omitting -debugger-tuning=dbx does not mean we will change the default tuning debugger on AIX, right? i.e. DBX is still the default debugger on AIX no matter in the clang fe or llvm be.
We should just be able to do some customization when we call RenderDebugEnablingArgs for AIX in https://github.com/llvm/llvm-project/blob/main/clang/lib/Driver/ToolChains/Clang.cpp#L4367-L4368