* [Patch] Exit gdb/configure.tgt for unsupported targets
@ 2010-02-24 10:56 Ralf Corsepius
2010-02-24 16:51 ` Tom Tromey
0 siblings, 1 reply; 7+ messages in thread
From: Ralf Corsepius @ 2010-02-24 10:56 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 142 bytes --]
Hi,
The patch below (against 7.0.90) is meant to address the issues I
reported in
http://sourceware.org/ml/gdb/2010-02/msg00140.html
Ralf
[-- Attachment #2: gdb-7.0.90-gdb-configure.tgt.diff --]
[-- Type: text/plain, Size: 530 bytes --]
2010-02-23 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.tgt: Exit if ${gdb_target_obs}" is not set.
diff -Naur gdb-7.0.90.orig/gdb/configure.tgt gdb-7.0.90/gdb/configure.tgt
--- gdb-7.0.90.orig/gdb/configure.tgt 2010-01-19 11:22:42.000000000 +0100
+++ gdb-7.0.90/gdb/configure.tgt 2010-02-23 05:43:01.000000000 +0100
@@ -611,6 +611,11 @@
esac
+if test -z "${gdb_target_obs}"; then
+ echo "*** Configuration ${targ} is unsupported." >&2
+ exit 1
+fi
+
# map target onto default OS ABI
case "${targ}" in
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Patch] Exit gdb/configure.tgt for unsupported targets
2010-02-24 10:56 [Patch] Exit gdb/configure.tgt for unsupported targets Ralf Corsepius
@ 2010-02-24 16:51 ` Tom Tromey
2010-02-24 17:00 ` Ralf Corsepius
0 siblings, 1 reply; 7+ messages in thread
From: Tom Tromey @ 2010-02-24 16:51 UTC (permalink / raw)
To: Ralf Corsepius; +Cc: gdb-patches
>>>>> "Ralf" == Ralf Corsepius <ralf.corsepius@rtems.org> writes:
Ralf> 2010-02-23 Ralf Corsépius <ralf.corsepius@rtems.org>
Ralf> * configure.tgt: Exit if ${gdb_target_obs}" is not set.
Ralf> +if test -z "${gdb_target_obs}"; then
Ralf> + echo "*** Configuration ${targ} is unsupported." >&2
Ralf> + exit 1
Ralf> +fi
I think it would be better to do the test in configure.ac and use
AC_MSG_ERROR.
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Patch] Exit gdb/configure.tgt for unsupported targets
2010-02-24 16:51 ` Tom Tromey
@ 2010-02-24 17:00 ` Ralf Corsepius
2010-02-25 5:40 ` Ralf Corsepius
0 siblings, 1 reply; 7+ messages in thread
From: Ralf Corsepius @ 2010-02-24 17:00 UTC (permalink / raw)
To: tromey; +Cc: gdb-patches
On 02/24/2010 05:51 PM, Tom Tromey wrote:
>>>>>> "Ralf" == Ralf Corsepius<ralf.corsepius@rtems.org> writes:
>>>>>>
> Ralf> 2010-02-23 Ralf Corsépius<ralf.corsepius@rtems.org>
> Ralf> * configure.tgt: Exit if ${gdb_target_obs}" is not set.
>
> Ralf> +if test -z "${gdb_target_obs}"; then
> Ralf> + echo "*** Configuration ${targ} is unsupported.">&2
> Ralf> + exit 1
> Ralf> +fi
>
> I think it would be better to do the test in configure.ac and use
> AC_MSG_ERROR.
>
I wasn't aware "${gdb_target_obs}" is exported to configure.ac and
intended to keep configure.tgt self-contained ;)
Now that it apparently is exported and used in configure.ac, I agree
with you, configure.ac+AC_MSG_ERROR would be better.
Ralf
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Patch] Exit gdb/configure.tgt for unsupported targets
2010-02-24 17:00 ` Ralf Corsepius
@ 2010-02-25 5:40 ` Ralf Corsepius
2010-02-25 17:46 ` Tom Tromey
0 siblings, 1 reply; 7+ messages in thread
From: Ralf Corsepius @ 2010-02-25 5:40 UTC (permalink / raw)
To: gdb-patches; +Cc: Ralf Corsepius, tromey
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
On 02/24/2010 06:00 PM, Ralf Corsepius wrote:
> On 02/24/2010 05:51 PM, Tom Tromey wrote:
>>>>>>> "Ralf" == Ralf Corsepius<ralf.corsepius@rtems.org> writes:
>> Ralf> 2010-02-23 Ralf Corsépius<ralf.corsepius@rtems.org>
>> Ralf> * configure.tgt: Exit if ${gdb_target_obs}" is not set.
>>
>> Ralf> +if test -z "${gdb_target_obs}"; then
>> Ralf> + echo "*** Configuration ${targ} is unsupported.">&2
>> Ralf> + exit 1
>> Ralf> +fi
>>
>> I think it would be better to do the test in configure.ac and use
>> AC_MSG_ERROR.
> I wasn't aware "${gdb_target_obs}" is exported to configure.ac and
> intended to keep configure.tgt self-contained ;)
>
> Now that it apparently is exported and used in configure.ac, I agree
> with you, configure.ac+AC_MSG_ERROR would be better.
Reworked patch enclosed below.
Ralf
[-- Attachment #2: gdb-7.0.90-gdb-configure.diff --]
[-- Type: text/plain, Size: 1176 bytes --]
2010-02-25 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Exit if ${gdb_target_obs}" is not set.
* configure: Regenerate.
diff -Naur gdb-7.0.90.orig/gdb/configure gdb-7.0.90-rtems4.10-20100225/gdb/configure
--- gdb-7.0.90.orig/gdb/configure 2010-02-19 01:23:00.000000000 +0100
+++ gdb-7.0.90-rtems4.10-20100225/gdb/configure 2010-02-25 05:25:54.000000000 +0100
@@ -6927,6 +6927,10 @@
. ${srcdir}/configure.tgt
+ if test -z "${gdb_target_obs}"; then :
+ as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
+fi
+
# Target-specific object files
for i in ${gdb_target_obs}; do
case " $TARGET_OBS " in
diff -Naur gdb-7.0.90.orig/gdb/configure.ac gdb-7.0.90-rtems4.10-20100225/gdb/configure.ac
--- gdb-7.0.90.orig/gdb/configure.ac 2010-02-19 01:23:00.000000000 +0100
+++ gdb-7.0.90-rtems4.10-20100225/gdb/configure.ac 2010-02-25 05:25:48.000000000 +0100
@@ -161,6 +161,9 @@
. ${srcdir}/configure.tgt
+ AS_IF([test -z "${gdb_target_obs}"],
+ [AC_MSG_ERROR([configuration ${targ} is unsupported.])])
+
# Target-specific object files
for i in ${gdb_target_obs}; do
case " $TARGET_OBS " in
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Patch] Exit gdb/configure.tgt for unsupported targets
2010-02-25 5:40 ` Ralf Corsepius
@ 2010-02-25 17:46 ` Tom Tromey
2010-03-11 16:57 ` Ralf Corsepius
0 siblings, 1 reply; 7+ messages in thread
From: Tom Tromey @ 2010-02-25 17:46 UTC (permalink / raw)
To: Ralf Corsepius; +Cc: gdb-patches
>>>>> "Ralf" == Ralf Corsepius <ralf.corsepius@rtems.org> writes:
Ralf> 2010-02-25 Ralf Corsépius <ralf.corsepius@rtems.org>
Ralf> * configure.ac: Exit if ${gdb_target_obs}" is not set.
Ralf> * configure: Regenerate.
This is ok, thanks.
Tom
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Patch] Exit gdb/configure.tgt for unsupported targets
2010-02-25 17:46 ` Tom Tromey
@ 2010-03-11 16:57 ` Ralf Corsepius
2010-03-15 17:10 ` Joel Brobecker
0 siblings, 1 reply; 7+ messages in thread
From: Ralf Corsepius @ 2010-03-11 16:57 UTC (permalink / raw)
To: Tom Tromey; +Cc: Ralf Corsepius, gdb-patches
On 02/25/2010 06:46 PM, Tom Tromey wrote:
>>>>>> "Ralf" == Ralf Corsepius<ralf.corsepius@rtems.org> writes:
>
> Ralf> 2010-02-25 Ralf Corsépius<ralf.corsepius@rtems.org>
> Ralf> * configure.ac: Exit if ${gdb_target_obs}" is not set.
> Ralf> * configure: Regenerate.
>
> This is ok, thanks.
Could somebody please apply this patch (trunk and 7.1-branch).
I don't have write access to gdb.
Thanks,
Ralf
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Patch] Exit gdb/configure.tgt for unsupported targets
2010-03-11 16:57 ` Ralf Corsepius
@ 2010-03-15 17:10 ` Joel Brobecker
0 siblings, 0 replies; 7+ messages in thread
From: Joel Brobecker @ 2010-03-15 17:10 UTC (permalink / raw)
To: Ralf Corsepius; +Cc: Tom Tromey, gdb-patches
> >Ralf> 2010-02-25 Ralf Corsépius<ralf.corsepius@rtems.org>
> >Ralf> * configure.ac: Exit if ${gdb_target_obs}" is not set.
> >Ralf> * configure: Regenerate.
> >
> >This is ok, thanks.
>
> Could somebody please apply this patch (trunk and 7.1-branch).
Checked in. I hesitated about applying to the branch or not, since
this is hardly a critical problem, but since it seemed pretty safe
and might be helpful, I ended up agreeing with the suggestion. So,
it's been applied to the branch as well.
> I don't have write access to gdb.
Perhaps you might want to have write access? Please send me an email
if you do (and let me know if you already have write access in any other
GNU project hosted on sourceware.org).
--
Joel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-03-15 17:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-24 10:56 [Patch] Exit gdb/configure.tgt for unsupported targets Ralf Corsepius
2010-02-24 16:51 ` Tom Tromey
2010-02-24 17:00 ` Ralf Corsepius
2010-02-25 5:40 ` Ralf Corsepius
2010-02-25 17:46 ` Tom Tromey
2010-03-11 16:57 ` Ralf Corsepius
2010-03-15 17:10 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox