T.R | Title | User | Personal Name | Date | Lines |
---|
879.1 | | TLE::LUCIA | http://asaab.zko.dec.com/~lucia/biography.html | Tue Mar 11 1997 13:57 | 23 |
| Hmm. Works okay with cc -migrate -g on my 3.2 system. What is different? Can
you post an stdump of the .o file?
/local/lucia/scratch> ladebug a.out
Welcome to the Ladebug Debugger Version 4.0-30
------------------
object file name: a.out
Reading symbolic information ...done
(ladebug) list 1,100
1 main()
2 {
3 enum numbers {zero, one, two};
4
5 return 0;
6 }
(ladebug) whereis numbers
"mjh.c"`main`numbers
(ladebug) whatis numbers
enum numbers {zero, one, two}
(ladebug)
/local/lucia/scratch> uname -a
OSF1 savvy.zko.dec.com V3.2 148 alpha
/local/lucia/scratch>
|
879.2 | | TLE::LUCIA | http://asaab.zko.dec.com/~lucia/biography.html | Tue Mar 11 1997 13:58 | 7 |
| (I grant you "whatis" with qualification does not work)
(ladebug) whatis "mjh.c"`main`numbers
whatis "mjh.c"`main`numbers
^
Unable to parse input as legal command or C expression.
(ladebug)
|
879.3 | | CXXC::MJHANS | Matthew Hanselman, DEC C | Tue Mar 11 1997 14:43 | 22 |
| Ah. A difference between C and C++. I actually believe C++ is correct
here (I keyed my bug while using C++). Is C++ correct?
C generates information for "numbers" with a simple Block/End. C++
also includes a Tag. So it must be that Tag that's providing the extra
output.
This is also the case with classes, and other things with tags....
greping stdumps for numbers:
(C)
2. ( 2)( 0) numbers Block Info symref 7
6. ( 2)( 0) numbers End Info symref 2
(C++)
2. ( 2)( 0) numbers Tag Info [19] enum(extended file 0, index 3)
3. ( 2)( 0) numbers Block Info symref 8
7. ( 2)( 0) numbers End Info symref 3
- Matt
|
879.4 | | TLE::LUCIA | http://asaab.zko.dec.com/~lucia/biography.html | Tue Mar 11 1997 18:23 | 7 |
| Well you didn't say which compiler, and you personal name says "DEC C". I
initially typed "cxx ..." to compile it but did a double take.
Your explanation of the C++ behavior is correct. Which is right (c or c++) I
still am not sure.
Tim
|
879.5 | | CXXC::MJHANS | Matthew Hanselman, DEC C | Wed Mar 12 1997 08:09 | 11 |
| > Well you didn't say which compiler, and you personal name says "DEC C". I
> initially typed "cxx ..." to compile it but did a double take.
I've been working on C++ for the past couple of weeks. I pulled the
typical engineer's mistake of talking as if everything pertained
directly to my project. :)
I'll remember to include compiler directions in my examples from now
on.
- Matt
|