* Build gdbtk-cmds.c get error
@ 2010-06-14 9:55 Hui Zhu
2010-06-17 2:18 ` Hui Zhu
0 siblings, 1 reply; 5+ messages in thread
From: Hui Zhu @ 2010-06-14 9:55 UTC (permalink / raw)
To: insight
gcc -g -O2 -I. -I../../src/gdb -I../../src/gdb/common
-I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\""
-DHAVE_CONFIG_H -I../../src/gdb/../include/opcode
-I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd
-I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber
-I../../src/gdb/../libdecnumber -I../../src/gdb/gnulib -Ignulib
-DMI_OUT=1 -DTUI=1 -DGDBTK -I/usr/include -I/usr/include -Wall
-Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
-Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function
-Wno-switch -Wno-char-subscripts -Werror -c -o gdbtk-cmds.o -MT
gdbtk-cmds.o -MMD -MP -MF .deps/gdbtk-cmds.Tpo
-I../../src/gdb/../libgui/src
-I/home/teawater/gdb/cvs/src/tcl/generic
-I/home/teawater/gdb/cvs/src/tk/generic
-DGDBTK_LIBRARY=\"/usr/local/share/insight1.0\"
-DSRC_DIR=\"/home/teawater/gdb/cvs/src/gdb\"
../../src/gdb/gdbtk/generic/gdbtk-cmds.c
cc1: warnings being treated as errors
../../src/gdb/gdbtk/generic/gdbtk-cmds.c: In function 'gdb_eval':
../../src/gdb/gdbtk/generic/gdbtk-cmds.c:643: error: passing argument
7 of 'val_print' from incompatible pointer type
../../src/gdb/value.h:671: note: expected 'const struct value *' but
argument is of type 'struct value_print_options *'
../../src/gdb/gdbtk/generic/gdbtk-cmds.c:643: error: passing argument
8 of 'val_print' from incompatible pointer type
../../src/gdb/value.h:671: note: expected 'const struct
value_print_options *' but argument is of type 'const struct
language_defn *'
../../src/gdb/gdbtk/generic/gdbtk-cmds.c:643: error: too few arguments
to function 'val_print'
make[2]: *** [gdbtk-cmds.o] Error 1
make[2]: Leaving directory `/home/teawater/gdb/cvs/bgdball/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/home/teawater/gdb/cvs/bgdball'
make: *** [all] Error 2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build gdbtk-cmds.c get error
2010-06-14 9:55 Build gdbtk-cmds.c get error Hui Zhu
@ 2010-06-17 2:18 ` Hui Zhu
2010-06-18 22:24 ` [OBV] Fix " Pierre Muller
[not found] ` <4426260533430796929@unknownmsgid>
0 siblings, 2 replies; 5+ messages in thread
From: Hui Zhu @ 2010-06-17 2:18 UTC (permalink / raw)
To: insight
Ping.
On Mon, Jun 14, 2010 at 17:55, Hui Zhu <teawater@gmail.com> wrote:
> gcc -g -O2 -I. -I../../src/gdb -I../../src/gdb/common
> -I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\""
> -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode
> -I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd
> -I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber
> -I../../src/gdb/../libdecnumber -I../../src/gdb/gnulib -Ignulib
> -DMI_OUT=1 -DTUI=1 -DGDBTK -I/usr/include -I/usr/include -Wall
> -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral
> -Wno-pointer-sign -Wno-unused -Wunused-value -Wunused-function
> -Wno-switch -Wno-char-subscripts -Werror -c -o gdbtk-cmds.o -MT
> gdbtk-cmds.o -MMD -MP -MF .deps/gdbtk-cmds.Tpo
> -I../../src/gdb/../libgui/src
> -I/home/teawater/gdb/cvs/src/tcl/generic
> -I/home/teawater/gdb/cvs/src/tk/generic
> -DGDBTK_LIBRARY=\"/usr/local/share/insight1.0\"
> -DSRC_DIR=\"/home/teawater/gdb/cvs/src/gdb\"
> ../../src/gdb/gdbtk/generic/gdbtk-cmds.c
> cc1: warnings being treated as errors
> ../../src/gdb/gdbtk/generic/gdbtk-cmds.c: In function 'gdb_eval':
> ../../src/gdb/gdbtk/generic/gdbtk-cmds.c:643: error: passing argument
> 7 of 'val_print' from incompatible pointer type
> ../../src/gdb/value.h:671: note: expected 'const struct value *' but
> argument is of type 'struct value_print_options *'
> ../../src/gdb/gdbtk/generic/gdbtk-cmds.c:643: error: passing argument
> 8 of 'val_print' from incompatible pointer type
> ../../src/gdb/value.h:671: note: expected 'const struct
> value_print_options *' but argument is of type 'const struct
> language_defn *'
> ../../src/gdb/gdbtk/generic/gdbtk-cmds.c:643: error: too few arguments
> to function 'val_print'
> make[2]: *** [gdbtk-cmds.o] Error 1
> make[2]: Leaving directory `/home/teawater/gdb/cvs/bgdball/gdb'
> make[1]: *** [all-gdb] Error 2
> make[1]: Leaving directory `/home/teawater/gdb/cvs/bgdball'
> make: *** [all] Error 2
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [OBV] Fix Build gdbtk-cmds.c get error
2010-06-17 2:18 ` Hui Zhu
@ 2010-06-18 22:24 ` Pierre Muller
2010-06-19 18:01 ` Keith Seitz
[not found] ` <4426260533430796929@unknownmsgid>
1 sibling, 1 reply; 5+ messages in thread
From: Pierre Muller @ 2010-06-18 22:24 UTC (permalink / raw)
To: 'Hui Zhu', insight; +Cc: 'Keith Seitz'
> -----Message d'origine-----
> De : insight-owner@sourceware.org [mailto:insight-owner@sourceware.org]
> De la part de Hui Zhu
> Envoyé : Thursday, June 17, 2010 4:18 AM
> À : insight@sourceware.org
> Objet : Re: Build gdbtk-cmds.c get error
>
> Ping.
I checked the following in:
Note that it fixes the val_print problem
and also cygwin specific problems to
allow compilation with both 1.5 and 1.7 cygwin...
For the cygwin_conv_path function,
I used the same macros as in gdb/windows-nat.c source.
Please feel free to suggest better
fixes.
I didn't dare to change
GDB_val_print function, as this could have implications
for tcl/tk scripts... Am I right on this?
Pierre
PS: I only fixed compilation and I am still unable to
really test cygwin insight :(
2010-06-18 Pierre Muller <muller@ics.u-strasbg.fr>
* generic/gdbtk-cmds.c: Add cygwin macros to allow compilation
with old or recent cygwin version.
(gdb_path_conv): Use cygwin_conv_path function.
(gdb_eval): Adapt to new field in val_print.
* generic/gdbtk-register.c (get_register): Likewise.
* generic/gdbtk-wrapper.c (wrap_val_print): Likewise.
* generic/gdbtk.c (_initialize_gdbtk): Use
cygwin_attach_handle_to_fd
call to allow compilation with old and new cygwin version.
Index: generic/gdbtk-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.117
diff -u -p -r1.117 gdbtk-cmds.c
--- generic/gdbtk-cmds.c 12 Mar 2010 18:34:12 -0000 1.117
+++ generic/gdbtk-cmds.c 18 Jun 2010 22:13:12 -0000
@@ -74,6 +74,20 @@
#ifdef __CYGWIN__
#include <sys/cygwin.h> /* for
cygwin_conv_to_full_win32_path */
+#include <cygwin/version.h>
+# if
CYGWIN_VERSION_DLL_MAKE_COMBINED(CYGWIN_VERSION_API_MAJOR,CYGWIN_VERSION_API
_MINOR) >= 181
+# define __USEWIDE
+# else
+# define CCP_POSIX_TO_WIN_A 0
+# define CCP_POSIX_TO_WIN_W 1
+# define CCP_WIN_A_TO_POSIX 2
+# define CCP_WIN_W_TO_POSIX 3
+# define cygwin_conv_path(op, from, to, size) \
+ (op == CCP_WIN_A_TO_POSIX) ? \
+ cygwin_conv_to_full_posix_path (from, to) : \
+ cygwin_conv_to_win32_path (from, to)
+# define CW_SET_DOS_FILE_WARNING -1 /* no-op this for older Cygwin */
+# endif
#endif
#ifdef HAVE_CTYPE_H
@@ -640,7 +654,7 @@ gdb_eval (ClientData clientData, Tcl_Int
make_cleanup_ui_file_delete (stb);
val_print (value_type (val), value_contents (val),
value_embedded_offset (val), value_address (val),
- stb, 0, &opts, current_language);
+ stb, 0, val, &opts, current_language);
result = ui_file_xstrdup (stb, &dummy);
Tcl_SetObjResult (interp, Tcl_NewStringObj (result, -1));
xfree (result);
@@ -2874,8 +2888,8 @@ gdb_path_conv (ClientData clientData, Tc
{
char pathname[256], *ptr;
- cygwin_conv_to_full_win32_path (Tcl_GetStringFromObj (objv[1], NULL),
- pathname);
+ cygwin_conv_path (CCP_POSIX_TO_WIN_A, Tcl_GetStringFromObj (objv[1],
NULL),
+ pathname, 256);
for (ptr = pathname; *ptr; ptr++)
{
if (*ptr == '\\')
Index: generic/gdbtk-register.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-register.c,v
retrieving revision 1.38
diff -u -p -r1.38 gdbtk-register.c
--- generic/gdbtk-register.c 7 Jul 2009 12:38:56 -0000 1.38
+++ generic/gdbtk-register.c 18 Jun 2010 22:13:12 -0000
@@ -343,11 +343,11 @@ get_register (int regnum, map_arg arg)
gdbarch_register_name (get_current_arch (), regnum))
== 0))
{
val_print (FIELD_TYPE (TYPE_FIELD (reg_vtype, 0)), buffer, 0, 0,
- stb, 0, &opts, current_language);
+ stb, 0, NULL, &opts, current_language);
}
else
val_print (reg_vtype, buffer, 0, 0,
- stb, 0, &opts, current_language);
+ stb, 0, NULL, &opts, current_language);
}
res = ui_file_xstrdup (stb, &dummy);
Index: generic/gdbtk-wrapper.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-wrapper.c,v
retrieving revision 1.18
diff -u -p -r1.18 gdbtk-wrapper.c
--- generic/gdbtk-wrapper.c 15 Dec 2008 18:06:12 -0000 1.18
+++ generic/gdbtk-wrapper.c 18 Jun 2010 22:13:12 -0000
@@ -218,7 +218,7 @@ wrap_val_print (char *a)
recurse = (*args)->args[6].integer;
opts.pretty = (enum val_prettyprint) (*args)->args[7].integer;
- val_print (type, valaddr, 0, address, stream, recurse, &opts,
+ val_print (type, valaddr, 0, address, stream, recurse, NULL, &opts,
current_language);
return 1;
}
Index: generic/gdbtk.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
retrieving revision 1.50
diff -u -p -r1.50 gdbtk.c
--- generic/gdbtk.c 6 Apr 2009 23:33:32 -0000 1.50
+++ generic/gdbtk.c 18 Jun 2010 22:13:13 -0000
@@ -709,15 +709,15 @@ _initialize_gdbtk ()
break;
default:
AllocConsole ();
- cygwin32_attach_handle_to_fd ("/dev/conin", 0,
- GetStdHandle (STD_INPUT_HANDLE),
- 1, GENERIC_READ);
- cygwin32_attach_handle_to_fd ("/dev/conout", 1,
- GetStdHandle (STD_OUTPUT_HANDLE),
- 0, GENERIC_WRITE);
- cygwin32_attach_handle_to_fd ("/dev/conout", 2,
- GetStdHandle (STD_ERROR_HANDLE),
- 0, GENERIC_WRITE);
+ cygwin_attach_handle_to_fd ("/dev/conin", 0,
+ GetStdHandle (STD_INPUT_HANDLE),
+ 1, GENERIC_READ);
+ cygwin_attach_handle_to_fd ("/dev/conout", 1,
+ GetStdHandle (STD_OUTPUT_HANDLE),
+ 0, GENERIC_WRITE);
+ cygwin_attach_handle_to_fd ("/dev/conout", 2,
+ GetStdHandle (STD_ERROR_HANDLE),
+ 0, GENERIC_WRITE);
break;
}
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OBV] Fix Build gdbtk-cmds.c get error
[not found] ` <4426260533430796929@unknownmsgid>
@ 2010-06-19 15:46 ` Hui Zhu
0 siblings, 0 replies; 5+ messages in thread
From: Hui Zhu @ 2010-06-19 15:46 UTC (permalink / raw)
To: Pierre Muller; +Cc: insight, Keith Seitz
In i386-linux, it is OK. Thanks.
Hui
On Sat, Jun 19, 2010 at 06:24, Pierre Muller
<pierre.muller@ics-cnrs.unistra.fr> wrote:
>
>
>> -----Message d'origine-----
>> De : insight-owner@sourceware.org [mailto:insight-owner@sourceware.org]
>> De la part de Hui Zhu
>> Envoyé : Thursday, June 17, 2010 4:18 AM
>> À : insight@sourceware.org
>> Objet : Re: Build gdbtk-cmds.c get error
>>
>> Ping.
>
> I checked the following in:
> Note that it fixes the val_print problem
> and also cygwin specific problems to
> allow compilation with both 1.5 and 1.7 cygwin...
>
> For the cygwin_conv_path function,
> I used the same macros as in gdb/windows-nat.c source.
>
> Please feel free to suggest better
> fixes.
> I didn't dare to change
> GDB_val_print function, as this could have implications
> for tcl/tk scripts... Am I right on this?
>
>
> Pierre
>
> PS: I only fixed compilation and I am still unable to
> really test cygwin insight :(
>
>
> 2010-06-18 Pierre Muller <muller@ics.u-strasbg.fr>
>
> * generic/gdbtk-cmds.c: Add cygwin macros to allow compilation
> with old or recent cygwin version.
> (gdb_path_conv): Use cygwin_conv_path function.
> (gdb_eval): Adapt to new field in val_print.
> * generic/gdbtk-register.c (get_register): Likewise.
> * generic/gdbtk-wrapper.c (wrap_val_print): Likewise.
> * generic/gdbtk.c (_initialize_gdbtk): Use
> cygwin_attach_handle_to_fd
> call to allow compilation with old and new cygwin version.
>
> Index: generic/gdbtk-cmds.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
> retrieving revision 1.117
> diff -u -p -r1.117 gdbtk-cmds.c
> --- generic/gdbtk-cmds.c 12 Mar 2010 18:34:12 -0000 1.117
> +++ generic/gdbtk-cmds.c 18 Jun 2010 22:13:12 -0000
> @@ -74,6 +74,20 @@
>
> #ifdef __CYGWIN__
> #include <sys/cygwin.h> /* for
> cygwin_conv_to_full_win32_path */
> +#include <cygwin/version.h>
> +# if
> CYGWIN_VERSION_DLL_MAKE_COMBINED(CYGWIN_VERSION_API_MAJOR,CYGWIN_VERSION_API
> _MINOR) >= 181
> +# define __USEWIDE
> +# else
> +# define CCP_POSIX_TO_WIN_A 0
> +# define CCP_POSIX_TO_WIN_W 1
> +# define CCP_WIN_A_TO_POSIX 2
> +# define CCP_WIN_W_TO_POSIX 3
> +# define cygwin_conv_path(op, from, to, size) \
> + (op == CCP_WIN_A_TO_POSIX) ? \
> + cygwin_conv_to_full_posix_path (from, to) : \
> + cygwin_conv_to_win32_path (from, to)
> +# define CW_SET_DOS_FILE_WARNING -1 /* no-op this for older Cygwin */
> +# endif
> #endif
>
> #ifdef HAVE_CTYPE_H
> @@ -640,7 +654,7 @@ gdb_eval (ClientData clientData, Tcl_Int
> make_cleanup_ui_file_delete (stb);
> val_print (value_type (val), value_contents (val),
> value_embedded_offset (val), value_address (val),
> - stb, 0, &opts, current_language);
> + stb, 0, val, &opts, current_language);
> result = ui_file_xstrdup (stb, &dummy);
> Tcl_SetObjResult (interp, Tcl_NewStringObj (result, -1));
> xfree (result);
> @@ -2874,8 +2888,8 @@ gdb_path_conv (ClientData clientData, Tc
> {
> char pathname[256], *ptr;
>
> - cygwin_conv_to_full_win32_path (Tcl_GetStringFromObj (objv[1], NULL),
> - pathname);
> + cygwin_conv_path (CCP_POSIX_TO_WIN_A, Tcl_GetStringFromObj (objv[1],
> NULL),
> + pathname, 256);
> for (ptr = pathname; *ptr; ptr++)
> {
> if (*ptr == '\\')
> Index: generic/gdbtk-register.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-register.c,v
> retrieving revision 1.38
> diff -u -p -r1.38 gdbtk-register.c
> --- generic/gdbtk-register.c 7 Jul 2009 12:38:56 -0000 1.38
> +++ generic/gdbtk-register.c 18 Jun 2010 22:13:12 -0000
> @@ -343,11 +343,11 @@ get_register (int regnum, map_arg arg)
> gdbarch_register_name (get_current_arch (), regnum))
> == 0))
> {
> val_print (FIELD_TYPE (TYPE_FIELD (reg_vtype, 0)), buffer, 0, 0,
> - stb, 0, &opts, current_language);
> + stb, 0, NULL, &opts, current_language);
> }
> else
> val_print (reg_vtype, buffer, 0, 0,
> - stb, 0, &opts, current_language);
> + stb, 0, NULL, &opts, current_language);
> }
>
> res = ui_file_xstrdup (stb, &dummy);
> Index: generic/gdbtk-wrapper.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-wrapper.c,v
> retrieving revision 1.18
> diff -u -p -r1.18 gdbtk-wrapper.c
> --- generic/gdbtk-wrapper.c 15 Dec 2008 18:06:12 -0000 1.18
> +++ generic/gdbtk-wrapper.c 18 Jun 2010 22:13:12 -0000
> @@ -218,7 +218,7 @@ wrap_val_print (char *a)
> recurse = (*args)->args[6].integer;
> opts.pretty = (enum val_prettyprint) (*args)->args[7].integer;
>
> - val_print (type, valaddr, 0, address, stream, recurse, &opts,
> + val_print (type, valaddr, 0, address, stream, recurse, NULL, &opts,
> current_language);
> return 1;
> }
> Index: generic/gdbtk.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk.c,v
> retrieving revision 1.50
> diff -u -p -r1.50 gdbtk.c
> --- generic/gdbtk.c 6 Apr 2009 23:33:32 -0000 1.50
> +++ generic/gdbtk.c 18 Jun 2010 22:13:13 -0000
> @@ -709,15 +709,15 @@ _initialize_gdbtk ()
> break;
> default:
> AllocConsole ();
> - cygwin32_attach_handle_to_fd ("/dev/conin", 0,
> - GetStdHandle (STD_INPUT_HANDLE),
> - 1, GENERIC_READ);
> - cygwin32_attach_handle_to_fd ("/dev/conout", 1,
> - GetStdHandle (STD_OUTPUT_HANDLE),
> - 0, GENERIC_WRITE);
> - cygwin32_attach_handle_to_fd ("/dev/conout", 2,
> - GetStdHandle (STD_ERROR_HANDLE),
> - 0, GENERIC_WRITE);
> + cygwin_attach_handle_to_fd ("/dev/conin", 0,
> + GetStdHandle (STD_INPUT_HANDLE),
> + 1, GENERIC_READ);
> + cygwin_attach_handle_to_fd ("/dev/conout", 1,
> + GetStdHandle (STD_OUTPUT_HANDLE),
> + 0, GENERIC_WRITE);
> + cygwin_attach_handle_to_fd ("/dev/conout", 2,
> + GetStdHandle (STD_ERROR_HANDLE),
> + 0, GENERIC_WRITE);
> break;
> }
> }
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OBV] Fix Build gdbtk-cmds.c get error
2010-06-18 22:24 ` [OBV] Fix " Pierre Muller
@ 2010-06-19 18:01 ` Keith Seitz
0 siblings, 0 replies; 5+ messages in thread
From: Keith Seitz @ 2010-06-19 18:01 UTC (permalink / raw)
To: Pierre Muller; +Cc: insight
On 06/18/2010 03:24 PM, Pierre Muller wrote:
> I checked the following in:
> Note that it fixes the val_print problem
> and also cygwin specific problems to
> allow compilation with both 1.5 and 1.7 cygwin...
Aside from the cygwin stuff, I had a similar patch that I simply forgot
to check in. Thank you for beating me to it! :-)
> For the cygwin_conv_path function,
> I used the same macros as in gdb/windows-nat.c source.
>
> Please feel free to suggest better
> fixes.
That all looks okay. If anything is amiss, it can be addressed in time.
> I didn't dare to change
> GDB_val_print function, as this could have implications
> for tcl/tk scripts... Am I right on this?
GDB_val_print is simply a wrapper which prevents gdb from longjmp'ing
out of the Tcl interpreter. With the advent of "exceptions," the
wrappers aren't really necessary any more. Maybe I'll clean this up some
time...
> PS: I only fixed compilation and I am still unable to
> really test cygwin insight :(
I can see if my twelve year old box still boots and give it a quick
sanity check.
Thanks again for the patch,
Keith
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-19 18:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-14 9:55 Build gdbtk-cmds.c get error Hui Zhu
2010-06-17 2:18 ` Hui Zhu
2010-06-18 22:24 ` [OBV] Fix " Pierre Muller
2010-06-19 18:01 ` Keith Seitz
[not found] ` <4426260533430796929@unknownmsgid>
2010-06-19 15:46 ` Hui Zhu
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).