www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/04/12:00:23

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "Michael Lazarev" <milaz AT newmail DOT ru>
Newsgroups: comp.os.msdos.djgpp
Subject: Debugging in RHIDE (1.4.9)
Date: Mon, 4 Feb 2002 19:48:17 +0300
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Original-NNTP-Posting-Host: 213.59.208.2
Message-ID: <3c5ebc9b@MAIL.mhogaming.com>
X-Original-Trace: 4 Feb 2002 09:53:47 -0700, 213.59.208.2
X-COMPLAINTS: Report abuse to abuse AT mhogaming DOT com
Lines: 87
Organization: Newshosting.com - Highest quality at a great price! www.newshosting.com
NNTP-Posting-Date: 04 Feb 2002 16:48:22 GMT
NNTP-Posting-Host: c7081d46.news.newshosting.com
X-Trace: DXC=TI;NMWcYMf\9W:n1hfXmNSX`1N4>^k1LSiF6BbIV4YYRnEaR^cOTQ`TZG2PBaPRI9Tm2lengNZCfUBOWBh AT 4SCJU\44h=O^TVnV
X-Complaints-To: abuse AT newshosting DOT com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi all. I am seeking for help in debugging C++ programs in RHIDE 1.4.9.
Yes, I read FAQ, and think that my case is not covered there.

The problem is debugging C++ programs, where classes used in main module are
brought into separate .h files, which also need debugging.
Of course, creating project doesn't help here, because there are one main
module, and all includes for it present in a project. So, i think, there is
no difference between single-module mode and project mode.

For exaple, task.cpp:
-----------------------------------------
#include "passwords.h"

int main(int argc, char *argv[])
{
 passwords p("c.in");
 return 0;
}
-----------------------------------------
And passwords.h:
-----------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef char* strng;

class passwords {
   public:
      passwords(const char*);
      ~passwords();

      void getMatchingPair(char*[4]);
    .....
}

passwords::passwords(const char* fn) {
.......  //some code here
}

//more code here
........

void getMatchingPair(char*[4]) {
..........  //code here
}
-----------------------------------------

If a program is a single .cpp, you do not need to do anything: just press
F7, F8, see watches, set breakpoints...
But in case described above, many things must be done, and they didn't solve
most problems.

First, I tried to use compiler options. Nor -g, neither -ggdb, even
not -gstabs helped.
Only when I set -gstabs+ in Options>Compiler Options, RHIDE called GCC in a
way to make .exe with suitable debugging information. It is possible to run
program step by step in this mode, and "tracing into" really traces contents
of a class member functions, but it is impossible to set a breakpoint in .h
file.

To be more exact, breakpoint is set, there is no warning that this line has
no debugging info, but program never stops on it.
Note that this line is reachable by tracing (step-by step execution).

Also, without rebuilding, randomly, after having finished program and
pressed F8 again, even no step-by-step execution happens, program "flies
away", gives out the result, and RHIDE reports program exit code 0.

In another randomly reproductable case RHIDE crashes. Some times it is Build
all, or Open project commands.

I use the following environment:
    bnu2112, djdev203, gcc303, gpp303, mak3791, rhid149, txi40
on Win 4.10.1998, at PII 233 with 288Mb RAM.

I don't use any -O and any other optimizations.
Can anybody tell me what happens and is there any solution of my problem?


Michael Lazarev

milaz AT newmail DOT ru




- Raw text -


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