Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: gdb-patches@sourceware.org
Cc: "Yao Qi" <qiyaoltc@gmail.com>,
	"Metzger, Markus T" <markus.t.metzger@intel.com>,
	"Marcin Kościelnicki" <koriakin@0x04.net>
Subject: [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2
Date: Wed, 16 Mar 2016 18:56:00 -0000	[thread overview]
Message-ID: <1458154517-25441-2-git-send-email-arnez@linux.vnet.ibm.com> (raw)
In-Reply-To: <1458154517-25441-1-git-send-email-arnez@linux.vnet.ibm.com>

This patch added handling for some syscalls to linux-record.c:

  https://sourceware.org/ml/gdb-patches/2015-10/msg00452.html

But for both `pipe' and `pipe2' the patch lacks a statement after an
`if', such that the following `break' is interpreted as the `if'-body
instead.

This adds the missing (return-) statements for the conditionals.

gdb/ChangeLog:

	* linux-record.c (record_linux_system_call): Add missing return
	statements to handling of pipe and pipe2 syscalls.
---
 gdb/linux-record.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gdb/linux-record.c b/gdb/linux-record.c
index a40845a..2e86936 100644
--- a/gdb/linux-record.c
+++ b/gdb/linux-record.c
@@ -354,6 +354,7 @@ record_linux_system_call (enum gdb_syscall syscall,
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					 tdep->size_int * 2))
+        return -1;
       break;
 
     case gdb_sys_times:
@@ -2312,6 +2313,7 @@ Do you want to stop the program?"),
       regcache_raw_read_unsigned (regcache, tdep->arg1, &tmpulongest);
       if (record_full_arch_list_add_mem ((CORE_ADDR) tmpulongest,
 					 tdep->size_int * 2))
+        return -1;
       break;
 
     case gdb_sys_inotify_init1:
-- 
2.5.0


  parent reply	other threads:[~2016-03-16 18:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 18:55 [PATCH 0/3] Some cleanups in linux-record.c Andreas Arnez
2016-03-16 18:56 ` [PATCH 2/3] linux-record.c: Fix whitespace issues Andreas Arnez
2016-03-17  8:44   ` Yao Qi
2016-03-17  9:12     ` Andreas Arnez
2016-03-16 18:56 ` Andreas Arnez [this message]
2016-03-16 20:23   ` [PATCH 1/3] linux-record: Fix bad fall-through for pipe/pipe2 Marcin Kościelnicki
2016-03-17 12:51     ` Andreas Arnez
2016-03-17  8:42   ` Yao Qi
2016-03-17  9:11     ` Andreas Arnez
2016-03-16 18:57 ` [PATCH 3/3] linux-record: Simplify with record_mem_at_reg() Andreas Arnez
2016-03-17  8:45   ` Yao Qi
2016-03-17  9:11     ` Andreas Arnez

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=1458154517-25441-2-git-send-email-arnez@linux.vnet.ibm.com \
    --to=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=koriakin@0x04.net \
    --cc=markus.t.metzger@intel.com \
    --cc=qiyaoltc@gmail.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