* [PATCH] Mention language in compile error message
@ 2015-08-19 19:06 Luis Machado
2015-08-24 16:20 ` Luis Machado
2015-08-24 17:20 ` Pedro Alves
0 siblings, 2 replies; 5+ messages in thread
From: Luis Machado @ 2015-08-19 19:06 UTC (permalink / raw)
To: gdb-patches
This patch improves one of the compile error messages by mentioning the
language.
Before - No compiler support for this language.
After - No compiler support for language <language>.
How does that look?
gdb/ChangeLog:
2015-08-19 Luis Machado <lgustavo@codesourcery.com>
* compile/compile.c (compile_to_object): Mention language in
error message.
---
gdb/compile/compile.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
index 499c530..ff68b2d 100644
--- a/gdb/compile/compile.c
+++ b/gdb/compile/compile.c
@@ -491,7 +491,8 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
/* Set up instance and context for the compiler. */
if (current_language->la_get_compile_instance == NULL)
- error (_("No compiler support for this language."));
+ error (_("No compiler support for language %s."),
+ current_language->la_name);
compiler = current_language->la_get_compile_instance ();
cleanup = make_cleanup (cleanup_compile_instance, compiler);
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Mention language in compile error message
2015-08-19 19:06 [PATCH] Mention language in compile error message Luis Machado
@ 2015-08-24 16:20 ` Luis Machado
2015-08-24 17:20 ` Pedro Alves
1 sibling, 0 replies; 5+ messages in thread
From: Luis Machado @ 2015-08-24 16:20 UTC (permalink / raw)
To: gdb-patches
I suppose this is obvious enough that could be pushed?
On 08/19/2015 04:06 PM, Luis Machado wrote:
> This patch improves one of the compile error messages by mentioning the
> language.
>
> Before - No compiler support for this language.
> After - No compiler support for language <language>.
>
> How does that look?
>
> gdb/ChangeLog:
>
> 2015-08-19 Luis Machado <lgustavo@codesourcery.com>
>
> * compile/compile.c (compile_to_object): Mention language in
> error message.
> ---
> gdb/compile/compile.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c
> index 499c530..ff68b2d 100644
> --- a/gdb/compile/compile.c
> +++ b/gdb/compile/compile.c
> @@ -491,7 +491,8 @@ compile_to_object (struct command_line *cmd, const char *cmd_string,
>
> /* Set up instance and context for the compiler. */
> if (current_language->la_get_compile_instance == NULL)
> - error (_("No compiler support for this language."));
> + error (_("No compiler support for language %s."),
> + current_language->la_name);
> compiler = current_language->la_get_compile_instance ();
> cleanup = make_cleanup (cleanup_compile_instance, compiler);
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Mention language in compile error message
2015-08-19 19:06 [PATCH] Mention language in compile error message Luis Machado
2015-08-24 16:20 ` Luis Machado
@ 2015-08-24 17:20 ` Pedro Alves
2015-08-27 5:05 ` Luis Machado
1 sibling, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2015-08-24 17:20 UTC (permalink / raw)
To: Luis Machado, gdb-patches
On 08/19/2015 08:06 PM, Luis Machado wrote:
> This patch improves one of the compile error messages by mentioning the
> language.
>
> Before - No compiler support for this language.
> After - No compiler support for language <language>.
>
> How does that look?
>
> gdb/ChangeLog:
>
> 2015-08-19 Luis Machado <lgustavo@codesourcery.com>
>
> * compile/compile.c (compile_to_object): Mention language in
> error message.
OK.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Mention language in compile error message
2015-08-24 17:20 ` Pedro Alves
@ 2015-08-27 5:05 ` Luis Machado
2015-10-26 3:47 ` [obv] Fix compile.exp error message expectation [Re: [PATCH] Mention language in compile error message] Jan Kratochvil
0 siblings, 1 reply; 5+ messages in thread
From: Luis Machado @ 2015-08-27 5:05 UTC (permalink / raw)
To: Pedro Alves, gdb-patches
On 08/24/2015 02:20 PM, Pedro Alves wrote:
> On 08/19/2015 08:06 PM, Luis Machado wrote:
>> This patch improves one of the compile error messages by mentioning the
>> language.
>>
>> Before - No compiler support for this language.
>> After - No compiler support for language <language>.
>>
>> How does that look?
>>
>> gdb/ChangeLog:
>>
>> 2015-08-19 Luis Machado <lgustavo@codesourcery.com>
>>
>> * compile/compile.c (compile_to_object): Mention language in
>> error message.
>
> OK.
I've pushed this now.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [obv] Fix compile.exp error message expectation [Re: [PATCH] Mention language in compile error message]
2015-08-27 5:05 ` Luis Machado
@ 2015-10-26 3:47 ` Jan Kratochvil
0 siblings, 0 replies; 5+ messages in thread
From: Jan Kratochvil @ 2015-10-26 3:47 UTC (permalink / raw)
To: Luis Machado; +Cc: Pedro Alves, gdb-patches
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
On Thu, 27 Aug 2015 07:05:10 +0200, Luis Machado wrote:
> On 08/24/2015 02:20 PM, Pedro Alves wrote:
> >On 08/19/2015 08:06 PM, Luis Machado wrote:
> >>2015-08-19 Luis Machado <lgustavo@codesourcery.com>
> >>
> >> * compile/compile.c (compile_to_object): Mention language in
> >> error message.
> >
> >OK.
>
> I've pushed this now.
Checked in as obvious.
[-- Attachment #2: Type: message/rfc822, Size: 1943 bytes --]
From: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: [PATCH] Fix compile.exp error message expectation
Date: Sun, 25 Oct 2015 12:16:10 +0100
commit cdaec3f3e7ea9118204f0e579bd3257234fbae63
Author: Luis Machado <lgustavo@codesourcery.com>
Date: Thu Aug 27 02:00:16 2015 -0300
Mention language in compile error message
regressed:
-PASS: gdb.compile/compile.exp: compile code globalvar
+FAIL: gdb.compile/compile.exp: compile code globalvar
Update the expected message.
gdb/testsuite/ChangeLog
2015-10-25 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.compile/compile.exp (compile code globalvar): Update expectation
for a change by "Mention language in compile error message".
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.compile/compile.exp | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 1313aa2..9369618 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-25 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * gdb.compile/compile.exp (compile code globalvar): Update expectation
+ for a change by "Mention language in compile error message".
+
2015-10-21 Simon Marchi <simon.marchi@polymtl.ca>
PR python/18073
diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp
index a416e9e..41c4ac9 100644
--- a/gdb/testsuite/gdb.compile/compile.exp
+++ b/gdb/testsuite/gdb.compile/compile.exp
@@ -324,7 +324,7 @@ gdb_test "compile code -z" "Unknown argument.*"
gdb_test "set lang java" \
"Warning: the current language does not match this frame."
-gdb_test "compile code globalvar" "No compiler support for this language\."
+gdb_test "compile code globalvar" "No compiler support for language java\\."
gdb_test_no_output "set lang auto"
gdb_test_no_output "compile code union union_type newdecl_u"
--
2.1.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-25 11:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-19 19:06 [PATCH] Mention language in compile error message Luis Machado
2015-08-24 16:20 ` Luis Machado
2015-08-24 17:20 ` Pedro Alves
2015-08-27 5:05 ` Luis Machado
2015-10-26 3:47 ` [obv] Fix compile.exp error message expectation [Re: [PATCH] Mention language in compile error message] Jan Kratochvil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox