* mingw --enable-tui
@ 2020-11-22 11:44 gmail Vladimir Koković
2020-11-22 12:13 ` gmail Vladimir Koković
2020-11-22 15:31 ` Eli Zaretskii
0 siblings, 2 replies; 10+ messages in thread
From: gmail Vladimir Koković @ 2020-11-22 11:44 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 185 bytes --]
Hi,
I managed to make mingw cross build 32 and 64, but I had to change
gdb/tui//tui-win.c because of mingw64.
Vladimir Koković, DP senior(70),
Serbia, Belgrade, 22.November 2020
[-- Attachment #2: tui-win-c.patch --]
[-- Type: text/x-patch, Size: 948 bytes --]
# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- a/tui-win.c
+++ b/tui-win.c
@@ -118,6 +118,17 @@
The list of values must be terminated by a NULL.
After the NULL value, an entry defines the default. */
static struct tui_translate tui_border_mode_translate[] = {
+#ifdef __MINGW64__
+ { "normal", (int)A_NORMAL },
+ { "standout", (int)A_STANDOUT },
+ { "reverse", (int)A_REVERSE },
+ { "half", (int)A_DIM },
+ { "half-standout", (int)A_DIM | (int)A_STANDOUT },
+ { "bold", (int)A_BOLD },
+ { "bold-standout", (int)A_BOLD | (int)A_STANDOUT },
+ { 0, 0 },
+ { "normal", (int)A_NORMAL }
+#else
{ "normal", A_NORMAL },
{ "standout", A_STANDOUT },
{ "reverse", A_REVERSE },
@@ -127,6 +138,7 @@
{ "bold-standout", A_BOLD | A_STANDOUT },
{ 0, 0 },
{ "normal", A_NORMAL }
+#endif
};
/* Translation tables for border-kind, one for each border
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mingw --enable-tui
2020-11-22 11:44 mingw --enable-tui gmail Vladimir Koković
@ 2020-11-22 12:13 ` gmail Vladimir Koković
2020-11-22 15:31 ` Eli Zaretskii
1 sibling, 0 replies; 10+ messages in thread
From: gmail Vladimir Koković @ 2020-11-22 12:13 UTC (permalink / raw)
To: gdb-patches
I forgot to say with --with-curses and --enable-tui.
On 22.11.20. 12:44, gmail Vladimir Koković wrote:
>
> Hi,
>
> I managed to make mingw cross build 32 and 64, but I had to change
> gdb/tui//tui-win.c because of mingw64.
>
>
> Vladimir Koković, DP senior(70),
> Serbia, Belgrade, 22.November 2020
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mingw --enable-tui
2020-11-22 11:44 mingw --enable-tui gmail Vladimir Koković
2020-11-22 12:13 ` gmail Vladimir Koković
@ 2020-11-22 15:31 ` Eli Zaretskii
2020-11-22 16:19 ` gmail Vladimir Koković
1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2020-11-22 15:31 UTC (permalink / raw)
To: gmail Vladimir Koković; +Cc: gdb-patches
> Date: Sun, 22 Nov 2020 12:44:56 +0100
> From: gmail Vladimir Koković via Gdb-patches
> <gdb-patches@sourceware.org>
>
> I managed to make mingw cross build 32 and 64, but I had to change
> gdb/tui//tui-win.c because of mingw64.
Can you tell what was the problem you saw without that change?
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mingw --enable-tui
2020-11-22 15:31 ` Eli Zaretskii
@ 2020-11-22 16:19 ` gmail Vladimir Koković
2020-11-22 16:23 ` Eli Zaretskii
2020-11-22 17:20 ` Tom Tromey
0 siblings, 2 replies; 10+ messages in thread
From: gmail Vladimir Koković @ 2020-11-22 16:19 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
Hi,
checking build system type... x86_64-pc-linux-gnu
checking host system type... i686-w64-mingw32
checking target system type... i686-w64-mingw32
make[1]: Entering directory
'/home/vlada/AUR/mingw-w64-gdb/mingw-w64-gdb/vk/build-i686-w64-mingw32'
...
CXX tui/tui-regs.o
CXX tui/tui-source.o
CXX tui/tui-stack.o
CXX tui/tui-win.o
CXX tui/tui-wingeneral.o
CXX tui/tui-winsource.o
CXX tui/tui.o
...
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-w64-mingw32
checking target system type... x86_64-w64-mingw32
...
CXX tui/tui-regs.o
CXX tui/tui-source.o
CXX tui/tui-stack.o
CXX tui/tui-win.o
CXX tui/tui-wingeneral.o
CXX tui/tui-winsource.o
CXX tui/tui.o
../../../src/gdb-10.1/gdb/tui/tui-win.c:130:1: error: narrowing
conversion of ‘2147483648’ from ‘chtype’ {aka ‘long long unsigned int’}
to ‘int’ [-Wnarrowing]
130 | };
| ^
../../../src/gdb-10.1/gdb/tui/tui-win.c:130:1: error: narrowing
conversion of ‘2483027968’ from ‘chtype’ {aka ‘long long unsigned int’}
to ‘int’ [-Wnarrowing]
make[2]: *** [Makefile:1614: tui/tui-win.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory
'/home/vlada/AUR/mingw-w64-gdb/mingw-w64-gdb/vk/build-x86_64-w64-mingw32/gdb'
make[1]: *** [Makefile:10078: all-gdb] Error 2
make[1]: Leaving directory
'/home/vlada/AUR/mingw-w64-gdb/mingw-w64-gdb/vk/build-x86_64-w64-mingw32'
make: *** [Makefile:866: all] Error 2
On 22.11.20. 16:31, Eli Zaretskii wrote:
>> Date: Sun, 22 Nov 2020 12:44:56 +0100
>> From: gmail Vladimir Koković via Gdb-patches
>> <gdb-patches@sourceware.org>
>>
>> I managed to make mingw cross build 32 and 64, but I had to change
>> gdb/tui//tui-win.c because of mingw64.
> Can you tell what was the problem you saw without that change?
>
> Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mingw --enable-tui
2020-11-22 16:19 ` gmail Vladimir Koković
@ 2020-11-22 16:23 ` Eli Zaretskii
2020-11-22 16:35 ` gmail Vladimir Koković
2020-11-22 17:20 ` Tom Tromey
1 sibling, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2020-11-22 16:23 UTC (permalink / raw)
To: gmail Vladimir Koković; +Cc: gdb-patches
> Cc: gdb-patches@sourceware.org
> From: gmail Vladimir Koković <vladimir.kokovic@gmail.com>
> Date: Sun, 22 Nov 2020 17:19:49 +0100
>
> CXX tui/tui.o
> ../../../src/gdb-10.1/gdb/tui/tui-win.c:130:1: error: narrowing
> conversion of ‘2147483648’ from ‘chtype’ {aka ‘long long unsigned int’}
> to ‘int’ [-Wnarrowing]
> 130 | };
> | ^
> ../../../src/gdb-10.1/gdb/tui/tui-win.c:130:1: error: narrowing
> conversion of ‘2483027968’ from ‘chtype’ {aka ‘long long unsigned int’}
> to ‘int’ [-Wnarrowing]
So in the ncurses headers you used A_NORMAL etc, are declared 'chtype'
(or long long unsigned int), is that right?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mingw --enable-tui
2020-11-22 16:23 ` Eli Zaretskii
@ 2020-11-22 16:35 ` gmail Vladimir Koković
2020-11-22 16:55 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: gmail Vladimir Koković @ 2020-11-22 16:35 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1237 bytes --]
HI,
For mingw, pdcurses is used, not ncurses.
pdcurses curses.h:
#if defined( CHTYPE_32)
#if defined( CHTYPE_64)
#error CHTYPE cannot be both CHTYPE_32 and CHTYPE_64
#endif
typedef uint32_t chtype; /* chtypes will be 32 bits */
#else
#define CHTYPE_64
typedef uint64_t chtype; /* chtypes will be 64 bits */
#ifdef PDC_WIDE
#define USING_COMBINING_CHARACTER_SCHEME
#endif
#endif
Attached is my build script.
On 22.11.20. 17:23, Eli Zaretskii wrote:
>> Cc: gdb-patches@sourceware.org
>> From: gmail Vladimir Koković <vladimir.kokovic@gmail.com>
>> Date: Sun, 22 Nov 2020 17:19:49 +0100
>>
>> CXX tui/tui.o
>> ../../../src/gdb-10.1/gdb/tui/tui-win.c:130:1: error: narrowing
>> conversion of ‘2147483648’ from ‘chtype’ {aka ‘long long unsigned int’}
>> to ‘int’ [-Wnarrowing]
>> 130 | };
>> | ^
>> ../../../src/gdb-10.1/gdb/tui/tui-win.c:130:1: error: narrowing
>> conversion of ‘2483027968’ from ‘chtype’ {aka ‘long long unsigned int’}
>> to ‘int’ [-Wnarrowing]
> So in the ncurses headers you used A_NORMAL etc, are declared 'chtype'
> (or long long unsigned int), is that right?
[-- Attachment #2: vk-build.sh --]
[-- Type: application/x-shellscript, Size: 1945 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mingw --enable-tui
2020-11-22 16:35 ` gmail Vladimir Koković
@ 2020-11-22 16:55 ` Eli Zaretskii
2020-11-22 17:06 ` gmail Vladimir Koković
0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2020-11-22 16:55 UTC (permalink / raw)
To: gmail Vladimir Koković; +Cc: gdb-patches
> Cc: gdb-patches@sourceware.org
> From: gmail Vladimir Koković <vladimir.kokovic@gmail.com>
> Date: Sun, 22 Nov 2020 17:35:03 +0100
>
> For mingw, pdcurses is used, not ncurses.
>
> pdcurses curses.h:
>
> #if defined( CHTYPE_32)
> #if defined( CHTYPE_64)
> #error CHTYPE cannot be both CHTYPE_32 and CHTYPE_64
> #endif
> typedef uint32_t chtype; /* chtypes will be 32 bits */
> #else
> #define CHTYPE_64
> typedef uint64_t chtype; /* chtypes will be 64 bits */
> #ifdef PDC_WIDE
> #define USING_COMBINING_CHARACTER_SCHEME
> #endif
> #endif
Thanks, then I guess the condition should be for PDCurses, not
necessarily for MinGW64. I see no reason to assume that MinGW64 GDB
will always be built with PDCurses.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mingw --enable-tui
2020-11-22 16:55 ` Eli Zaretskii
@ 2020-11-22 17:06 ` gmail Vladimir Koković
0 siblings, 0 replies; 10+ messages in thread
From: gmail Vladimir Koković @ 2020-11-22 17:06 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
Hi,
I think it's about mingw64 and not curses.
If you look at the patch, the fix is only in adding cast (int) which
in my opinion belongs to the compiler.
On 22.11.20. 17:55, Eli Zaretskii wrote:
>> Cc: gdb-patches@sourceware.org
>> From: gmail Vladimir Koković <vladimir.kokovic@gmail.com>
>> Date: Sun, 22 Nov 2020 17:35:03 +0100
>>
>> For mingw, pdcurses is used, not ncurses.
>>
>> pdcurses curses.h:
>>
>> #if defined( CHTYPE_32)
>> #if defined( CHTYPE_64)
>> #error CHTYPE cannot be both CHTYPE_32 and CHTYPE_64
>> #endif
>> typedef uint32_t chtype; /* chtypes will be 32 bits */
>> #else
>> #define CHTYPE_64
>> typedef uint64_t chtype; /* chtypes will be 64 bits */
>> #ifdef PDC_WIDE
>> #define USING_COMBINING_CHARACTER_SCHEME
>> #endif
>> #endif
> Thanks, then I guess the condition should be for PDCurses, not
> necessarily for MinGW64. I see no reason to assume that MinGW64 GDB
> will always be built with PDCurses.
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mingw --enable-tui
2020-11-22 16:19 ` gmail Vladimir Koković
2020-11-22 16:23 ` Eli Zaretskii
@ 2020-11-22 17:20 ` Tom Tromey
2020-11-22 18:24 ` Eli Zaretskii
1 sibling, 1 reply; 10+ messages in thread
From: Tom Tromey @ 2020-11-22 17:20 UTC (permalink / raw)
To: gmail Vladimir Koković via Gdb-patches
Cc: Eli Zaretskii, gmail Vladimir Koković
>>>>> gmail Vladimir Koković via Gdb-patches <gdb-patches@sourceware.org> writes:
> ../../../src/gdb-10.1/gdb/tui/tui-win.c:130:1: error: narrowing
> conversion of ‘2147483648’ from ‘chtype’ {aka ‘long long unsigned
> int’} to ‘int’ [-Wnarrowing]
> 130 | };
> | ^
> ../../../src/gdb-10.1/gdb/tui/tui-win.c:130:1: error: narrowing
> conversion of ‘2483027968’ from ‘chtype’ {aka ‘long long unsigned
> int’} to ‘int’ [-Wnarrowing]
Would it work to change tui_translate so that "value" is "chtype"?
That would avoid #ifs and copying the code.
Tom
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: mingw --enable-tui
2020-11-22 17:20 ` Tom Tromey
@ 2020-11-22 18:24 ` Eli Zaretskii
0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2020-11-22 18:24 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches, vladimir.kokovic
> From: Tom Tromey <tom@tromey.com>
> Cc: Eli Zaretskii <eliz@gnu.org>, gmail Vladimir Koković
> <vladimir.kokovic@gmail.com>
> Date: Sun, 22 Nov 2020 10:20:22 -0700
>
> Would it work to change tui_translate so that "value" is "chtype"?
> That would avoid #ifs and copying the code.
If that works, it is definitely cleaner, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-11-22 18:24 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-22 11:44 mingw --enable-tui gmail Vladimir Koković
2020-11-22 12:13 ` gmail Vladimir Koković
2020-11-22 15:31 ` Eli Zaretskii
2020-11-22 16:19 ` gmail Vladimir Koković
2020-11-22 16:23 ` Eli Zaretskii
2020-11-22 16:35 ` gmail Vladimir Koković
2020-11-22 16:55 ` Eli Zaretskii
2020-11-22 17:06 ` gmail Vladimir Koković
2020-11-22 17:20 ` Tom Tromey
2020-11-22 18:24 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).