CXX/clang listing files

Post Reply

Topic author
mberryman
Active Contributor
Posts: 26
Joined: Sat Sep 02, 2023 1:31 pm
Reputation: 0
Location: Colorado Springs, CO, USA
Status: Offline

CXX/clang listing files

Post by mberryman » Thu Nov 30, 2023 7:05 pm

How close are the CXX/clang compilers to generating listing files? I've run into a problem that I do not know how to solve without a listing file. Specifically, the compiled module has some very strange (but legitimate) symbol references in it and I need to figure out what is creating them (so I can figure out how to resolve them).


jreagan
VSI Expert
Master
Posts: 133
Joined: Tue Dec 01, 2020 8:40 am
Reputation: 0
Status: Offline

Re: CXX/clang listing files

Post by jreagan » Mon Dec 04, 2023 9:22 am

Would the -E on the clang command line help? That's the closest you get right now

$ cxx/clang="-E" hw.cxx

or you can get the .s file (which has some symbolization compared to the ANAL/OBJ/DISA) with

$ cxx/clang="-S" hw.cxx

As for support in the compiler itself, you can imagine that no such concept exists in the clang sources. Listing files which combine sources, error message, optional header lines, optional macro expansion lines, etc. is a totally foreign concept. Most of the changes we've made to clang (including dual-size pointers) have leveraged some existing code in the frontend. Listing files is a blank sheet for us. That said, we're working on it with some early work but it is probably a month or two away.

Post Reply