From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27152 invoked by alias); 11 Aug 2004 16:53:53 -0000 Mailing-List: contact rda-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: rda-owner@sources.redhat.com Received: (qmail 27143 invoked from network); 11 Aug 2004 16:53:52 -0000 Date: Wed, 11 Aug 2004 16:53:00 -0000 From: Corinna Vinschen To: rda@sources.redhat.com Subject: [PATCH] rda/unix/linux-target.c, linux_write_reg: Usage of non-existant variable "pid" Message-ID: <20040811165401.GA23065@cygbert.vinschen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2i X-SW-Source: 2004-q3/txt/msg00013.txt.bz2 Hi, 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; } else Corinna