All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Michael Young <m.a.young@durham.ac.uk>
Cc: xen-devel@lists.xenproject.org, Tim Deegan <tim@xen.org>
Subject: Re: Build problems in kdd.c with xen-4.14.0-rc4
Date: Thu, 2 Jul 2020 20:38:06 +0200	[thread overview]
Message-ID: <20200702183806.GA28738@aepfle.de> (raw)
In-Reply-To: <alpine.LFD.2.22.394.2006302259370.2894@austen3.home>

[-- Attachment #1: Type: text/plain, Size: 2926 bytes --]

On Tue, Jun 30, Michael Young wrote:

> I get the following errors when trying to build xen-4.14.0-rc4

This happens to work for me.

Olaf

---
 tools/debugger/kdd/kdd.c | 8 ++++----
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/tools/debugger/kdd/kdd.c
+++ b/tools/debugger/kdd/kdd.c
@@ -742,25 +742,25 @@ static void kdd_tx(kdd_state *s)
     int i;
 
     /* Fix up the checksum before we send */
     for (i = 0; i < s->txp.h.len; i++)
         sum += s->txp.payload[i];
     s->txp.h.sum = sum;
 
     kdd_log_pkt(s, "TX", &s->txp);
 
     len = s->txp.h.len + sizeof (kdd_hdr);
     if (s->txp.h.dir == KDD_DIR_PKT)
         /* Append the mysterious 0xaa byte to each packet */
-        s->txb[len++] = 0xaa;
+        s->txp.payload[len++] = 0xaa;
 
     (void) blocking_write(s->fd, s->txb, len);
 }
 
 
 /* Send an acknowledgement to the client */
 static void kdd_send_ack(kdd_state *s, uint32_t id, uint16_t type)
 {
     s->txp.h.dir = KDD_DIR_ACK;
     s->txp.h.type = type;
     s->txp.h.len = 0;
     s->txp.h.id = id;
@@ -775,25 +775,25 @@ static void kdd_send_cmd(kdd_state *s, uint32_t subtype, size_t extra)
     s->txp.h.type = KDD_PKT_CMD;
     s->txp.h.len = sizeof (kdd_cmd) + extra;
     s->txp.h.id = (s->next_id ^= 1);
     s->txp.h.sum = 0;
     s->txp.cmd.subtype = subtype;
     kdd_tx(s);
 }
 
 /* Cause the client to print a string */
 static void kdd_send_string(kdd_state *s, char *fmt, ...)
 {
     uint32_t len = 0xffff - sizeof (kdd_msg);
-    char *buf = (char *) s->txb + sizeof (kdd_hdr) + sizeof (kdd_msg);
+    char *buf = (char *) &s->txp + sizeof (kdd_hdr) + sizeof (kdd_msg);
     va_list ap;
     
     va_start(ap, fmt);
     len = vsnprintf(buf, len, fmt, ap);
     va_end(ap);
 
     s->txp.h.dir = KDD_DIR_PKT;
     s->txp.h.type = KDD_PKT_MSG;
     s->txp.h.len = sizeof (kdd_msg) + len;
     s->txp.h.id = (s->next_id ^= 1);
     s->txp.h.sum = 0;
     s->txp.msg.subtype = KDD_MSG_PRINT;
@@ -807,25 +807,25 @@ static void kdd_break(kdd_state *s)
 {
     uint16_t ilen;
     KDD_LOG(s, "Break\n");
 
     if (s->running)
         kdd_halt(s->guest);
     s->running = 0;
 
     {
         unsigned int i;
         /* XXX debug pattern */
         for (i = 0; i < 0x100 ; i++) 
-            s->txb[sizeof (kdd_hdr) + i] = i;
+            s->txp.payload[sizeof (kdd_hdr) + i] = i;
     }
 
     /* Send a state-change message to the client so it knows we've stopped */
     s->txp.h.dir = KDD_DIR_PKT;
     s->txp.h.type = KDD_PKT_STC;
     s->txp.h.len = sizeof (kdd_stc);
     s->txp.h.id = (s->next_id ^= 1);
     s->txp.stc.subtype = KDD_STC_STOP;
     s->txp.stc.stop.cpu = s->cpuid;
     s->txp.stc.stop.ncpus = kdd_count_cpus(s->guest); 
     s->txp.stc.stop.kthread = 0; /* Let the debugger figure it out */
     s->txp.stc.stop.status = KDD_STC_STATUS_BREAKPOINT;

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2020-07-02 18:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 22:21 Build problems in kdd.c with xen-4.14.0-rc4 Michael Young
2020-07-02 18:38 ` Olaf Hering [this message]
2020-07-03 13:23   ` Paul Durrant
2020-07-03 13:26     ` Olaf Hering
2020-07-03  9:41 ` Paul Durrant
2020-07-03  9:48   ` Michael Young
2020-07-03 10:34     ` Paul Durrant
2020-07-03 18:54 ` Tim Deegan
2020-07-03 19:58   ` Wei Liu

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=20200702183806.GA28738@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=m.a.young@durham.ac.uk \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.