Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alan Hayward <Alan.Hayward@arm.com>
To: GDB Patches <gdb-patches@sourceware.org>
Cc: nd <nd@arm.com>
Subject: [PING][PATCH v3 0/3] Aarch64: Fix segfault when casting dummy calls
Date: Thu, 18 Oct 2018 09:50:00 -0000	[thread overview]
Message-ID: <A2CC01D2-8AD2-4970-BCA3-20CA071ED49B@arm.com> (raw)
In-Reply-To: <20181011144905.66908-1-alan.hayward@arm.com>

Ping.

> On 11 Oct 2018, at 15:49, Alan Hayward <Alan.Hayward@arm.com> wrote:
> 
> Aarch64: Fix segfault when casting dummy calls
> 
> Following Pedro's review I've squashed the new int param into a new enum
> and rewritten the test.
> 
> Prevent the int cast in the following causing a segfault on aarch64:
> (gdb) b foo if (int)strcmp(name,"abc") == 0
> (gdb) run
> 
> The fix is to remove a bunch of code from aarch64_push_dummy_call,
> instead passing down the information from the caller.
> 
> Patch 1 removes two ints from call_function_by_hand_dummy, replacing
> them with an enum.
> Patch 2 passes that enum down to _push_dummy_call.
> Patch 3 makes use of the enum in aarch64_push_dummy_call and adds a
> test case.
> 
> Tested with make check on aarch64 and build with all targets on x86.
> Patch 2 needs a careful scan to make sure it doesn't break any other
> targets.
> 
> 
> Alan Hayward (3):
>  Use enum for return method for dummy calls
>  Pass return_method to _push_dummy_call
>  Aarch64: Fix segfault when casting dummy calls
> 
> gdb/aarch64-tdep.c                            |  35 +----
> gdb/alpha-tdep.c                              |   7 +-
> gdb/amd64-tdep.c                              |  13 +-
> gdb/amd64-windows-tdep.c                      |  12 +-
> gdb/arc-tdep.c                                |   5 +-
> gdb/arm-tdep.c                                |   5 +-
> gdb/avr-tdep.c                                |   5 +-
> gdb/bfin-tdep.c                               |   4 +-
> gdb/cris-tdep.c                               |   9 +-
> gdb/csky-tdep.c                               |   5 +-
> gdb/frv-tdep.c                                |   5 +-
> gdb/gdbarch.c                                 |   4 +-
> gdb/gdbarch.h                                 |  21 ++-
> gdb/gdbarch.sh                                |  19 ++-
> gdb/h8300-tdep.c                              |   5 +-
> gdb/hppa-tdep.c                               |  10 +-
> gdb/i386-darwin-tdep.c                        |   5 +-
> gdb/i386-tdep.c                               |   5 +-
> gdb/ia64-tdep.c                               |  11 +-
> gdb/infcall.c                                 |  28 ++--
> gdb/iq2000-tdep.c                             |   8 +-
> gdb/lm32-tdep.c                               |   5 +-
> gdb/m32c-tdep.c                               |   5 +-
> gdb/m32r-tdep.c                               |   5 +-
> gdb/m68hc11-tdep.c                            |   9 +-
> gdb/m68k-tdep.c                               |   5 +-
> gdb/mep-tdep.c                                |   4 +-
> gdb/mips-tdep.c                               |  19 +--
> gdb/mn10300-tdep.c                            |   6 +-
> gdb/msp430-tdep.c                             |   5 +-
> gdb/nds32-tdep.c                              |   5 +-
> gdb/nios2-tdep.c                              |   5 +-
> gdb/or1k-tdep.c                               |   5 +-
> gdb/ppc-sysv-tdep.c                           |  10 +-
> gdb/ppc-tdep.h                                |  25 ++--
> gdb/riscv-tdep.c                              |   8 +-
> gdb/rl78-tdep.c                               |   5 +-
> gdb/rs6000-aix-tdep.c                         |   5 +-
> gdb/rs6000-lynx178-tdep.c                     |   5 +-
> gdb/rx-tdep.c                                 |   8 +-
> gdb/s390-tdep.c                               |   7 +-
> gdb/score-tdep.c                              |   5 +-
> gdb/sh-tdep.c                                 |   9 +-
> gdb/sparc-tdep.c                              |  15 +-
> gdb/sparc64-tdep.c                            |  14 +-
> gdb/spu-tdep.c                                |   5 +-
> gdb/testsuite/gdb.base/condbreak-solib-lib.cc |  22 +++
> .../gdb.base/condbreak-solib-main.cc          |  39 +++++
> gdb/testsuite/gdb.base/condbreak-solib.exp    | 136 ++++++++++++++++++
> gdb/tic6x-tdep.c                              |   5 +-
> gdb/tilegx-tdep.c                             |   4 +-
> gdb/v850-tdep.c                               |   4 +-
> gdb/vax-tdep.c                                |   5 +-
> gdb/xstormy16-tdep.c                          |   5 +-
> gdb/xtensa-tdep.c                             |  10 +-
> 55 files changed, 444 insertions(+), 206 deletions(-)
> create mode 100644 gdb/testsuite/gdb.base/condbreak-solib-lib.cc
> create mode 100644 gdb/testsuite/gdb.base/condbreak-solib-main.cc
> create mode 100644 gdb/testsuite/gdb.base/condbreak-solib.exp
> 
> -- 
> 2.17.1 (Apple Git-112)
> 


      parent reply	other threads:[~2018-10-18  9:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-11 14:49 [PATCH " Alan Hayward
2018-10-11 14:49 ` [PATCH v3 3/3] " Alan Hayward
2018-10-19 11:36   ` Pedro Alves
2018-10-23 16:08     ` Alan Hayward
2018-10-24 15:15       ` Pedro Alves
2018-10-29 11:58         ` Alan Hayward
     [not found]           ` <862cf8f4-9491-a1eb-251e-6c7c1ffffa6c@redhat.com>
2018-10-29 14:56             ` Alan Hayward
2018-10-29 18:13               ` Pedro Alves
2018-10-30 11:13                 ` Alan Hayward
2018-10-30 16:31                   ` Pedro Alves
2018-10-30 17:09                     ` Alan Hayward
2018-10-30 17:40                       ` Pedro Alves
2018-10-11 14:49 ` [PATCH v3 1/3] Use enum for return method for " Alan Hayward
2018-10-19 11:28   ` Pedro Alves
2018-10-11 14:49 ` [PATCH v3 2/3] Pass return_method to _push_dummy_call Alan Hayward
2018-10-19 11:31   ` Pedro Alves
2018-10-18  9:50 ` Alan Hayward [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=A2CC01D2-8AD2-4970-BCA3-20CA071ED49B@arm.com \
    --to=alan.hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@arm.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