DILocation's column is always zero


Hi there,

I do some fun stuff with LLVM IR generated by the rust compiler, and I see that all the DILocations miss information about a column.

I found the code https://github.com/rust-lang/rust/blob/bb26aadaf3497089e9264266455d1c53391a41c0/src/librustc_trans/trans/debuginfo/mod.rs#L1524 I traced the source code back and found where it comes from https://github.com/rust-lang/rust/commit/40e05413096bbd5f35e566e796f525742076600f

I am curious: what’s the reasoning behind resetting of a column information? I read commit message, but still can’t get it.

Also, the comment there is misleading. I’m not sure about GCC, but DILocations produced by Clang have the correct column information attached.

Anyways, how one would get this information?

Thank you for understanding. Cheers, Alex.


@michaelwoerister might know something about it, they’re responsible for the vast majority of our debuginfo support.


Gentle ping :slight_smile:


We had column information available until we ran into some issues, at which point we discovered that Clang had it disabled, so we did that too. That was years ago though, so the underlying issue might long be fixed in LLVM.


@michaelwoerister thanks for the answer. What can we do to make sure that those issues went away?

We are happy to send a patch for this so what would you recommend to ensure?



@stanislaw: Ideally, we’d want to make sure that such Rust binaries do not cause problems for GDB and LLDB on Tier-1 platforms. For Linux this means whatever version is the default for popular distros (including LTS releases).


If a modified compiler passes the existing test suite in src/test/debuginfo, that would be a good indication that things still work.


FWIW gdb’s DWARF reader ignores DW_AT_decl_column and DW_AT_call_column. So, at least for gdb, there’s nothing to do.