Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

How to include #include .h files in the listing

 
SOLVED
Go to solution
Dario Karlen
Frequent Advisor

How to include #include .h files in the listing

Hi all

I have got a problem with a C program and I would like to check a listing file to investigate where the program crashes exactly. I create a listing file with cc/lis filename. The listing file is generating but without the include files in the filename.c. Because the program crashes somewhere in an include file I need to include these #include filename.h files in the listing. How can I do that? Is there a suffix or something else? I know it from Fortran where it is possible with suffix /list or /nolist.
Thanks in advance.
4 REPLIES
Wim Van den Wyngaert
Honored Contributor
Solution

Re: How to include #include .h files in the listing

help cc/show

(the answer is /show=include)

Wim
Wim
Dario Karlen
Frequent Advisor

Re: How to include #include .h files in the listing

Thanks Wim, perfect. I searched the help but only in help cc/lis.
Hoff
Honored Contributor

Re: How to include #include .h files in the listing

Listing files? Why? That's work. Use the debugger. The debugger will take you right to the failing line, and knows how to display the source code.

If you really want to look at an application crash (since the listings files don't really tell you what is going on at the instruction that crashed, and optimization plays havoc with the view of the source code), here's how:

http://64.223.189.234/node/800

I'm not a big fan of any sort of substantial source code in an include file, either. I prefer to use an editor that can fold code, or to use source routines sans headers, or to use object libraries or shareable images.

Re: How to include #include .h files in the listing

>Hoff: I'm not a big fan of any sort of substantial source code in an include file

If you were using C++, you better expect massive amounts of inline functions and templates in headers.