aboutsummaryrefslogtreecommitdiff
path: root/gdb/proc-api.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2001-03-27 02:01:11 +0000
committerKevin Buettner <kevinb@redhat.com>2001-03-27 02:01:11 +0000
commit37de36c6ed76ef0b5f31cff8fd5089dab7c3d136 (patch)
treee0f4efce9cfec93ff3214d754e1e3c4d2530c7bc /gdb/proc-api.c
parenteb4a6e4f4b7f30d8a6220d7fd807973077221faf (diff)
downloadgdb-37de36c6ed76ef0b5f31cff8fd5089dab7c3d136.zip
gdb-37de36c6ed76ef0b5f31cff8fd5089dab7c3d136.tar.gz
gdb-37de36c6ed76ef0b5f31cff8fd5089dab7c3d136.tar.bz2
Add AIX5 procfs support.
Diffstat (limited to 'gdb/proc-api.c')
-rw-r--r--gdb/proc-api.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/proc-api.c b/gdb/proc-api.c
index c7da71f..d881edc 100644
--- a/gdb/proc-api.c
+++ b/gdb/proc-api.c
@@ -446,12 +446,12 @@ write_with_trace (int fd, void *varg, size_t len, char *file, int line)
{
int i;
int ret;
- long *arg = (long *) varg;
+ procfs_ctl_t *arg = (procfs_ctl_t *) varg;
prepare_to_trace ();
if (procfs_trace)
{
- long opcode = arg[0];
+ procfs_ctl_t opcode = arg[0];
for (i = 0; rw_table[i].name != NULL; i++)
if (rw_table[i].value == opcode)
break;
@@ -475,8 +475,10 @@ write_with_trace (int fd, void *varg, size_t len, char *file, int line)
case PCUNSET:
#endif
#ifdef PCRESET
+#if PCRESET != PCUNSET
case PCRESET:
#endif
+#endif
fprintf (procfs_file ? procfs_file : stdout,
"write (PCRESET, %s) %s\n",
arg[1] == PR_FORK ? "PR_FORK" :
@@ -551,6 +553,7 @@ write_with_trace (int fd, void *varg, size_t len, char *file, int line)
break;
default:
{
+#ifdef BREAKPOINT
static unsigned char break_insn[] = BREAKPOINT;
if (len == sizeof (break_insn) &&
@@ -558,7 +561,9 @@ write_with_trace (int fd, void *varg, size_t len, char *file, int line)
fprintf (procfs_file ? procfs_file : stdout,
"write (<breakpoint at 0x%08lx>) \n",
(unsigned long) lseek_offset);
- else if (rw_table[i].name)
+ else
+#endif
+ if (rw_table[i].name)
fprintf (procfs_file ? procfs_file : stdout,
"write (%s) %s\n",
rw_table[i].name,