public inbox for insight-prs@sourceware.org
help / color / mirror / Atom feed
* insight/302: build broken under x86-64
@ 2006-08-07 21:03 markandrews
0 siblings, 0 replies; 3+ messages in thread
From: markandrews @ 2006-08-07 21:03 UTC (permalink / raw)
To: insight-gnats
>Number: 302
>Category: insight
>Synopsis: build broken under x86-64
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 07 21:03:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: mark andrews
>Release: insight-weekly-6.5.50-20060731.tar.bz2
>Organization:
>Environment:
RHEL v4.2 2.6.17-34
>Description:
the following files fail to build under x86-64 due to 64 bit pointer 32 bit int cast problems:
./gdb/gdbtk/generic/gdbtk-stack.c
./gdb/gdbtk/generic/gdbtk-wrapper.c
./gdb/gdbtk/generic/gdbtk-register.c
>How-To-Repeat:
build under x86_64
>Fix:
I modified code to get it to compile under x86_64. see attached patch files
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="diffs.tar.bz2"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="diffs.tar.bz2"
QlpoOTFBWSZTWaMxVN0AAy3/2MwQBQBAd///hAANCv/v/6QIAAQAAAgACEACiU7MFgEkiR5NU9Ca
NPTSD1MmgPSbSDQNPUAJNSTRCGmFNNA2kBtI0AaD1AA5piYAEwATAACYAAmBUpCJjQ1J4phqekMA
0AQDDUek9luWtY1/F9NEYBNAAFlqzZk5QT1NNUVNJBEmuMAKgbeggpCs/gzaLnHhWOF9GHeIxWLo
JxThOnyCiIqoqqjFbEJ0IcpBMmgEnoHbSIK8e8XSWnp37EG4a25+Dze973ZxmLrqOMgia6KERERJ
cSih6hLQILARm3LtxFVVhvBlJVKqo1RYJwrL5K+km5W3XE1uLUkcsjKTEj5P3UtuxyqiziDVhcCC
3Zs50GtMqWWQinknSlwk2kvxTF5bf17uKyy2aasoIYoasBPPPOd+9JpEk6EGZqI+QUYZVkM22qc7
WYMsswOSNo4BgZtW2+lZyYzIMscsry1FRtnymmbIzOGOUte2UxJkX4i4Whttv3eXzm/qvOy1Wb44
4267lVhY5pJohIgHoCVjOWeYIadezba1rc5gVQ2wXUaQzTgaBE/R8CWnXhOAT1aj0hEJ2nvERERE
Suxzh84hu5tm7pa5y9cgLlklSDB9rErlyBlKUK5Y18FWi4LggJyZVzAuFJcZCV3kJrJlO+X2GUM4
fi/fmhKpYTMlbMcctLJNhelCXEZUxsP1tLifA4zdmjHiUklGu03ys9+VkaW/MKEzG4Zy2aGmUuJS
gKGWdeybcE4MSbzIo1EUVKpSaoqm1YrSsyTSbZgmpcZz3snrPpA/4u5IpwoSFGYqm6A=
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: insight/302: build broken under x86-64
@ 2007-12-11 20:53 Masayuki Hatta
0 siblings, 0 replies; 3+ messages in thread
From: Masayuki Hatta @ 2007-12-11 20:53 UTC (permalink / raw)
To: kseitz; +Cc: insight-prs
The following reply was made to PR insight/302; it has been noted by GNATS.
From: "Masayuki Hatta" <mhatta@gmail.com>
To: insight-gnats@sources.redhat.com
Cc:
Subject: Re: insight/302: build broken under x86-64
Date: Wed, 12 Dec 2007 05:47:06 +0900
Here's my patch for building Insight on 64-bit archs. At least it
builds, but I'm not sure Insight really works on such archs.
diff -urNad insight-6.7.1.dfsg.1~/gdb/gdbtk/generic/gdbtk-register.c
insight-6.7.1.dfsg.1/gdb/gdbtk/generic/gdbtk-register.c
--- insight-6.7.1.dfsg.1~/gdb/gdbtk/generic/gdbtk-register.c 2007-06-28
12:54:31.000000000 +0900
+++ insight-6.7.1.dfsg.1/gdb/gdbtk/generic/gdbtk-register.c 2007-12-11
19:41:27.000000000 +0900
@@ -153,7 +153,7 @@
char *s = Tcl_GetStringFromObj (objv[0], &len);
if (objc != 0 && strncmp (s, "-numbers", len) == 0)
{
- argp = (void *) 1;
+ argp = (intptr_t *) 1;
objc--;
objv++;
}
@@ -345,7 +345,7 @@
get_register_name (int regnum, void *argp)
{
/* Non-zero if the caller wants the register numbers, too. */
- int numbers = (int) argp;
+ intptr_t numbers = (intptr_t) argp;
Tcl_Obj *name
= Tcl_NewStringObj (gdbarch_register_name (current_gdbarch, regnum), -1);
Tcl_Obj *elt;
diff -urNad insight-6.7.1.dfsg.1~/gdb/gdbtk/generic/gdbtk-stack.c
insight-6.7.1.dfsg.1/gdb/gdbtk/generic/gdbtk-stack.c
--- insight-6.7.1.dfsg.1~/gdb/gdbtk/generic/gdbtk-stack.c 2007-07-03
03:33:22.000000000 +0900
+++ insight-6.7.1.dfsg.1/gdb/gdbtk/generic/gdbtk-stack.c 2007-12-11
19:41:27.000000000 +0900
@@ -286,7 +286,7 @@
struct block *block;
char **canonical, *args;
struct dict_iterator iter;
- int i, arguments;
+ intptr_t i, arguments;
if (objc > 2)
{
@@ -295,7 +295,7 @@
return TCL_ERROR;
}
- arguments = (int) clientData;
+ arguments = (intptr_t) clientData;
/* Initialize the result pointer to an empty list. */
diff -urNad insight-6.7.1.dfsg.1~/gdb/gdbtk/generic/gdbtk-varobj.c
insight-6.7.1.dfsg.1/gdb/gdbtk/generic/gdbtk-varobj.c
--- insight-6.7.1.dfsg.1~/gdb/gdbtk/generic/gdbtk-varobj.c 2007-04-28
00:39:50.000000000 +0900
+++ insight-6.7.1.dfsg.1/gdb/gdbtk/generic/gdbtk-varobj.c 2007-12-11
19:41:27.000000000 +0900
@@ -445,7 +445,7 @@
Tcl_Obj *changed;
struct varobj **changelist;
struct varobj **vc;
- int result;
+ intptr_t result;
/* varobj_update() throws an error for a non-root variable
and otherwise it returns a value < 0 if the variable is
diff -urNad insight-6.7.1.dfsg.1~/gdb/gdbtk/generic/gdbtk-wrapper.c
insight-6.7.1.dfsg.1/gdb/gdbtk/generic/gdbtk-wrapper.c
--- insight-6.7.1.dfsg.1~/gdb/gdbtk/generic/gdbtk-wrapper.c 2007-04-28
00:39:50.000000000 +0900
+++ insight-6.7.1.dfsg.1/gdb/gdbtk/generic/gdbtk-wrapper.c 2007-12-11
19:42:06.000000000 +0900
@@ -34,16 +34,16 @@
gdb_result GDB_evaluate_expression (struct expression *, value_ptr *);
-gdb_result GDB_type_print (value_ptr, char *, struct ui_file *, int);
+gdb_result GDB_type_print (value_ptr, char *, struct ui_file *, intptr_t);
gdb_result GDB_val_print (struct type *type, char *valaddr,
CORE_ADDR address, struct ui_file *stream,
- int format, int deref_ref, int recurse,
+ intptr_t format, intptr_t deref_ref, intptr_t recurse,
enum val_prettyprint pretty);
-gdb_result GDB_value_equal (value_ptr, value_ptr, int *);
+gdb_result GDB_value_equal (value_ptr, value_ptr, intptr_t *);
-gdb_result GDB_parse_exp_1 (char **stringptr, struct block *block, int comma,
+gdb_result GDB_parse_exp_1 (char **stringptr, struct block *block,
intptr_t comma,
struct expression **result);
gdb_result GDB_evaluate_type (struct expression *exp, value_ptr * result);
@@ -83,8 +83,8 @@
gdb_result GDB_get_current_frame (struct frame_info **result);
gdb_result GDB_varobj_update (struct varobj **varp,
- struct varobj ***changelist, int explicit,
- int *result);
+ struct varobj ***changelist, intptr_t explicit,
+ intptr_t *result);
/*
* Private functions for this file
@@ -148,7 +148,7 @@
gdb_result
GDB_type_print (value_ptr val, char *varstring,
- struct ui_file *stream, int show)
+ struct ui_file *stream, intptr_t show)
{
struct gdb_wrapper_arguments args;
@@ -166,7 +166,7 @@
value_ptr val = (value_ptr) (*args)->args[0];
char *varstring = (*args)->args[1];
struct ui_file *stream = (struct ui_file *) (*args)->args[2];
- int show = (int) (*args)->args[3];
+ intptr_t show = (intptr_t) (*args)->args[3];
type_print (value_type (val), varstring, stream, show);
return 1;
}
@@ -176,9 +176,9 @@
char *valaddr,
CORE_ADDR address,
struct ui_file *stream,
- int format,
- int deref_ref,
- int recurse,
+ intptr_t format,
+ intptr_t deref_ref,
+ intptr_t recurse,
enum val_prettyprint pretty)
{
struct gdb_wrapper_arguments args;
@@ -203,18 +203,18 @@
const gdb_byte *valaddr;
CORE_ADDR address;
struct ui_file *stream;
- int format;
- int deref_ref;
- int recurse;
+ intptr_t format;
+ intptr_t deref_ref;
+ intptr_t recurse;
enum val_prettyprint pretty;
type = (struct type *) (*args)->args[0];
valaddr = (gdb_byte *) (*args)->args[1];
address = *(CORE_ADDR *) (*args)->args[2];
stream = (struct ui_file *) (*args)->args[3];
- format = (int) (*args)->args[4];
- deref_ref = (int) (*args)->args[5];
- recurse = (int) (*args)->args[6];
+ format = (intptr_t) (*args)->args[4];
+ deref_ref = (intptr_t) (*args)->args[5];
+ recurse = (intptr_t) (*args)->args[6];
pretty = (enum val_prettyprint) (*args)->args[7];
val_print (type, valaddr, 0, address, stream, format, deref_ref,
@@ -269,7 +269,7 @@
GDB_value_equal (val1, val2, result)
value_ptr val1;
value_ptr val2;
- int *result;
+ intptr_t *result;
{
struct gdb_wrapper_arguments args;
gdb_result r;
@@ -281,7 +281,7 @@
if (r != GDB_OK)
return r;
- *result = (int) args.result;
+ *result = (intptr_t) args.result;
return GDB_OK;
}
@@ -294,13 +294,13 @@
val1 = (value_ptr) (*args)->args[0];
val2 = (value_ptr) (*args)->args[1];
- (*args)->result = (char *) value_equal (val1, val2);
+ (*args)->result = (char *) (intptr_t) value_equal (val1, val2);
return 1;
}
gdb_result
GDB_parse_exp_1 (char **stringptr, struct block *block,
- int comma, struct expression **result)
+ intptr_t comma, struct expression **result)
{
struct gdb_wrapper_arguments args;
gdb_result r;
@@ -323,11 +323,11 @@
struct gdb_wrapper_arguments **args = (struct gdb_wrapper_arguments
**) opaque_arg;
struct block *block;
char **stringptr;
- int comma;
+ intptr_t comma;
stringptr = (char **) (*args)->args[0];
block = (struct block *) (*args)->args[1];
- comma = (int) (*args)->args[2];
+ comma = (intptr_t) (*args)->args[2];
(*args)->result = (char *) parse_exp_1 (stringptr, block, comma);
return 1;
@@ -730,7 +730,7 @@
gdb_result
GDB_varobj_update (struct varobj **varp, struct varobj ***changelist,
- int explicit, int *result)
+ intptr_t explicit, intptr_t *result)
{
struct gdb_wrapper_arguments args;
gdb_result r;
@@ -743,7 +743,7 @@
if (r != GDB_OK)
return r;
- *result = (int) args.result;
+ *result = (intptr_t) args.result;
return GDB_OK;
}
@@ -753,8 +753,8 @@
= (struct gdb_wrapper_arguments **) opaque_arg;
struct varobj **varp = (struct varobj **) (*args)->args[0];
struct varobj ***changelist = (struct varobj ***) (*args)->args[1];
- int explicit = (int) (*args)->args[2];
+ intptr_t explicit = (intptr_t) (*args)->args[2];
- (*args)->result = (char *) varobj_update (varp, changelist, explicit);
+ (*args)->result = (char *) (intptr_t) varobj_update (varp,
changelist, explicit);
return 1;
}
diff -urNad insight-6.7.1.dfsg.1~/gdb/gdbtk/generic/gdbtk-wrapper.h
insight-6.7.1.dfsg.1/gdb/gdbtk/generic/gdbtk-wrapper.h
--- insight-6.7.1.dfsg.1~/gdb/gdbtk/generic/gdbtk-wrapper.h 2007-04-28
00:39:50.000000000 +0900
+++ insight-6.7.1.dfsg.1/gdb/gdbtk/generic/gdbtk-wrapper.h 2007-12-11
19:41:27.000000000 +0900
@@ -46,16 +46,16 @@
extern gdb_result GDB_evaluate_expression (struct expression *expr,
value_ptr * val);
extern gdb_result GDB_type_print (value_ptr val, char *varstring,
- struct ui_file *stream, int show);
+ struct ui_file *stream, intptr_t show);
extern gdb_result GDB_val_print (struct type *type, char *valaddr,
CORE_ADDR address, struct ui_file *stream,
- int format, int deref_ref, int recurse,
+ intptr_t format, intptr_t deref_ref, intptr_t recurse,
enum val_prettyprint pretty);
extern gdb_result GDB_value_fetch_lazy (value_ptr value);
extern gdb_result GDB_value_equal (value_ptr val1, value_ptr val2,
- int *result);
+ intptr_t *result);
extern gdb_result GDB_parse_exp_1 (char **stringptr, struct block *block,
- int comma, struct expression **result);
+ intptr_t comma, struct expression **result);
extern gdb_result GDB_evaluate_type (struct expression *exp,
value_ptr * result);
extern gdb_result GDB_block_for_pc (CORE_ADDR pc, struct block **result);
@@ -81,7 +81,7 @@
struct frame_info **result);
extern gdb_result GDB_get_current_frame (struct frame_info **result);
extern gdb_result GDB_varobj_update (struct varobj **varp,
- struct varobj ***changelist, int explicit,
- int *result);
+ struct varobj ***changelist, intptr_t explicit,
+ intptr_t *result);
#endif /* GDBTK_WRAPPER_H */
--
Masayuki Hatta <mhatta at gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: insight/302: build broken under x86-64
@ 2006-11-30 22:56 kseitz
0 siblings, 0 replies; 3+ messages in thread
From: kseitz @ 2006-11-30 22:56 UTC (permalink / raw)
To: insight-prs, kseitz, markandrews, nobody
Synopsis: build broken under x86-64
Responsible-Changed-From-To: unassigned->kseitz
Responsible-Changed-By: kseitz
Responsible-Changed-When: Thu Nov 30 22:56:37 2006
Responsible-Changed-Why:
mine
State-Changed-From-To: open->analyzed
State-Changed-By: kseitz
State-Changed-When: Thu Nov 30 22:56:37 2006
State-Changed-Why:
Can you send a proper patch generated with "diff -u" (or "cvs diff -u"?
http://sourceware.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=insight&pr=302
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-11 20:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-07 21:03 insight/302: build broken under x86-64 markandrews
2006-11-30 22:56 kseitz
2007-12-11 20:53 Masayuki Hatta
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).