* Fix gdb 7.0 compilation on IRIX 5.3
@ 2009-11-23 18:54 Rainer Orth
2009-11-23 20:19 ` Tom Tromey
0 siblings, 1 reply; 7+ messages in thread
From: Rainer Orth @ 2009-11-23 18:54 UTC (permalink / raw)
To: gdb-patches
I just tried to compile gdb 7.0 on IRIX 5.3, but failed initially:
/vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c: In function 'dwarf2_read_section':
/vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c:1402: error: 'MAP_FAILED' undeclared (first use in this function)
/vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c:1402: error: (Each undeclared identifier is reported only once
/vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c:1402: error: for each function it appears in.)
make[2]: *** [dwarf2read.o] Error 1
The following trivial patch fixes this and allowed the build to finish.
Unfortunately, the resulting gdb segfaults when run against itself or
some recent xgcc binary. I'll investigate and report separately.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2009-11-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* dwarf2read.c [HAVE_MMAP] (MAP_FAILED): Define if missing.
===================================================================
RCS file: gdb/RCS/dwarf2read.c,v
retrieving revision 1.1
diff -up -r1.1 gdb/dwarf2read.c
--- gdb/dwarf2read.c 2009/09/15 16:09:32 1.1
+++ gdb/dwarf2read.c 2009/11/23 18:13:08
@@ -58,6 +58,9 @@
#endif
#ifdef HAVE_MMAP
#include <sys/mman.h>
+#ifndef MAP_FAILED
+#define MAP_FAILED -1
+#endif
#endif
#if 0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fix gdb 7.0 compilation on IRIX 5.3
2009-11-23 18:54 Fix gdb 7.0 compilation on IRIX 5.3 Rainer Orth
@ 2009-11-23 20:19 ` Tom Tromey
2009-11-23 20:45 ` Rainer Orth
0 siblings, 1 reply; 7+ messages in thread
From: Tom Tromey @ 2009-11-23 20:19 UTC (permalink / raw)
To: Rainer Orth; +Cc: gdb-patches
>>>>> "Rainer" == Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
Rainer> 2009-11-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Rainer> * dwarf2read.c [HAVE_MMAP] (MAP_FAILED): Define if missing.
Rainer> +#ifndef MAP_FAILED
Rainer> +#define MAP_FAILED -1
Rainer> +#endif
I would have expected `(void *) -1' here. This is ok if it was
warning-free. Or the other form is also ok.
thanks,
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fix gdb 7.0 compilation on IRIX 5.3
2009-11-23 20:19 ` Tom Tromey
@ 2009-11-23 20:45 ` Rainer Orth
2009-11-23 21:35 ` Tom Tromey
2009-11-23 22:33 ` Joel Brobecker
0 siblings, 2 replies; 7+ messages in thread
From: Rainer Orth @ 2009-11-23 20:45 UTC (permalink / raw)
To: tromey; +Cc: gdb-patches
Tom Tromey <tromey@redhat.com> writes:
>>>>>> "Rainer" == Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
>
> Rainer> 2009-11-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
> Rainer> * dwarf2read.c [HAVE_MMAP] (MAP_FAILED): Define if missing.
>
> Rainer> +#ifndef MAP_FAILED
> Rainer> +#define MAP_FAILED -1
> Rainer> +#endif
>
> I would have expected `(void *) -1' here. This is ok if it was
> warning-free. Or the other form is also ok.
I didn't see the warning, and used the cast-free form since gcc had
both. I notice now that they use casts to char * when MAP_FAILED is
used.
Could you check this in for me? I couldn't check out an rw cvs tree from
sourceware.org, although I should have rw access to src.
ro@manam 443 > cvs -d :ext:ro@sourceware.org:/cvs/src co gdb
Permission denied (publickey,gssapi-with-mic).
cvs [checkout aborted]: end of file from server (consult above messages if any)
Btw, the crashes I've observed were already known: PR gdb/10819.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
===================================================================
RCS file: gdb/RCS/dwarf2read.c,v
retrieving revision 1.1
diff -up -r1.1 gdb/dwarf2read.c
--- gdb/dwarf2read.c 2009/09/15 16:09:32 1.1
+++ gdb/dwarf2read.c 2009/11/23 20:36:20
@@ -58,6 +58,9 @@
#endif
#ifdef HAVE_MMAP
#include <sys/mman.h>
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *) -1)
+#endif
#endif
#if 0
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: Fix gdb 7.0 compilation on IRIX 5.3
2009-11-23 20:45 ` Rainer Orth
@ 2009-11-23 21:35 ` Tom Tromey
2009-11-23 21:42 ` Rainer Orth
2009-11-23 22:33 ` Joel Brobecker
1 sibling, 1 reply; 7+ messages in thread
From: Tom Tromey @ 2009-11-23 21:35 UTC (permalink / raw)
To: Rainer Orth; +Cc: gdb-patches
>>>>> "Rainer" == Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
Rainer> I didn't see the warning, and used the cast-free form since gcc had
Rainer> both. I notice now that they use casts to char * when MAP_FAILED is
Rainer> used.
Rainer> Could you check this in for me?
Sure, I'll do it soon.
Rainer> I couldn't check out an rw cvs tree from sourceware.org,
Rainer> although I should have rw access to src.
Rainer> ro@manam 443 > cvs -d :ext:ro@sourceware.org:/cvs/src co gdb
Rainer> Permission denied (publickey,gssapi-with-mic).
Rainer> cvs [checkout aborted]: end of file from server (consult above messages if any)
Peculiar. I checked and you are in the right group.
Maybe you are using the wrong key or something.
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fix gdb 7.0 compilation on IRIX 5.3
2009-11-23 21:35 ` Tom Tromey
@ 2009-11-23 21:42 ` Rainer Orth
0 siblings, 0 replies; 7+ messages in thread
From: Rainer Orth @ 2009-11-23 21:42 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
Tom Tromey <tromey@redhat.com> writes:
>>>>>> "Rainer" == Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
>
> Rainer> I didn't see the warning, and used the cast-free form since gcc had
> Rainer> both. I notice now that they use casts to char * when MAP_FAILED is
> Rainer> used.
>
> Rainer> Could you check this in for me?
>
> Sure, I'll do it soon.
Excellent, thanks.
> Rainer> I couldn't check out an rw cvs tree from sourceware.org,
> Rainer> although I should have rw access to src.
> Rainer> ro@manam 443 > cvs -d :ext:ro@sourceware.org:/cvs/src co gdb
> Rainer> Permission denied (publickey,gssapi-with-mic).
> Rainer> cvs [checkout aborted]: end of file from server (consult above messages if any)
>
> Peculiar. I checked and you are in the right group.
> Maybe you are using the wrong key or something.
Indeed: I'm still using a v1 key for gcc.gnu.org and sourceware.org, but
also have a v2 one. When I configure ssh accordingly, a r/w checkout
works.
Thanks.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fix gdb 7.0 compilation on IRIX 5.3
2009-11-23 20:45 ` Rainer Orth
2009-11-23 21:35 ` Tom Tromey
@ 2009-11-23 22:33 ` Joel Brobecker
2009-11-24 17:32 ` Tom Tromey
1 sibling, 1 reply; 7+ messages in thread
From: Joel Brobecker @ 2009-11-23 22:33 UTC (permalink / raw)
To: Rainer Orth; +Cc: tromey, gdb-patches
> Could you check this in for me? I couldn't check out an rw cvs tree from
> sourceware.org, although I should have rw access to src.
Someone beat me to it, but I confirm that this change has been checked
in HEAD.
How about the 7.0 branch?
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Fix gdb 7.0 compilation on IRIX 5.3
2009-11-23 22:33 ` Joel Brobecker
@ 2009-11-24 17:32 ` Tom Tromey
0 siblings, 0 replies; 7+ messages in thread
From: Tom Tromey @ 2009-11-24 17:32 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Rainer Orth, gdb-patches
>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
>> Could you check this in for me? I couldn't check out an rw cvs tree from
>> sourceware.org, although I should have rw access to src.
Joel> Someone beat me to it, but I confirm that this change has been checked
Joel> in HEAD.
Joel> How about the 7.0 branch?
I just committed it there as well.
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-11-24 17:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-23 18:54 Fix gdb 7.0 compilation on IRIX 5.3 Rainer Orth
2009-11-23 20:19 ` Tom Tromey
2009-11-23 20:45 ` Rainer Orth
2009-11-23 21:35 ` Tom Tromey
2009-11-23 21:42 ` Rainer Orth
2009-11-23 22:33 ` Joel Brobecker
2009-11-24 17:32 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox