Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Problems with recent GDB Cygwin builds
@ 2011-04-15 10:34 Pierre Muller
  2011-04-15 13:29 ` Pierre Muller
       [not found] ` <15303.5644245849$1302874163@news.gmane.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Pierre Muller @ 2011-04-15 10:34 UTC (permalink / raw)
  To: 'gdb'

Using recent Cygwin builds, either trunk or 7.3 branch,
I do get problems with iconv DLL.

  Typically, all string display fail.

Easiest way to check is 
compile new TRUNK gdb
go to build/gdb dir
prompt# ./gdb ./gdb

...
(top-gdb) print version
$1 =
(top-gdb)

while

prompt# ./gdb ./gdb

...
(top-gdb) p version
$1 = "7.2.90.20110414-cvs"
(top-gdb)

  Trying to debug this, I clearly see that iconv callsdo fail
iconv is a macro and really calls libiconv which is in cygiconv-2.dll
as $eax=-1 on return.

$ cygcheck.exe -s |grep iconv
  980k 2011/01/28 E:\cygwin-1.7\bin\cygiconv-2.dll
libiconv                       1.13.1-2            OK
libiconv2                      1.13.1-2            OK


  The problem seems to be that wchar_iterate returns 2 while
the expected result is 0 or 1.

  Mingw32 or mingw64 seem to work just fine.

Does anyone else have the same kind of troubles?

Pierre Muller.

PS: I tried to compile libiconv-1.13.1-2 but it seems to require me to
install
lots of stuff I don't have ...



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Problems with recent GDB Cygwin builds
  2011-04-15 10:34 Problems with recent GDB Cygwin builds Pierre Muller
@ 2011-04-15 13:29 ` Pierre Muller
       [not found] ` <15303.5644245849$1302874163@news.gmane.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2011-04-15 13:29 UTC (permalink / raw)
  To: 'gdb'

  I found out that the problem is related to the
fact that __STDC_ISO_10646__ is defined in:

$ grep -n ISO_10646  /usr/include/*/*
/usr/include/sys/features.h:185:#define __STDC_ISO_10646__ 200305L

because of this, GDB uses "UCS-4LE" 
for the macro INTERMEDIATE_ENCODING for Cygwin (while "wchar_t" is used for
mingw32).

Forcing "wchar_t" fixes the problem described below.

  The question is how to cope with this inside gdb sources.

Pierre

> -----Message d'origine-----
> De : gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la part
> de Pierre Muller
> Envoyé : vendredi 15 avril 2011 12:34
> À : 'gdb'
> Objet : Problems with recent GDB Cygwin builds
> 
> Using recent Cygwin builds, either trunk or 7.3 branch,
> I do get problems with iconv DLL.
> 
>   Typically, all string display fail.
> 
> Easiest way to check is
> compile new TRUNK gdb
> go to build/gdb dir
> prompt# ./gdb ./gdb
> 
> ...
> (top-gdb) print version
> $1 =
> (top-gdb)
> 
> while
> 
> prompt# ./gdb ./gdb
> 
> ...
> (top-gdb) p version
> $1 = "7.2.90.20110414-cvs"
> (top-gdb)
> 
>   Trying to debug this, I clearly see that iconv callsdo fail
> iconv is a macro and really calls libiconv which is in cygiconv-2.dll
> as $eax=-1 on return.
> 
> $ cygcheck.exe -s |grep iconv
>   980k 2011/01/28 E:\cygwin-1.7\bin\cygiconv-2.dll
> libiconv                       1.13.1-2            OK
> libiconv2                      1.13.1-2            OK
> 
> 
>   The problem seems to be that wchar_iterate returns 2 while
> the expected result is 0 or 1.
> 
>   Mingw32 or mingw64 seem to work just fine.
> 
> Does anyone else have the same kind of troubles?
> 
> Pierre Muller.
> 
> PS: I tried to compile libiconv-1.13.1-2 but it seems to require me to
> install
> lots of stuff I don't have ...
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problems with recent GDB Cygwin builds
       [not found] ` <15303.5644245849$1302874163@news.gmane.org>
@ 2011-04-15 15:38   ` Tom Tromey
  2011-04-15 15:59     ` Pierre Muller
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2011-04-15 15:38 UTC (permalink / raw)
  To: Pierre Muller; +Cc: 'gdb'

>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:

Pierre>   I found out that the problem is related to the
Pierre> fact that __STDC_ISO_10646__ is defined in:
Pierre> $ grep -n ISO_10646  /usr/include/*/*
Pierre> /usr/include/sys/features.h:185:#define __STDC_ISO_10646__ 200305L
Pierre> because of this, GDB uses "UCS-4LE" for the macro
Pierre> INTERMEDIATE_ENCODING for Cygwin (while "wchar_t" is used for
Pierre> mingw32).

Pierre> Forcing "wchar_t" fixes the problem described below.

Pierre>   The question is how to cope with this inside gdb sources.

Worst case, you can add __CYGWIN__ checking in gdb_wchar.h.

Looking at charset.c, I see some special code for the USE_WIN32API case.
Does the Cygwin port define this?  Maybe target-charset is wrong?

Tom


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Problems with recent GDB Cygwin builds
  2011-04-15 15:38   ` Tom Tromey
@ 2011-04-15 15:59     ` Pierre Muller
  0 siblings, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2011-04-15 15:59 UTC (permalink / raw)
  To: 'Tom Tromey'; +Cc: 'gdb'



> -----Message d'origine-----
> De : gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la part
> de Tom Tromey
> Envoyé : vendredi 15 avril 2011 17:37
> À : Pierre Muller
> Cc : 'gdb'
> Objet : Re: Problems with recent GDB Cygwin builds
> 
> >>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
writes:
> 
> Pierre>   I found out that the problem is related to the
> Pierre> fact that __STDC_ISO_10646__ is defined in:
> Pierre> $ grep -n ISO_10646  /usr/include/*/*
> Pierre> /usr/include/sys/features.h:185:#define __STDC_ISO_10646__ 200305L
> Pierre> because of this, GDB uses "UCS-4LE" for the macro
> Pierre> INTERMEDIATE_ENCODING for Cygwin (while "wchar_t" is used for
> Pierre> mingw32).
> 
> Pierre> Forcing "wchar_t" fixes the problem described below.
> 
> Pierre>   The question is how to cope with this inside gdb sources.
> 
> Worst case, you can add __CYGWIN__ checking in gdb_wchar.h.
 That is basically what I did in the patch sent (see below).
 
> Looking at charset.c, I see some special code for the USE_WIN32API case.
> Does the Cygwin port define this? 
No, this macro is not set for Cygwin.

> Maybe target-charset is wrong?

I proposed a patch on gdb-patches:
http://sourceware.org/ml/gdb-patches/2011-04/msg00225.html

Pierre


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-04-15 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-15 10:34 Problems with recent GDB Cygwin builds Pierre Muller
2011-04-15 13:29 ` Pierre Muller
     [not found] ` <15303.5644245849$1302874163@news.gmane.org>
2011-04-15 15:38   ` Tom Tromey
2011-04-15 15:59     ` Pierre Muller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox