This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
RFA rs6000-nat.c rc used out of scope
- To: gdb-patches at sourceware dot cygnus dot com (gdb-patches at sourceware dot cygnus dot com)
- Subject: RFA rs6000-nat.c rc used out of scope
- From: "Philippe De Muyter" <phdm at macqel dot be>
- Date: Tue, 25 Apr 2000 11:41:42 +0200 (CEST)
Building gdb on aix4.1.5 fails with :
gdb/rs6000-nat.c: In function `xcoff_relocate_symtab':
gdb/rs6000-nat.c:675: `rc' undeclared (first use this function)
gdb/rs6000-nat.c:675: (Each undeclared identifier is reported only once
gdb/rs6000-nat.c:675: for each function it appears in.)
Here is a fix (using diff -b, to hide indent fixes)
OK to commit ? (and do we really need an approval for such sort of things,
or would a FYI be enough ?)
Philippe De Muyter <phdm@macqel.be>
* rs6000-nat.c (xcoff_relocate_symtab): Declaration of variable `rc'
moved in the right scope.
Index: gdb/rs6000-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-nat.c,v
retrieving revision 1.3
diff -u -p -b -r1.3 rs6000-nat.c
--- rs6000-nat.c 2000/04/20 23:54:45 1.3
+++ rs6000-nat.c 2000/04/25 09:01:05
@@ -640,20 +640,19 @@ xcoff_relocate_symtab (pid)
unsigned int pid;
{
int load_segs = 64; /* number of load segments */
-
- do
- {
struct ld_info *ldi;
int rc;
+ do
+ {
ldi = (void *) alloca (load_segs * sizeof (*ldi));
if (ldi == 0)
perror_with_name ("xcoff_relocate_symtab");
/* According to my humble theory, AIX has some timing problems and
when the user stack grows, kernel doesn't update stack info in time
- and ptrace calls step on user stack. That is why we sleep here a little,
- and give kernel to update its internals. */
+ and ptrace calls step on user stack. That is why we sleep here a
+ little, and give kernel to update its internals. */
usleep (36000);