Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Luis Machado <lgustavo@codesourcery.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Guard compile tests from running when unsupported + harden feature support check
Date: Wed, 19 Aug 2015 13:46:00 -0000	[thread overview]
Message-ID: <55D48891.7050808@redhat.com> (raw)
In-Reply-To: <55D485D1.8040802@codesourcery.com>

On 08/19/2015 02:34 PM, Luis Machado wrote:

>> But please don't make us guess; please expand on when do you see this.
> 
> It is related to how the binaries are built, without debug info. That's 
> how GDB reacts to these GCC 5.2-produced binaries.
> 

...

> 
> Enabling debug info i see the standard error about missing libcc1, which 
> may be an alternate fix, though checking for unsupported languages does 
> sound useful to me.

I disagree.  It's a bug, because the tests are testing C code.

> compile-ifunc.exp:
>
> #0  0x100007b0 in main ()
> (gdb) show language
> show language
> The current source language is "auto; currently asm".
>

This binary has no debug info (by test design), so we should just
make the test do "set language c" (with a comment).

> compile-ops.exp:
>
> Breakpoint 1, 0x10000724 in func (param=268503652,
> optimized_out=<optimized out>)^M
> (gdb) compile code -- ;^M
> No compiler support for this language.^M
>
> show language
> The current source language is "auto; currently asm".

This one looks like a gdb bug?  AFAICS, the test generates
debug info, and gdb should have figured out the language is c.
At least, from skimming the test's .exp, I see:

	compile_unit {
	    {name file1.txt}
	    {language @DW_LANG_C}
             ^^^^^^^^^^^^^^^^^^^
	    {low_pc func_start addr}
	    {high_pc func_end addr}
	} {
	    global program


BTW, it'd be nice if the "No compiler support for this language"
error told us which language is "this"...

Thanks,
Pedro Alves


  reply	other threads:[~2015-08-19 13:46 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 [this message]
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       ` [PATCH] Guard compile tests from running when unsupported + harden feature support check Luis Machado

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=55D48891.7050808@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=lgustavo@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