From: Harald Koenig <H.Koenig@science-computing.de>
To: Pedro Alves <pedro@codesourcery.com>
Cc: bug-gdb@gnu.org, gdb-patches@sourceware.org,
Harald Koenig <H.Koenig@science-computing.de>
Subject: Re: some compile errors fo gdb-7.0.1
Date: Tue, 23 Feb 2010 15:22:00 -0000 [thread overview]
Message-ID: <20100223152233.GA14951@atuin.science-computing.de> (raw)
In-Reply-To: <201002181923.34196.pedro@codesourcery.com>
[-- Attachment #1: Type: text/plain, Size: 4576 bytes --]
Hi Pedro,
On Feb 18, Pedro Alves wrote:
> I encourage you to try building cvs head, or a recent
> snapshot with hp cc so catch other possible tweaks
> necessary, as gdb 7.1 is close to branching out.
thanks for the hint! ok, so here are some more problems at least FYI,
not sure if all of them can and must be fixed ?!
with no specific order:
-------------------------------------------------------------------------------
SGI IRIX:
cc-1028 cc: ERROR File = gdb-CVS-20100222/gdb/varobj.c, Line = 1703
The expression used must have a constant value.
varobj_update_result r = {*varp};
^
using "gcc -pedantic" you'll get at least a warning about this problem:
gdb-CVS-20100222/gdb/varobj.c:1703: warning: initializer element is not computable at load time
gdb-CVS-20100222/gdb/varobj.c:1711: warning: initializer element is not computable at load time
gdb-CVS-20100222/gdb/varobj.c:1741: warning: initializer element is not computable at load time
gdb-CVS-20100222/gdb/varobj.c:1818: warning: initializer element is not computable at load time
gdb-CVS-20100222/gdb/varobj.c:1828: warning: initializer element is not computable at load time
gdb-CVS-20100222/gdb/varobj.c:1855: warning: initializer element is not computable at load time
a possible fix for the 1st error would be varobj.c.diff (attached).
-------------------------------------------------------------------------------
old bison/yacc:
on some older linux I run into this problem:
c-exp.y:2238: error: field 'value' has incomplete type
these are the distros and bison/byacc versions:
suse 9.0 bison 1.75
redhat 9 bison 1.35
centos 5.0 byacc-1.9-29.2.2
the attached patch c-exp.y.diff seems to work both with bison-2.3 and
those older versions...
-------------------------------------------------------------------------------
Solaris
on solaris 5.8 (sparc, Sun C 5.7 2005/01/07) and 5.10 (sparc Sun C 5.8 2005/10/13 and x86 Sun C 5.9 SunOS_i386 Patch 124868-01 2007/07/12) the cc complains about unknown __FUNCTION__ :
"gdb-CVS-20100222/bfd/elfxx-sparc.c", line 2944: undefined symbol: __FUNCTION__
and
"gdb-CVS-20100222/bfd/elf32-i386.c", line 1406: undefined symbol: __FUNCTION__
"gdb-CVS-20100222/bfd/elf32-i386.c", line 3012: undefined symbol: __FUNCTION__
the short hack in bfd.diff is far from being perfect, just an example
how to get it compiling because
(a) it should check for C99 and/or solaris (e.g. if __func__ is really available -- looks like a autoconf thingy;)
(b) this check/define should be handled elsewhere at one central place
as there are more files "affected" :
gdb-CVS-20100222 > grep -rl __FUNCTION__ .
./bfd/elfxx-sparc.c
./bfd/bfd-in2.h
./bfd/nlm32-sparc.c
./bfd/elf64-x86-64.c
./bfd/elf32-i386.c
./bfd/elf32-bfin.c
./bfd/bfd-in.h
./sim/cris/traps.c
./gdb/ChangeLog-2004
./gdb/ChangeLog-2002
./gdb/ChangeLog-2000
as the ChangeLogs tell that's not really a new problem, IMHO I'd go with ./gdb/ChangeLog-2000 ;-))
./gdb/ChangeLog-2000: * uw-thread.c: Remove __FUNCTION__ GNUism.
./gdb/ChangeLog-2002: __FUNCTION__.
./gdb/ChangeLog-2002: * gnu-nat.c (do_mach_notify_no_senders): Replace __FUNCTION__ with
./gdb/ChangeLog-2004: * ia64-tdep.c (ia64_find_proc_info_x): Do not use __FUNCTION__.
-------------------------------------------------------------------------------
AIX 5.3
just FYI: while gdb 7.0.1 crashes when trying to start a program
(typing "gdb a.out" and "r" will SIGSEGV)...
gdb 7.1.50.20100222-cvs seems to work, at least running and simple break points work...
-------------------------------------------------------------------------------
Harald Koenig
--
"I hope to die ___ _____
before I *have* to use Microsoft Word.", 0--,| /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen. <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig \/\/\/\/\/\/\/\/\/
science+computing ag // / \\ \
koenig@science-computing.de ^^^^^ ^^^^^
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier,
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
[-- Attachment #2: varobj.c.diff --]
[-- Type: text/plain, Size: 2021 bytes --]
Index: varobj.c
===================================================================
RCS file: /cvs/src/src/gdb/varobj.c,v
retrieving revision 1.154
diff -u -r1.154 varobj.c
--- varobj.c 20 Jan 2010 06:36:38 -0000 1.154
+++ varobj.c 23 Feb 2010 14:15:10 -0000
@@ -1700,7 +1700,8 @@
if (!(*varp)->root->is_valid)
{
- varobj_update_result r = {*varp};
+ varobj_update_result r = {0};
+ r.varobj = *varp;
r.status = VAROBJ_INVALID;
VEC_safe_push (varobj_update_result, result, &r);
return result;
@@ -1708,7 +1709,8 @@
if ((*varp)->root->rootvar == *varp)
{
- varobj_update_result r = {*varp};
+ varobj_update_result r = {0};
+ r.varobj = varp;
r.status = VAROBJ_IN_SCOPE;
/* Update the root variable. value_of_root can return NULL
@@ -1738,7 +1740,8 @@
}
else
{
- varobj_update_result r = {*varp};
+ varobj_update_result r = {0};
+ r.varobj = varp;
VEC_safe_push (varobj_update_result, stack, &r);
}
@@ -1815,7 +1818,8 @@
for (i = VEC_length (varobj_p, changed) - 1; i >= 0; --i)
{
varobj_p tmp = VEC_index (varobj_p, changed, i);
- varobj_update_result r = {tmp};
+ varobj_update_result r = {0};
+ r.varobj = tmp;
r.changed = 1;
r.value_installed = 1;
VEC_safe_push (varobj_update_result, stack, &r);
@@ -1825,7 +1829,8 @@
varobj_p tmp = VEC_index (varobj_p, unchanged, i);
if (!tmp->frozen)
{
- varobj_update_result r = {tmp};
+ varobj_update_result r = {0};
+ r.varobj = tmp;
r.value_installed = 1;
VEC_safe_push (varobj_update_result, stack, &r);
}
@@ -1852,7 +1857,8 @@
/* Child may be NULL if explicitly deleted by -var-delete. */
if (c != NULL && !c->frozen)
{
- varobj_update_result r = {c};
+ varobj_update_result r = {0};
+ r.varobj = c;
VEC_safe_push (varobj_update_result, stack, &r);
}
}
[-- Attachment #3: c-exp.y.diff --]
[-- Type: text/plain, Size: 400 bytes --]
Index: c-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/c-exp.y,v
retrieving revision 1.71
diff -u -r1.71 c-exp.y
--- c-exp.y 19 Feb 2010 20:22:03 -0000 1.71
+++ c-exp.y 23 Feb 2010 14:42:29 -0000
@@ -2295,7 +2295,7 @@
typedef struct
{
int token;
- union YYSTYPE value;
+ YYSTYPE value;
} token_and_value;
DEF_VEC_O (token_and_value);
next prev parent reply other threads:[~2010-02-23 15:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100215141621.GA9469@atuin.science-computing.de>
2010-02-18 19:23 ` Pedro Alves
2010-02-23 15:22 ` Harald Koenig [this message]
2010-02-23 17:08 ` Pedro Alves
2010-02-23 16:35 ` Harald Koenig
2010-02-23 17:14 ` Harald Koenig
2010-02-24 12:51 ` Harald Koenig
2010-02-24 13:35 ` Build errors on AIX Pedro Alves
2010-02-24 14:09 ` Harald Koenig
2010-03-01 6:47 ` Joel Brobecker
2010-03-01 6:51 ` some compile errors fo gdb-7.0.1 Joel Brobecker
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=20100223152233.GA14951@atuin.science-computing.de \
--to=h.koenig@science-computing.de \
--cc=bug-gdb@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
/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