From: Corinna Vinschen <vinschen@redhat.com>
To: rda@sources.redhat.com
Subject: [PATCH] rda/unix/linux-target.c, linux_write_reg: Usage of non-existant variable "pid"
Date: Wed, 11 Aug 2004 16:53:00 -0000 [thread overview]
Message-ID: <20040811165401.GA23065@cygbert.vinschen.de> (raw)
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
reply other threads:[~2004-08-11 16:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040811165401.GA23065@cygbert.vinschen.de \
--to=vinschen@redhat.com \
--cc=rda@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).