Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix gdb.base/func-ptrs.exp fails in ppc64 and arm thumb mode
@ 2016-10-14 10:53 Yao Qi
  2016-10-14 10:53 ` [RFC 3/3] Update test cases Yao Qi
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Yao Qi @ 2016-10-14 10:53 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-10-04 21:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-14 10:53 [PATCH 0/3] Fix gdb.base/func-ptrs.exp fails in ppc64 and arm thumb mode Yao Qi
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox