aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-09-02 16:28:54 +0100
committerGary Benson <gbenson@redhat.com>2014-09-02 16:31:20 +0100
commited859da732b00d5928f0b311454fa6474c04c15b (patch)
tree0b9763c19c25101a1c934c4236d4bdb77c265ea6 /gdb/gdbserver
parentf1fb1cd70ad4b68c23b3fb5f20dd9559b3e3b7ea (diff)
downloadgdb-ed859da732b00d5928f0b311454fa6474c04c15b.zip
gdb-ed859da732b00d5928f0b311454fa6474c04c15b.tar.gz
gdb-ed859da732b00d5928f0b311454fa6474c04c15b.tar.bz2
Use XCNEW rather than xcalloc (1, ...) in linux-x86-low.c
This commit replaces two uses of xcalloc (1, ...) with XCNEW. gdb/gdbserver/ChangeLog: * linux-x86-low.c (x86_linux_new_process): Use XCNEW. (x86_linux_new_thread): Likewise.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/linux-x86-low.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index caa243d..b1e8117 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-02 Gary Benson <gbenson@redhat.com>
+
+ * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
+ (x86_linux_new_thread): Likewise.
+
2014-08-29 Gary Benson <gbenson@redhat.com>
* server.h (setjmp.h): Do not include.
diff --git a/gdb/gdbserver/linux-x86-low.c b/gdb/gdbserver/linux-x86-low.c
index 5175019..8666f6f 100644
--- a/gdb/gdbserver/linux-x86-low.c
+++ b/gdb/gdbserver/linux-x86-low.c
@@ -749,7 +749,7 @@ x86_stopped_data_address (void)
static struct arch_process_info *
x86_linux_new_process (void)
{
- struct arch_process_info *info = xcalloc (1, sizeof (*info));
+ struct arch_process_info *info = XCNEW (struct arch_process_info);
i386_low_init_dregs (&info->debug_reg_state);
@@ -761,7 +761,7 @@ x86_linux_new_process (void)
static struct arch_lwp_info *
x86_linux_new_thread (void)
{
- struct arch_lwp_info *info = xcalloc (1, sizeof (*info));
+ struct arch_lwp_info *info = XCNEW (struct arch_lwp_info);
info->debug_registers_changed = 1;