This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/9580] printing negative values of constant values (withvalue 128-255)


http://sourceware.org/bugzilla/show_bug.cgi?id=9580

--- Comment #6 from John T. Kerich <john.t.kerich at nasa dot gov> 2011-08-10 16:15:35 UTC ---
P.S.
Compiling with the -gstabs+ fixes the problem, but there is a side effect in
valgrind tool.  The file/line numbers that normally are printed out on the
stack list disappear, so we really don't want to use it because you need to see
the line numbers to know what valgrind is talking about.  The other way is to
cast the variable for the gdb print command, ex. "print (int)y". It then prints
out 128 correctly, but then you need to know this is a const variable first.

John T. Kerich
Columbus Technologies and Services, Inc 
Nasa GSFC
Building 13 Room 141 Cube 4
8800 Greenbelt Road
Greenbelt, MD 20771
Tel. #: (301) 286-5138
Fax #: (301) 286-7475
Email:Âjohn.t.kerich@nasa.gov


-----Original Message-----
From: Kerich, John T. (GSFC-444.0)[COLUMBUS TECHNOLOGIES AND SERVICES INC] 
Sent: Wednesday, August 10, 2011 12:09 PM
To: 'tromey at redhat dot com'
Subject: RE: [Bug c++/9580] printing negative values of constant values (with
value 128-255)

I ran the readelf -wi testNeg > testNeg_readelf.txt, see attached.  Hope that
helps.

John T. Kerich
Columbus Technologies and Services, Inc Nasa GSFC Building 13 Room 141 Cube 4
8800 Greenbelt Road Greenbelt, MD 20771 Tel. #: (301) 286-5138 Fax #: (301)
286-7475
Email:Âjohn.t.kerich@nasa.gov

-----Original Message-----
From: tromey at redhat dot com [mailto:sourceware-bugzilla@sourceware.org]
Sent: Wednesday, August 10, 2011 12:04 PM
To: Kerich, John T. (GSFC-444.0)[COLUMBUS TECHNOLOGIES AND SERVICES INC]
Subject: [Bug c++/9580] printing negative values of constant values (with value
128-255)

http://sourceware.org/bugzilla/show_bug.cgi?id=9580

--- Comment #4 from Tom Tromey <tromey at redhat dot com> 2011-08-10 16:03:44
UTC --- I can't reproduce on my F15 box.

It is possible that the problem is in the compiler.
The output from "readelf -wi" on the executable would help diagnose that.
It is also possible that the bug was fixed in a more recent gdb.

--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: ------- You are on the CC list for
the bug.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]