This is the mail archive of the gdb@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]

Re: [RFC] Signed/unsigned character arrays are not strings


 > > Which GDB behavior is better is a matter of how often each one is
 > > convenient and how often it causes trouble.  I don't know enough to
 > > have an opinion about that, but if neither one is clearly better
 > > overall, it would be best to leave GDB the way it was.
 > 
 > For myself, I think the new behavior is clearly better overall, and
 > that relatively few packages rely on sign-specified character types
 > for strings; that's why I approved Jan's patch.  I even proposed an
 > extension that I would find even more useful, to suppress the
 > single-quoted characters for arrays of signed or unsigned byte
 > variables.  (No one's commented on that; I'll wait until we decide
 > about this one first.)
 > 
 > Do you think that Emacs's behavior - an important GNU application, but
 > only one - changes the overall situation?  I don't, and I am generally
 > opposed to backing this change out.  

I'm not sure who you are addressing, but I don't think anyone is saying
Emacs changes the overall situation.

 >                                      I believe there are more
 > applications which use single byte arrays for numerical data than for
 > character data.  

That answers the question that we are really asking and justifies the patch.

 >                 We can document how to produce string output more
 > clearly in the manual, perhaps?

Yes I think that is important, especially for an incompatible change.

The following could also be updated in the manual:

         (gdb) print $xmm1
         $1 = {
           v4_float = {0, 3.43859137e-038, 1.54142831e-044, 1.821688e-044},
           v2_double = {9.92129282474342e-303, 2.7585945287983262e-313},
           v16_int8 = "\000\000\000\000\3706;\001\v\000\000\000\r\000\000",
           v8_int16 = {0, 0, 14072, 315, 11, 0, 13, 0},
           v4_int32 = {0, 20657912, 11, 13},
           v2_int64 = {88725056443645952, 55834574859},
           uint128 = 0x0000000d0000000b013b36f800000000
         }

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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