clang and the debugger

Post Reply

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

clang and the debugger

Post by mberryman » Wed Dec 27, 2023 1:18 pm

When I attempt to debug code compiled with clang, the debugger does not recognize the language of the program and does not display source lines. Is there something I need to be doing or is the necessary support not yet included? The command line I am using is simply:
clang -pointer-size=argv64 --param=ssp-buffer-size=4 -O0 -g -fno-strict-aliasing -include <some file> -o ...

Example output:
OpenVMS x86-64 Debug64 Version V9.2-008

%DEBUG-I-INITIAL, Language: UNKNOWN, Module: MAIN
%DEBUG-I-NOTATMAIN, Type GO to reach MAIN program

DBG> set lang c++
DBG> go
break at main+48
DBG> set module jackets
DBG> set break jacket_open
DBG> go
%DEBUG-I-DYNLNGSET, setting language C
break at routine JACKETS\jacket_open
%DEBUG-W-UNAOPNSRC, unable to open source file
-RMS-F-SYN, file specification syntax error
150: Source line not available


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

Re: clang and the debugger

Post by jreagan » Thu Dec 28, 2023 10:42 am

I think the "not recognized language is fixed in the upcoming V9.2-2 debugger but there might be some "line 0"s in the debug line table. clang/LLVM produces them for lines that don't map to source/listing lines, but our tools (TRACEBACK, DEBUG, etc.) get confused by them.

As for the "invalid file specification", is that really in a C module? Not a C++ module?

I'd like to see a bug report. Either provide the JACKETS object module or at least the output from ANALZYE/OBJECT/SECTION=DEBUG=(INFO,LINE)


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

Re: clang and the debugger

Post by mberryman » Fri Dec 29, 2023 11:17 am

It seems to happen at any breakpoint, for both C or C++ modules. I will submit a bug report.

Post Reply