Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: gdbserver build broken on amd64-linux
Date: Thu, 21 Oct 2004 04:15:00 -0000	[thread overview]
Message-ID: <20041021041513.GR21300@gnat.com> (raw)
In-Reply-To: <20041020155316.GA17828@nevyn.them.org>

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

> Joel, could you test the #ifndef version and check it in?

I verified that the attached patch allows gdbserver to build,
and I also double-checked the values with the ones I have in
my prctl.h file. But I've never used gdbserver before, and when
I tried it, I had a failure:

    (gdb) target remote localhost:2345
    Remote debugging using localhost:2345
    Couldn't establish connection to remote target
    Remote register badly formatted: T0506:0000000000000000;07:c0f1ffbf7f000000;10:2
    06f55952a000000;
    here: 0000000;07:c0f1ffbf7f000000;10:206f55952a000000;

Not sure why there seems to be discrepancy in the protocol...
In any case, I checked in this patch, since it can only be correct.

2004-10-20  Joel Brobecker  <brobecker@gnat.com>

        * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
        (ARCH_SET_FS): Likewise.
        (ARCH_GET_FS): Likewise.
        (ARCH_GET_GS): Likewise.

Thanks,
-- 
Joel

[-- Attachment #2: linux-x86-64-low.c.diff --]
[-- Type: text/plain, Size: 736 bytes --]

Index: linux-x86-64-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-x86-64-low.c,v
retrieving revision 1.8
diff -u -p -r1.8 linux-x86-64-low.c
--- linux-x86-64-low.c	16 Oct 2004 17:42:00 -0000	1.8
+++ linux-x86-64-low.c	21 Oct 2004 04:05:38 -0000
@@ -47,6 +47,15 @@
 #define PTRACE_ARCH_PRCTL      30
 #endif
 
+/* The following definitions come from prctl.h, but may be absent
+   for certain configurations.  */
+#ifndef ARCH_GET_FS
+#define ARCH_SET_GS 0x1001
+#define ARCH_SET_FS 0x1002
+#define ARCH_GET_FS 0x1003
+#define ARCH_GET_GS 0x1004
+#endif
+
 static int x86_64_regmap[] = {
   RAX * 8, RBX * 8, RCX * 8, RDX * 8,
   RSI * 8, RDI * 8, RBP * 8, RSP * 8,

  reply	other threads:[~2004-10-21  4:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-20  5:32 Joel Brobecker
2004-10-20 14:26 ` Daniel Jacobowitz
2004-10-20 15:24   ` Joel Brobecker
2004-10-20 15:47     ` Mark Kettenis
2004-10-20 15:53       ` Daniel Jacobowitz
2004-10-21  4:15         ` Joel Brobecker [this message]
2004-10-21  4:38           ` Joel Brobecker
2004-10-21 13:48             ` Daniel Jacobowitz
2004-10-21 17:27               ` Joel Brobecker
2004-10-21 13:49           ` Daniel Jacobowitz
2004-10-21 17:33             ` Joel Brobecker
2004-10-21 17:36               ` Daniel Jacobowitz
2004-10-21 18:09                 ` Joel Brobecker

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=20041021041513.GR21300@gnat.com \
    --to=brobecker@gnat.com \
    --cc=gdb-patches@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