public inbox for
 help / color / mirror / Atom feed
* [PATCH] rda/unix/linux-target.c, linux_write_reg: Usage of non-existant variable "pid"
@ 2004-08-11 16:53 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2004-08-11 16:53 UTC (permalink / raw)
  To: rda


I found a bug in linux_write_reg(), which uses a variable "pid" when
printing a status message to stderr.  But there's no local variable "pid"
defined in that function so that building rda/unix/linux-target.c fails
with "error: `pid' undeclared".  I've applied the following patch:

        * linux-target.c (linux_write_reg): Print process->pid in case of
        an error.

Index: linux-target.c
RCS file: /cvs/src/src/rda/unix/linux-target.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -p -r1.12 -r1.13
--- linux-target.c      5 Apr 2004 23:11:41 -0000       1.12
+++ linux-target.c      11 Aug 2004 14:57:06 -0000      1.13
@@ -2250,7 +2250,7 @@ linux_write_reg (struct gdbserv *serv, i
   if (errno)
       fprintf (stderr, "PT_WRITE_U 0x%08lx from 0x%08lx in process %d\n",
-              (long) regval, (long) regaddr, pid);
+              (long) regval, (long) regaddr, process->pid);
       return -1;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-08-11 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-11 16:53 [PATCH] rda/unix/linux-target.c, linux_write_reg: Usage of non-existant variable "pid" Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).