Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: gdb/common/agent.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/common/agent.h ('k') | gdb/common/ax.def » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/common/agent.c
diff --git a/gdb/common/agent.c b/gdb/common/agent.c
index 43f1b65e78145ac4a6c42257d5eab24c8d5d0152..99cef4fcab354d67f18554ace50d709472881904 100644
--- a/gdb/common/agent.c
+++ b/gdb/common/agent.c
@@ -1,6 +1,6 @@
/* Shared utility routines for GDB to interact with agent.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
This file is part of GDB.
@@ -28,6 +28,7 @@
#include <string.h>
#include <unistd.h>
#include "agent.h"
+#include "filestuff.h"
int debug_agent = 0;
@@ -125,7 +126,7 @@ agent_get_helper_thread_id (void)
(unsigned char *) &helper_thread_id,
sizeof helper_thread_id))
#else
- enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
+ enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
gdb_byte buf[4];
if (target_read_memory (ipa_sym_addrs.addr_helper_thread_id,
@@ -168,7 +169,7 @@ gdb_connect_sync_socket (int pid)
if (res >= UNIX_PATH_MAX)
return -1;
- res = fd = socket (PF_UNIX, SOCK_STREAM, 0);
+ res = fd = gdb_socket_cloexec (PF_UNIX, SOCK_STREAM, 0);
if (res == -1)
{
warning (_("error opening sync socket: %s"), strerror (errno));
@@ -218,7 +219,8 @@ agent_run_command (int pid, const char *cmd, int len)
int ret = write_inferior_memory (ipa_sym_addrs.addr_cmd_buf,
(const unsigned char *) cmd, len);
#else
- int ret = target_write_memory (ipa_sym_addrs.addr_cmd_buf, cmd, len);
+ int ret = target_write_memory (ipa_sym_addrs.addr_cmd_buf,
+ (gdb_byte *) cmd, len);
#endif
if (ret != 0)
@@ -332,7 +334,7 @@ agent_capability_check (enum agent_capa agent_capa)
(unsigned char *) &agent_capability,
sizeof agent_capability))
#else
- enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
+ enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
gdb_byte buf[4];
if (target_read_memory (ipa_sym_addrs.addr_capability,
« no previous file with comments | « gdb/common/agent.h ('k') | gdb/common/ax.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698