This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
PATCH: rename and move message buffer
- From: Jim Blandy <jimb at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: 02 Jun 2004 13:15:50 -0500
- Subject: PATCH: rename and move message buffer
Committed as obvious.
2004-06-02 Jim Blandy <jimb@redhat.com>
* ppc-linux-nat.c (store_register, fetch_register): Rename 'mess'
to 'message', and make it local to the lone block that uses it.
Index: gdb/ppc-linux-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/ppc-linux-nat.c,v
retrieving revision 1.40
diff -c -p -r1.40 ppc-linux-nat.c
*** gdb/ppc-linux-nat.c 21 May 2004 23:30:47 -0000 1.40
--- gdb/ppc-linux-nat.c 2 Jun 2004 18:13:54 -0000
*************** fetch_register (int tid, int regno)
*** 209,215 ****
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* This isn't really an address. But ptrace thinks of it as one. */
CORE_ADDR regaddr = ppc_register_u_addr (regno);
- char mess[128]; /* For messages */
int i;
unsigned int offset; /* Offset of registers within the u area. */
char buf[MAX_REGISTER_SIZE];
--- 209,214 ----
*************** fetch_register (int tid, int regno)
*** 253,261 ****
regaddr += sizeof (PTRACE_XFER_TYPE);
if (errno != 0)
{
! sprintf (mess, "reading register %s (#%d)",
REGISTER_NAME (regno), regno);
! perror_with_name (mess);
}
}
--- 252,261 ----
regaddr += sizeof (PTRACE_XFER_TYPE);
if (errno != 0)
{
! char message[128];
! sprintf (message, "reading register %s (#%d)",
REGISTER_NAME (regno), regno);
! perror_with_name (message);
}
}
*************** store_register (int tid, int regno)
*** 406,412 ****
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
/* This isn't really an address. But ptrace thinks of it as one. */
CORE_ADDR regaddr = ppc_register_u_addr (regno);
- char mess[128]; /* For messages */
int i;
unsigned int offset; /* Offset of registers within the u area. */
char buf[MAX_REGISTER_SIZE];
--- 406,411 ----
*************** store_register (int tid, int regno)
*** 457,465 ****
if (errno != 0)
{
! sprintf (mess, "writing register %s (#%d)",
REGISTER_NAME (regno), regno);
! perror_with_name (mess);
}
}
}
--- 456,465 ----
if (errno != 0)
{
! char message[128];
! sprintf (message, "writing register %s (#%d)",
REGISTER_NAME (regno), regno);
! perror_with_name (message);
}
}
}