From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
To: "'Pedro Alves'" <pedro@codesourcery.com>, <gdb-patches@sourceware.org>
Subject: RE: [RFC] Mingw Windows 64-bit gdbserver
Date: Sat, 17 Apr 2010 05:40:00 -0000 [thread overview]
Message-ID: <001f01caddf0$6d4246b0$47c6d410$@muller@ics-cnrs.unistra.fr> (raw)
In-Reply-To: <201004161659.37990.pedro@codesourcery.com>
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Pedro Alves
> Envoyé : Friday, April 16, 2010 6:00 PM
> À : gdb-patches@sourceware.org
> Cc : Pierre Muller
> Objet : Re: [RFC] Mingw Windows 64-bit gdbserver
>
> On Friday 16 April 2010 16:31:51, Pierre Muller wrote:
> > This patch tries to implement support for
> > gdbserver on Windows 64-bit, using the mingw32
> > cross compiler to windows-64bit.
> >
> > I am unsure if anyone else already tried this,
> > but searching in gdb-patches I didn't find anything...
> > Don't hesitate to tell me otherwise...
> >
> > The resulting gdbserver seem usable to me,
> >
> > I do have a few questions:
> > - About the new file, win64-amd64-low.c
> > should I remove the copyright years and only leave 2010?
> > should I state that it is adapted from win32-i386-low.c?
>
> How about instead merging the files, like
> linux-x86-low.c handles both 64-bit and 32-bit? There's
> a lot of common stuff between both archs support, it
> seems.
Of course, I agree with you that the two files
share a very large common portion that is identical.
There are only two places where they really differ:
For the call to the init_registers_XXX
and for the register mappings array.
The main question is how should we split these parts
off if we want to keep a common part:
I would propose this:
rename win32-i386-low.c to win-x86-low.c
Create win32-i386-low.h and win64-amd64-low.h
that would have the register mappings and
a macro to define their local init_registers.
The problem with this approach is that I
don't know if it is OK to put
a static array (the mappings) into a header?
If this is not regarded as a good C practice
we could use win32-i386-low.c and win64-amd64-low.c
to directly include the same things as the headers
I described above and include the C files instead.
I was thinking that including C files directly
was not good practice, but it is already used for the
files generated from the XML feature files, so
this might be a second option.
Please just let me know which option seems
more favorable to you and I will try to
implement it.
Pierre
next prev parent reply other threads:[~2010-04-17 5:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 15:32 Pierre Muller
2010-04-16 15:59 ` Pedro Alves
2010-04-16 16:20 ` Pierre Muller
2010-04-16 16:27 ` Pedro Alves
2010-04-16 16:38 ` Pierre Muller
2010-04-16 17:15 ` Pedro Alves
2010-04-17 5:39 ` [RFA] Use winsock2 for mingw gdbserver Pierre Muller
2010-04-17 8:28 ` Pedro Alves
2010-04-17 20:44 ` Pierre Muller
2010-04-17 5:40 ` Pierre Muller [this message]
2010-04-17 10:58 ` [RFC] Mingw Windows 64-bit gdbserver Pedro Alves
2010-04-17 23:18 ` [RFC-v2] " Pierre Muller
2010-04-17 23:46 ` Pedro Alves
2010-04-19 6:37 ` [RFA] Prepare for " Pierre Muller
[not found] ` <6200558430975530197@unknownmsgid>
2010-04-19 13:56 ` H.J. Lu
2010-04-19 14:13 ` Pierre Muller
2010-04-16 16:27 [RFC] " Ozkan Sezer
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='001f01caddf0$6d4246b0$47c6d410$@muller@ics-cnrs.unistra.fr' \
--to=pierre.muller@ics-cnrs.unistra.fr \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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