delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/26/01:25:52

Date: Sun, 25 Jan 1998 22:22:13 -0800 (PST)
Message-Id: <199801260622.WAA01602@adit.ap.net>
Mime-Version: 1.0
To: ernomat AT evitech DOT fi (Erno Tuomainen), djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Debugging with DJGPP

At 12:18  1/24/1998 GMT, Erno Tuomainen wrote:

> I had some problems when GDB couldn't find my *.CPP files, it tried
>to load *.CC files always. So I just had to rename the files to *.CC
>and it worked.
This is a known bug. The fix is to edit the `lib/specs' file, and add this text:
--cut--
.cpp:
cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
 %{C:%{!E:%eGNU C++ does not support -C without using -E}}\
 %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
 -undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\
 %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
 %c %{O*:%{!O0:-D__OPTIMIZE__}} %{traditional} %{ftraditional:-traditional}\
 %{traditional-cpp:-traditional} %{trigraphs}\
 %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
 %i %{!M:%{!MM:%{!E:%{!pipe:%g.ii}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |
%{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.ii} %1 %2\
 %{!Q:-quiet} -dumpbase %b.cpp %{d*} %{m*} %{a}\
 %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
 %{traditional} %{v:-version} %{pg:-p} %{p}\
 %{f*} %{+e*} %{aux-info*}\
 %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
 %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|
%{!S:as %a %Y\
 %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
 %{!pipe:%g.s} %A }}}}
--cut--

If you want some other extension to work for C++, add another copy of this
and replace the .cpp at the top line and the one after "-dumpbase" with the
other extension you want.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019