[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::axp-developer

Title:Alpha Developer Support
Notice:[email protected], 800-332-4786
Moderator:HYDRA::SYSTEM
Created:Mon Jun 06 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3722
Total number of notes:11359

3207.0. " Manugistics" by HYDRA::AXPDEVELOPER (Alpha Developer support) Mon Feb 17 1997 11:03

    Company Name :   Manugistics
    Contact Name :  Ganesh
    Phone        :  301 984 5389
    Fax          :  
    Email        :  
    Date/Time in :  17-FEB-1997 10:59:29
    Entered by   :  Marvin Davis
    SPE center   :  MRO

    Category     :  UNIX
    OS Version   :  V3.2D-1 (Rev 41)
    System H/W   :  


    Brief Description of Problem:
    -----------------------------
He is having trouble using dbx on c++ programs. He is getting a segmentation
fault. I suggested he use ladebug which is intalled on his system.
He will try this and call if he still has a problem.

Marvin

T.RTitleUserPersonal
Name
DateLines
3207.1HYDRA::AXPDEVELOPERAlpha Developer supportFri Feb 21 1997 10:041
[email protected]
3207.2HYDRA::AXPDEVELOPERAlpha Developer supportFri Feb 21 1997 18:31121
To: [email protected]
Cc: [email protected], [email protected]
Subject: dbx problems, note 3207 
Date: Fri, 21 Feb 97 18:27:43 -0500
From: Gerrit Saylor <saylor>
X-Mts: smtp

Hello,

Sorry for not getting back to you earlier today, as I was not able 
sit down and take a look at this until this evening (too many calls).
I ran a simple c++ program which makes use of a very simple class:

#include <iostream.h>

class Foo {

public:

Foo();
int getit();
void reduce();

private:

int i;

};
Foo::Foo() {

i = 256;

}

void Foo::reduce() {

i--;
return;
}

int Foo::getit() {

return i;

}

main() {

Foo f;

int i;

cout << "Beginning" << endl;

f.reduce();
i = f.getit();

cout << i << endl;
cout << "End" << endl;
}



I compiled this on both Digital Unix v3.2c and v4.0a using -g (cxx -g tmp.cxx).
I then ran dbx (3.11.8 on v3.2c and 3.11.10 on v4.0a), and here is my output:

3.11.8:
fluid.mro.dec.com> dbx a.out
dbx version 3.11.8
Type 'help' for help.

main:  36  Foo f;
(dbx) stop in main
[2] stop in main
(dbx) run
[2] stopped at   [main:36 ,0x120001bb0]         Foo f;
(dbx) where
>  0 main() ["tmp20.cxx":36, 0x120001bb0]
(dbx) dump
main() ["tmp20.cxx":36, 0x120001bb0]
f = 
DBX Fault: Segmentation fault

(dbx) printf "%x",f

DBX Fault: Segmentation fault
(dbx) 



3.11.10:

sdcc3.mro.dec.com> dbx a.out
dbx version 3.11.10
Type 'help' for help.

main:  36  Foo f;
(dbx) stop in main
[2] stop in main
(dbx) run
[2] stopped at   [main:36 ,0x120001bb0]         Foo f;
(dbx) where
>  0 main() ["tmp20.cxx":36, 0x120001bb0]
(dbx) dump
main() ["tmp20.cxx":36, 0x120001bb0]
f = @1400712e0
i = -2146941427
(dbx) printf "%x", f
400712e0
(dbx) 


Therefore I assume that your problem is a result of not having the latest
and greatest (since the debuggers have been known to be REALLY bad
when working with C++).  I cannot vouch for complex debugging, but the trivial
case demonstrates the difference a new version makes.  I hope this
clears things up for you a little.

Gerrit Saylor
Alpha Developer Support