Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/3] Fix gdb.base/func-ptrs.exp fails in ppc64 and arm thumb mode
Date: Fri, 14 Oct 2016 10:53:00 -0000	[thread overview]
Message-ID: <1476442387-17291-1-git-send-email-yao.qi@linaro.org> (raw)

I see some test fails in gdb.base/func-ptrs.exp in arm thumb mode,
because the LSB bit is lost when we assign a function to a function
pointer in GDB.  I proposed a patch
https://sourceware.org/ml/gdb-patches/2016-06/msg00217.html but we
decided to fix this problem rather than skip the test, and agreed
that assignment in GDB should end up the same value as we do the
same in .c file.

When I looked into this problem again, I find such problem exists
on all targets which have function descriptors, IOW, function pointer
address isn't function address, like ppc64, ia64, frv and hppa32.
(Function pointer with LSB set in arm thumb mode can be regarded
as a function descriptor as well, IMO)

This issue was discussed in GNU Cauldron this year, and I got some
helpful insights from Pedro and Ulrich.  I finally have a RFC in
patch #2, which is the major part of this patch series.  As I
mentioned in patch #2, it has some user visible changes, and you can
see these changes in patch #3.  Comments are welcome!

Regression tested on ppc64-linux (gcc110) native and arm-linux gdbserver.
I failed to run ppc64-linux tests with gdbserver, because
process-dies-while-detaching.exp, IIRC, generates a lot of zombie
GDBservers and the following tests are slowed down and timeout.  I
didn't look into them in details.

*** BLURB HERE ***

Yao Qi (3):
  Use get_var_address in test cases
  Record function descriptor address instead of function address in
    value
  Update test cases

 gdb/arch-utils.c                                   |  6 +++++
 gdb/arch-utils.h                                   |  1 +
 gdb/arm-tdep.c                                     | 23 +++++++++++++++++
 gdb/ax-gdb.c                                       | 12 ++++++---
 gdb/findvar.c                                      |  5 ++++
 gdb/gdbarch.c                                      | 23 +++++++++++++++++
 gdb/gdbarch.h                                      |  6 +++++
 gdb/gdbarch.sh                                     |  4 +++
 gdb/infcall.c                                      |  2 +-
 gdb/ppc-linux-tdep.c                               |  2 ++
 gdb/ppc64-tdep.c                                   | 30 ++++++++++++++++++++++
 gdb/ppc64-tdep.h                                   |  3 ++-
 gdb/ppcfbsd-tdep.c                                 |  2 ++
 gdb/testsuite/gdb.base/break-fun-addr.exp          |  4 +--
 gdb/testsuite/gdb.base/breakpoint-in-ro-region.exp |  2 +-
 gdb/testsuite/gdb.base/examine-backward.exp        |  3 ++-
 gdb/testsuite/gdb.mi/mi-var-cmd.exp                |  4 +--
 gdb/testsuite/gdb.python/py-events.exp             |  7 +----
 gdb/testsuite/gdb.trace/tracecmd.exp               |  9 +++----
 gdb/testsuite/lib/dwarf.exp                        |  5 ++--
 gdb/testsuite/lib/gdb.exp                          |  3 ++-
 gdb/value.c                                        |  4 ++-
 22 files changed, 134 insertions(+), 26 deletions(-)

-- 
1.9.1


             reply	other threads:[~2016-10-14 10:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 10:53 Yao Qi [this message]
2016-10-14 10:53 ` [RFC 3/3] Update test cases Yao Qi
2016-10-14 10:53 ` [PATCH 1/3] Use get_var_address in " Yao Qi
2016-10-14 10:53 ` [RFC 2/3] Record function descriptor address instead of function address in value Yao Qi
2016-10-14 17:35   ` Simon Marchi
2016-10-17 11:40     ` Yao Qi
2016-10-17 15:40       ` Simon Marchi
2016-10-17 15:51   ` Ulrich Weigand
2016-10-18  2:27     ` Maciej W. Rozycki
2016-10-18 13:03       ` Yao Qi
2016-10-28 16:20       ` Yao Qi
2017-10-03 18:12         ` Maciej W. Rozycki
2017-10-04 21:25           ` Yao Qi
2016-10-28 16:10     ` Yao Qi
2016-10-28 18:41       ` Ulrich Weigand

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=1476442387-17291-1-git-send-email-yao.qi@linaro.org \
    --to=qiyaoltc@gmail.com \
    --cc=gdb-patches@sourceware.org \
    /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