From: Luis Machado <lgustavo@codesourcery.com>
To: Pedro Alves <palves@redhat.com>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Guard compile tests from running when unsupported + harden feature support check
Date: Thu, 27 Aug 2015 04:57:00 -0000 [thread overview]
Message-ID: <55DE989C.7030402@codesourcery.com> (raw)
In-Reply-To: <55D48891.7050808@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 291 bytes --]
On 08/19/2015 10:45 AM, Pedro Alves wrote:
> On 08/19/2015 02:34 PM, Luis Machado wrote:
>
> This binary has no debug info (by test design), so we should just
> make the test do "set language c" (with a comment).
>
Here's what i pushed for this one.
I see no further gdb.compile failures.
[-- Attachment #2: compile.diff --]
[-- Type: text/x-patch, Size: 2043 bytes --]
commit 8ce74153537add5e364865518a72194ab58b3dbc
Author: Luis Machado <lgustavo@codesourcery.com>
Date: Thu Aug 27 01:49:05 2015 -0300
Force language to C in gdb.compile/compile-ifunc.exp
Due to the lack of debug information in the binary, GDB is unable to figure
out what language is being used. This may be a problem when doing remote
debugging and the binary stops at the entry point containing asm code.
In this case GDB will switch to asm as current language and will not switch
back to C when it reaches main, which in turn causes the compile feature check
to malfunction.
This is solved by forcing the language to C after reaching main.
gdb/testsuite/ChangeLog:
2015-08-26 Luis Machado <lgustavo@codesourcery.com>
* gdb.compile/compile-ifunc.exp (with_test_prefix): Force language
to C.
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5bba9d7..7b271e2 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-26 Luis Machado <lgustavo@codesourcery.com>
+
+ * gdb.compile/compile-ifunc.exp (with_test_prefix): Force language
+ to C.
+
2015-08-26 Patrick Palka <patrick@parcs.ath.cx>
* gdb.base/run-after-attach.exp: New test file.
diff --git a/gdb/testsuite/gdb.compile/compile-ifunc.exp b/gdb/testsuite/gdb.compile/compile-ifunc.exp
index 026c62f..3a96552 100644
--- a/gdb/testsuite/gdb.compile/compile-ifunc.exp
+++ b/gdb/testsuite/gdb.compile/compile-ifunc.exp
@@ -25,6 +25,12 @@ with_test_prefix "nodebug" {
return -1
}
+ # This binary has no debug information, so force the language to C in case
+ # GDB happened to see real asm code when it stopped at the entry point
+ # when talking to a remote target, like gdbserver. This guarantees the
+ # feature check below will work.
+ gdb_test_no_output "set language c" ""
+
if {[skip_compile_feature_tests]} {
untested "compile command not supported (could not find libcc1 shared library?)"
return -1
prev parent reply other threads:[~2015-08-27 4:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-19 12:54 Luis Machado
2015-08-19 13:15 ` Pedro Alves
2015-08-19 13:34 ` Luis Machado
2015-08-19 13:46 ` Pedro Alves
2015-08-19 18:01 ` Luis Machado
2015-08-19 19:57 ` [PATCH] Fix language of compilation unit with unknown file extension (Re: [PATCH] Guard compile tests from running when unsupported + harden feature support check) Pedro Alves
2015-08-19 20:02 ` Pedro Alves
2015-08-19 20:43 ` Doug Evans
2015-08-20 11:37 ` Pedro Alves
2015-08-27 4:57 ` Luis Machado [this message]
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=55DE989C.7030402@codesourcery.com \
--to=lgustavo@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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