From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: Joel Brobecker <brobecker@adacore.com>
Cc: S?rgio Durigan J?nior <sergiodj@linux.vnet.ibm.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix building gdb-7.0 on x86_64-*-freebsd
Date: Mon, 19 Oct 2009 20:34:00 -0000 [thread overview]
Message-ID: <20091019203403.GA50042@troutmask.apl.washington.edu> (raw)
In-Reply-To: <20091019195307.GC5282@adacore.com>
On Mon, Oct 19, 2009 at 09:53:07PM +0200, Joel Brobecker wrote:
> Hi Sergio,
>
> > Thank you for this patch. I believe you could add a comment explaining what
> > this number means (just like you did above). What do you think?
> > Just my two cents, as usual :-).
>
> I just applied the following patch (head only)
>
> 2009-10-19 Joel Brobecker <brobecker@adacore.com>
>
> * amd64fbsd-nat.c (amd64fbsd_supply_pcb): Add comment.
>
> Writing the comment made me think that we may have chosen the wrong
> version number, depending on the angle we look at things from: If we
> want to always be able to build, then we should have chosen version
> 74, since there are a few days where version 74 is missing the field
> and yet the GDB code still tries to access it for that versio number.
> However, if we're trying to have our code always use these fields
> whenver possible, then 75 is the right choice. Although we'll fail
> to build for any sources that's in between the moment the fields were
> removed and the moment the version was bumped to 75 (a time period
> of about a few days), we'll be able use these fields for the rest
> of version 74 of the sources.
>
> Based on the number of days this window is open, I would say that this
> situation is highly unlikely, and so we don't really need to worry about
> it.
>
You may be correct that a different version should have been used.
OTOH, gdb-6.8 was released on 2008-02-29 and the problematic code
is present in 6.8. I haven't seen anyone complain on the FreeBSD
mailing lists that they can't build 6.8. In looking at FreeBSD's
Port Collection, I find /usr/ports/devel/gdb6. This still uses the
gdb 6.6 tarball. In looking at the port, I find
troutmask:sgk[228] cd /usr/ports/devel/gdb6
troutmask:sgk[229] more files/patch-gdb-amd64fbsd-nat.c
--- gdb/amd64fbsd-nat.c.orig 2005-12-17 17:33:59.000000000 -0500
+++ gdb/amd64fbsd-nat.c 2009-09-10 02:29:33.000000000 -0400
@@ -125,10 +125,12 @@
regcache_raw_supply (regcache, 13, &pcb->pcb_r13);
regcache_raw_supply (regcache, 14, &pcb->pcb_r14);
regcache_raw_supply (regcache, 15, &pcb->pcb_r15);
+#if defined(__FreeBSD_version) && __FreeBSD_version < 800000
regcache_raw_supply (regcache, AMD64_DS_REGNUM, &pcb->pcb_ds);
regcache_raw_supply (regcache, AMD64_ES_REGNUM, &pcb->pcb_es);
regcache_raw_supply (regcache, AMD64_FS_REGNUM, &pcb->pcb_fs);
regcache_raw_supply (regcache, AMD64_GS_REGNUM, &pcb->pcb_gs);
+#endif
return 1;
}
Apparently, whoever is responsible for this port never
forwarded their patch upstream to the gdb developers.
Oh well.
--
Steve
prev parent reply other threads:[~2009-10-19 20:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-12 21:55 Steve Kargl
[not found] ` <20091014050550.GV5272@adacore.com>
[not found] ` <1530bbfee75f68f9c32262460f1ec7f9.squirrel@webmail.xs4all.nl>
[not found] ` <20091015021317.GD5288@adacore.com>
[not found] ` <20091015230013.GA49371@troutmask.apl.washington.edu>
2009-10-16 23:22 ` Joel Brobecker
2009-10-17 0:17 ` Steve Kargl
2009-10-17 4:19 ` Joel Brobecker
2009-10-17 5:06 ` Sérgio Durigan Júnior
2009-10-19 19:53 ` Joel Brobecker
2009-10-19 20:34 ` Steve Kargl [this message]
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=20091019203403.GA50042@troutmask.apl.washington.edu \
--to=sgk@troutmask.apl.washington.edu \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=sergiodj@linux.vnet.ibm.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