Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: mathieu lacage <Mathieu.Lacage@sophia.inria.fr>
Cc: Nick Roberts <nickrob@snap.net.nz>,
	Daniel Jacobowitz <drow@false.org>,
	        gdb@sourceware.org
Subject: Re: [RFC] Signed/unsigned character arrays are not strings
Date: Mon, 26 Feb 2007 00:45:00 -0000	[thread overview]
Message-ID: <20070225195350.GA12811@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <1172390381.2584.18.camel@mathieu>

[-- Attachment #1: Type: text/plain, Size: 464 bytes --]

On Sun, 25 Feb 2007 08:59:41 +0100, mathieu lacage wrote:
...
> I don't know how useful that is to you but a lot of people (the first
> which comes to my mind is libxml2) decided to use "unsigned char *" to
> identify utf-8 encoded strings in C.

Together with the attached RMS's response I became more inclined to revert this
change and provide only "$xmm"-specific fix instead (probably for the GDB
int8_t/uint8_t internal types).

OK to submit the patch?


Jan

[-- Attachment #2: Type: message/rfc822, Size: 2450 bytes --]

From: Richard Stallman <rms@gnu.org>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: jan.kratochvil@redhat.com
Cc: bug-gdb@gnu.org
Subject: Re: Emacs .gdbinit incompatible with latest GDB
Date: Sun, 25 Feb 2007 14:30:23 -0500
Message-ID: <E1HLP4h-0003js-7j@fencepost.gnu.org>

    the recent GDB has problems running GDB `xbacktrace' on EMACS
    http://sources.redhat.com/ml/gdb/2007-02/msg00252.html

It seems clear why the change was made:

	On the other hand byte arrays become unreadable if printed as strings.

However, it seems that their hope this would not bother anyone was based
on an assumption which is inaccurate:

      I hope nobody uses sign-specification for 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.


[-- Attachment #3: Type: message/rfc822, Size: 2136 bytes --]

From: Richard Stallman <rms@gnu.org>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: jan.kratochvil@redhat.com, emacs-pretest-bug@gnu.org
Subject: Re: Emacs .gdbinit incompatible with latest GDB
Date: Sun, 25 Feb 2007 14:30:24 -0500
Message-ID: <E1HLP4i-0003k4-IF@fencepost.gnu.org>

    2000-01-04  Gerd Moellmann  <gerd@gnu.org>

	    * lisp.h (struct Lisp_String): Make DATA member `unsigned char *'.

    I guess the questions to ask are:

    1) Why was this change made?

Probably to make it easier to avoid incorrect conversions when
extracting elements.  We don't want to get negative numbers
for byte values above 127.

  reply	other threads:[~2007-02-25 19:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-24 16:13 Nick Roberts
2007-02-24 20:11 ` Daniel Jacobowitz
2007-02-24 20:53   ` Nick Roberts
2007-02-24 21:07     ` Jan Kratochvil
2007-02-25  8:00       ` Daniel Jacobowitz
2007-02-25 19:54         ` Nick Roberts
2007-02-25 21:07     ` mathieu lacage
2007-02-26  0:45       ` Jan Kratochvil [this message]
2007-02-27  7:17         ` Eli Zaretskii
2007-02-27  9:29         ` Daniel Jacobowitz
2007-02-27 12:02           ` Nick Roberts
2007-02-27 17:06             ` Robert Dewar
2007-02-27 18:42               ` Daniel Jacobowitz
2007-02-27 21:53                 ` Eli Zaretskii
2007-02-27 22:12                   ` Daniel Jacobowitz
2007-02-27 22:14                     ` Mark Kettenis
2007-02-28  0:47                       ` Paul Koning
2007-02-28  1:14                       ` Jim Blandy
2007-02-28  1:59                         ` Jim Blandy
2007-02-28  5:26                           ` Nick Roberts
2007-02-28 14:35                       ` Daniel Jacobowitz
2007-03-01  0:43                         ` Jim Blandy
2007-03-01  0:54                         ` Nick Roberts
2007-02-27 21:47               ` Eli Zaretskii
2007-02-27 22:12             ` Daniel Jacobowitz
2007-04-10 21:59         ` Daniel Jacobowitz
2007-02-28 13:05 pkoning
2007-03-01 11:01 ` Mark Kettenis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070225195350.GA12811@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=Mathieu.Lacage@sophia.inria.fr \
    --cc=drow@false.org \
    --cc=gdb@sourceware.org \
    --cc=nickrob@snap.net.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox