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

Unified Diff: gdb/nto-procfs.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/nios2-tdep.c ('k') | gdb/nto-tdep.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/nto-procfs.c
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
index b58f3188b2a550ac180d72b0b93578decefe26e1..1c2f2989e8d9e9c9e97e066254e34678bae003e7 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -1,7 +1,7 @@
/* Machine independent support for QNX Neutrino /proc (process file system)
for GDB. Written by Colin Burgess at QNX Software Systems Limited.
- Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc.
+ Copyright (C) 2003-2013 Free Software Foundation, Inc.
Contributed by QNX Software Systems Ltd.
@@ -28,11 +28,11 @@
#include <sys/procfs.h>
#include <sys/neutrino.h>
#include <sys/syspage.h>
-#include "gdb_dirent.h"
+#include <dirent.h>
#include <sys/netmgr.h>
#include "exceptions.h"
-#include "gdb_string.h"
+#include <string.h>
#include "gdbcore.h"
#include "inferior.h"
#include "target.h"
@@ -197,7 +197,7 @@ procfs_open (char *arg, int from_tty)
{
if (sysinfo->type !=
nto_map_arch_to_cputype (gdbarch_bfd_arch_info
- (target_gdbarch)->arch_name))
+ (target_gdbarch ())->arch_name))
error (_("Invalid target CPU."));
}
}
@@ -661,7 +661,8 @@ do_attach (ptid_t ptid)
struct sigevent event;
char path[PATH_MAX];
- snprintf (path, PATH_MAX - 1, "%s/%d/as", nto_procfs_path, PIDGET (ptid));
+ snprintf (path, PATH_MAX - 1, "%s/%d/as", nto_procfs_path,
+ ptid_get_pid (ptid));
ctl_fd = open (path, O_RDWR);
if (ctl_fd == -1)
error (_("Couldn't open proc file %s, error %d (%s)"), path, errno,
@@ -679,9 +680,9 @@ do_attach (ptid_t ptid)
if (devctl (ctl_fd, DCMD_PROC_STATUS, &status, sizeof (status), 0) == EOK
&& status.flags & _DEBUG_FLAG_STOPPED)
- SignalKill (nto_node (), PIDGET (ptid), 0, SIGCONT, 0, 0);
+ SignalKill (nto_node (), ptid_get_pid (ptid), 0, SIGCONT, 0, 0);
nto_init_solib_absolute_prefix ();
- return ptid_build (PIDGET (ptid), 0, status.tid);
+ return ptid_build (ptid_get_pid (ptid), 0, status.tid);
}
/* Ask the user what to do when an interrupt is received. */
@@ -694,7 +695,7 @@ interrupt_query (void)
Give up (and stop debugging it)? ")))
{
target_mourn_inferior ();
- deprecated_throw_reason (RETURN_QUIT);
+ quit ();
}
target_terminal_inferior ();
@@ -789,7 +790,7 @@ procfs_wait (struct target_ops *ops,
{
int waitval = 0;
- waitpid (PIDGET (inferior_ptid), &waitval, WNOHANG);
+ waitpid (ptid_get_pid (inferior_ptid), &waitval, WNOHANG);
if (exit_signo)
{
/* Abnormal death. */
@@ -876,7 +877,7 @@ procfs_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int dowrite,
on signals, etc. We'd better not have left any breakpoints
in the program or it'll die when it hits one. */
static void
-procfs_detach (struct target_ops *ops, char *args, int from_tty)
+procfs_detach (struct target_ops *ops, const char *args, int from_tty)
{
int siggnal = 0;
int pid;
@@ -894,7 +895,7 @@ procfs_detach (struct target_ops *ops, char *args, int from_tty)
siggnal = atoi (args);
if (siggnal)
- SignalKill (nto_node (), PIDGET (inferior_ptid), 0, siggnal, 0, 0);
+ SignalKill (nto_node (), ptid_get_pid (inferior_ptid), 0, siggnal, 0, 0);
close (ctl_fd);
ctl_fd = -1;
@@ -992,7 +993,7 @@ procfs_resume (struct target_ops *ops,
{
if (signal_to_pass != status.info.si_signo)
{
- SignalKill (nto_node (), PIDGET (inferior_ptid), 0,
+ SignalKill (nto_node (), ptid_get_pid (inferior_ptid), 0,
signal_to_pass, 0, 0);
run.flags |= _DEBUG_RUN_CLRFLT | _DEBUG_RUN_CLRSIG;
}
@@ -1016,7 +1017,7 @@ procfs_mourn_inferior (struct target_ops *ops)
{
if (!ptid_equal (inferior_ptid, null_ptid))
{
- SignalKill (nto_node (), PIDGET (inferior_ptid), 0, SIGKILL, 0, 0);
+ SignalKill (nto_node (), ptid_get_pid (inferior_ptid), 0, SIGKILL, 0, 0);
close (ctl_fd);
}
inferior_ptid = null_ptid;
« no previous file with comments | « gdb/nios2-tdep.c ('k') | gdb/nto-tdep.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698