This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] remove dead if stmt from amd64_linux_syscall_record
- From: Michael Snyder <msnyder at vmware dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Hui Zhu <teawater at gmail dot com>, Mark Kettenis <mark dot kettenis at xs4all dot nl>
- Date: Sat, 26 Feb 2011 11:52:03 -0800
- Subject: [commit] remove dead if stmt from amd64_linux_syscall_record
The condition can't be false, so the statement is dead.
2011-02-26 Michael Snyder <msnyder@vmware.com>
* amd64-linux-tdep.c (amd64_linux_syscall_record): Delete
dead if statement. Condition can't be false.
Index: amd64-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/amd64-linux-tdep.c,v
retrieving revision 1.41
diff -u -p -u -p -r1.41 amd64-linux-tdep.c
--- amd64-linux-tdep.c 7 Jan 2011 19:36:15 -0000 1.41
+++ amd64-linux-tdep.c 26 Feb 2011 19:40:25 -0000
@@ -1174,25 +1174,24 @@ amd64_linux_syscall_record (struct regca
break;
case amd64_sys_arch_prctl:
- if (syscall_native == amd64_sys_arch_prctl)
- {
- ULONGEST arg3;
-
- regcache_raw_read_unsigned (regcache, amd64_linux_record_tdep.arg3,
- &arg3);
- if (arg3 == RECORD_ARCH_GET_FS || arg3 == RECORD_ARCH_GET_GS)
- {
- CORE_ADDR addr;
-
- regcache_raw_read_unsigned (regcache,
- amd64_linux_record_tdep.arg2,
- &addr);
- if (record_arch_list_add_mem (addr,
- amd64_linux_record_tdep.size_ulong))
- return -1;
- }
- goto record_regs;
- }
+ {
+ ULONGEST arg3;
+
+ regcache_raw_read_unsigned (regcache, amd64_linux_record_tdep.arg3,
+ &arg3);
+ if (arg3 == RECORD_ARCH_GET_FS || arg3 == RECORD_ARCH_GET_GS)
+ {
+ CORE_ADDR addr;
+
+ regcache_raw_read_unsigned (regcache,
+ amd64_linux_record_tdep.arg2,
+ &addr);
+ if (record_arch_list_add_mem (addr,
+ amd64_linux_record_tdep.size_ulong))
+ return -1;
+ }
+ goto record_regs;
+ }
break;
}