From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: jan.kratochvil@redhat.com (Jan Kratochvil)
Cc: palves@redhat.com (Pedro Alves),
simon.marchi@ericsson.com (Simon Marchi),
keiths@redhat.com (Keith Seitz),
gdb-patches@sourceware.org
Subject: Re: ppc64 regression: [PATCH 1/2] Fix "list ambiguous_variable"
Date: Sun, 26 Nov 2017 16:38:00 -0000 [thread overview]
Message-ID: <20171126163756.1515ED802F9@oc3748833570.ibm.com> (raw)
In-Reply-To: <20171125074041.GA17197@host1.jankratochvil.net> from "Jan Kratochvil" at Nov 25, 2017 08:40:41 AM
Jan Kratochvil wrote:
> On Mon, 16 Oct 2017 17:03:18 +0200, Simon Marchi wrote:
> > The buildbot shows some failures on ppc64be:
> >
> > PASS -> FAIL: gdb.base/dbx.exp: whereis my_list
> > PASS -> FAIL: gdb.mi/gdb669.exp: -thread-list-ids
> > PASS -> FAIL: gdb.mi/gdb669.exp: finding MI result string
> > PASS -> FAIL: gdb.mi/gdb669.exp: finding number of threads in MI output
> >
> > I tested on gcc110, and bisect points to this patch here (for both tests).
> > A symptom of the problem is that "break main" generates two locations.
> >
> > Before (at e5f25bc5^):
> >
> > (gdb) b main
> > Breakpoint 1 at 0x10000560: file test.c, line 3.
> > (gdb) info breakpoints
> > Num Type Disp Enb Address What
> > 1 breakpoint keep y 0x0000000010000560 in main at test.c:3
> >
> > After (at e5f25bc5)
> >
> > (gdb) b main
> > Breakpoint 1 at 0x10000560: main. (2 locations)
> > (gdb) info breakpoints
> > Num Type Disp Enb Address What
> > 1 breakpoint keep y <MULTIPLE>
> > 1.1 y 0x0000000010000560 in main at test.c:3
> > 1.2 y 0x0000000010020078 <main>
>
> I have also hit this regression now on RHEL-7.5pre ppc64:
>
> e5f25bc5d6dba5a5c4dd36e08afd57e918c63dea is the first bad commit
> commit e5f25bc5d6dba5a5c4dd36e08afd57e918c63dea
> Author: Pedro Alves <palves@redhat.com>
> Date: Wed Sep 20 16:12:54 2017 +0100
> Fix "list ambiguous_variable"
>
> echo 'main(){}'|gcc -g -x c -;./gdb -batch ./a.out -ex start
> Temporary breakpoint 1 at 0x10000560: file <stdin>, line 1.
> Temporary breakpoint 1, main () at <stdin>:1
> 1 <stdin>: No such file or directory.
> ->
> Temporary breakpoint 1 at 0x10000560: main. (2 locations)
> Program received signal SIGSEGV, Segmentation fault.
> 0x7d82100810000554 in ?? ()
I now see this as well on Cell/B.E. This is a serious regression that
causes "start" to always fail for me ...
The problem seems to be that GDB sets a breakpoint into the function
descriptor for main, which is not a good idea.
Looking at the commit identified above, it seems that GDB now only
runs the address through gdbarch_convert_from_func_ptr_addr if
msymbol_is_text returns true. However, if the symbol points to
a function descriptor, msymbol_is_text would be false since this
is in fact outside the text section.
So I think probably we need to still run the address through
gdbarch_convert_from_func_ptr_addr, and if that detects that it
was indeed a function descriptor, always treat the resulting
address as a function.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2017-11-26 16:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-04 18:47 [PATCH 0/2] Make "list ambiguous" show symbol names too Pedro Alves
2017-09-04 18:47 ` [PATCH 2/2] " Pedro Alves
2017-09-06 18:43 ` Keith Seitz
2017-09-04 18:47 ` [PATCH 1/2] Fix "list ambiguous_variable" Pedro Alves
2017-09-06 18:41 ` Keith Seitz
2017-09-20 15:25 ` Pedro Alves
2017-10-16 15:03 ` Simon Marchi
2017-11-25 7:40 ` ppc64 regression: " Jan Kratochvil
2017-11-26 16:38 ` Ulrich Weigand [this message]
2017-11-29 19:08 ` [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors) (was: Re: ppc64 regression: [PATCH 1/2] Fix "list ambiguous_variable") Pedro Alves
2017-11-29 19:20 ` [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors) (was: Re: ppc64 regression: [PATCH 1/2] Fix "list amb Ulrich Weigand
2017-11-29 19:28 ` Pedro Alves
2017-12-08 9:44 ` [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors) Yao Qi
2017-12-08 11:34 ` Pedro Alves
2017-12-08 16:57 ` Yao Qi
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=20171126163756.1515ED802F9@oc3748833570.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=keiths@redhat.com \
--cc=palves@redhat.com \
--cc=simon.marchi@ericsson.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