* Re: [patch] for mig check in GDB's configure [not found] <CAB8fV=gfGtguD28FGa-A5DZT8jqvEA1AoaK4dO=cHMQcCVvB-w@mail.gmail.com> @ 2013-05-03 8:28 ` Thomas Schwinge 2013-05-03 10:44 ` 陆岳 2013-05-03 14:51 ` Pedro Alves 0 siblings, 2 replies; 13+ messages in thread From: Thomas Schwinge @ 2013-05-03 8:28 UTC (permalink / raw) To: 陆岳; +Cc: bug-hurd, gdb-patches [-- Attachment #1: Type: text/plain, Size: 4028 bytes --] Hi! Adding the gdb-patches mailing list. While of course this is only relevant for the GNU Hurd port of GDB, it will get committed to the GDB source repository, so should be reviewed on the gdb-patches mailing list. It is fine (and encouraged) to CC the bug-hurd mailing list for Hurd-specific issues, though. For the GDB folks, Yue Lu is a candidate for improving the GNU Hurd GDB port as a Google Summer of Code 2013 project, and is sending here a first patch. Welcome to the project! On Fri, 3 May 2013 15:15:39 +0800, 陆岳 <hacklu.newborn@gmail.com> wrote: > I found that when you missing the mid under GNU Hurd, the GDB's > configure doesn't complain about that. > But you will get a compile error until you do the make. > So I add the check. > By the way, I just check the existence of mig, have not check whether > mig work correct yet. > > This is my first time to submit patch, I just build this by git > format-patch. If something wrong, just tell me, I will fix it. I acknowledge the issue: as $(MIG) will be empty, you'll get the command line »gcc [...] | -cc [...]« resulting in a confusing »-cc: command not found«. So, thanks for the patch! Given this is your first patch, it looks very good already! > Subject: [PATCH] patch for check mig under GNU Hurd > > if no mig for use then exit! As GDB is a GNU project, instead of just a commit message it uses ChangeLog files. See the several ChangeLog files in the GDB sources. As your change only touches files in gdb/, only gdb/ChangeLog is relevant. The format of the individual "snippets" is rather strict, see the existing ones as well as this chapter in the GNU Coding Standards: <http://www.gnu.org/prep/standards/html_node/Change-Logs.html>. What developers typically do when committing their changes is re-using the ChangeLog snippet as the commit message. Commits are still done with CVS, by the way -- the Git repository is just a read-only mirror. Until you're approved for getting commit access yourself, another developer will commit any approved patches for you. (I can do that then.) > --- a/gdb/configure > +++ b/gdb/configure I take it you used autoconf to regenerate that file? > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -488,6 +488,15 @@ AC_CHECK_TOOL(WINDRES, windres) > > # Needed for GNU/Hurd. > AC_CHECK_TOOL(MIG, mig) > +case "${host}" in Hmm, I think that instead of only examining the host system, $host, this also needs to examine the target system, $target. (Please tell if the difference between build, host, and target system is not clear to you.) The MIG tool is used to generate files (from RPC definition files) that are used by the native GDB port for GNU Hurd (which, of couse, is the only GNU Hurd port that currently exists.) But if someone, for example, builds GDB targeting mips-linux-gnu on a GNU Hurd system, they would not need the MIG tool. GDB folks, would it make sense to use something like: case $gdb_native:$host in [...] yes:i[[3456]]86-*-gnu*) [error if MIG not found] ..., to check that both host and target are GNU Hurd? > + *-linux*|*-k*bsd-gnu*) > + ;; Very right: these triples need to be special-cased first, as the following *-gnu* will also match i686-pc-linux-gnu, for example. > + i[[3456789]]86-*-gnu*) Typically, only i[3456]86 are used, I think. Or, just use i?86. > + if test "$MIG" = "" ; then > + AC_MSG_ERROR([no mig for use]) I'd say something like »MIG not found but required for $host«. > + fi > + ;; > +esac > > # ---------------------- # > # Checks for libraries. # Can you change your patch according to my review and then resend it? (Don't worry -- it is completely normal that patches are revised, even several times, before they're approved. This helps to maintain a high code quality.) Grüße, Thomas [-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [patch] for mig check in GDB's configure 2013-05-03 8:28 ` [patch] for mig check in GDB's configure Thomas Schwinge @ 2013-05-03 10:44 ` 陆岳 [not found] ` <87txmkxlu6.fsf@violet.siamics.net> 2013-05-04 17:22 ` Doug Evans 2013-05-03 14:51 ` Pedro Alves 1 sibling, 2 replies; 13+ messages in thread From: 陆岳 @ 2013-05-03 10:44 UTC (permalink / raw) To: Thomas Schwinge; +Cc: bug-hurd, gdb-patches Hi! thanks for your review. On Fri, May 3, 2013 at 4:28 PM, Thomas Schwinge <thomas@codesourcery.com> wrote: > > As GDB is a GNU project, instead of just a commit message it uses > ChangeLog files. See the several ChangeLog files in the GDB sources. As > your change only touches files in gdb/, only gdb/ChangeLog is relevant. > The format of the individual "snippets" is rather strict, see the > existing ones as well as this chapter in the GNU Coding Standards: > <http://www.gnu.org/prep/standards/html_node/Change-Logs.html>. I have modified the ChangeLog file under gdb/ . > >> --- a/gdb/configure >> +++ b/gdb/configure > > I take it you used autoconf to regenerate that file? Yes! I have already removed this. >> --- a/gdb/configure.ac >> +++ b/gdb/configure.ac >> @@ -488,6 +488,15 @@ AC_CHECK_TOOL(WINDRES, windres) >> >> # Needed for GNU/Hurd. >> AC_CHECK_TOOL(MIG, mig) >> +case "${host}" in > > Hmm, I think that instead of only examining the host system, $host, this > also needs to examine the target system, $target. (Please tell if the > difference between build, host, and target system is not clear to you.) > The MIG tool is used to generate files (from RPC definition files) that > are used by the native GDB port for GNU Hurd (which, of couse, is the > only GNU Hurd port that currently exists.) But if someone, for example, > builds GDB targeting mips-linux-gnu on a GNU Hurd system, they would not > need the MIG tool. > To my knowledge now, $target just need to set when building a compiler which specify which plateform your compiler generate code for. When we build GDB, it is trivial to check the variable. In your example, builds GDB targeting mips-linux-gnu means the GDB is running on mips-linux. So we only need to set the $host=mips-linux-gnu, $build=*-*-gnu. Maybe I have got a wrong understanding about these gcc terms. > Can you change your patch according to my review and then resend it? > (Don't worry -- it is completely normal that patches are revised, even > several times, before they're approved. This helps to maintain a high > code quality.) > the new one is here: From 13d3edd1f6dbbc20b2801cea1fc367bf9042f977 Mon Sep 17 00:00:00 2001 From: hacklu <hacklu.newborn@gmail.com> Date: Fri, 3 May 2013 18:27:08 +0800 Subject: [PATCH] Patch check mig on GNU Hurd 2013-05-3 hacklu <hacklu.newborn@gmail.com> * configure.ac : uncorrectly check for mig on GUN Hurd * configure: Regenerate. --- gdb/ChangeLog | 4 ++++ gdb/configure.ac | 9 +++++++++ 2 files changed, 13 insertions(+), 0 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 12254b7..015a878 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2013-05-3 hacklu <hacklu.newborn@gmail.com> + + * configure.ac : uncorrectly check for mig on GUN Hurd + * configure: Regenerate. 2013-04-30 Samuel Thibault <samuel.thibault@gnu.org> * i386gnu-nat.c (CREG_OFFSET): New macro. diff --git a/gdb/configure.ac b/gdb/configure.ac index bb7fbdd..c1ee4cb 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -488,6 +488,15 @@ AC_CHECK_TOOL(WINDRES, windres) # Needed for GNU/Hurd. AC_CHECK_TOOL(MIG, mig) +case "${host}" in + *-linux*|*-k*bsd-gnu*) + ;; + i[?]86-*-gnu*) + if test "$MIG" = "" ; then + AC_MSG_ERROR([MIG not found but required for $host]) + fi + ;; +esac # ---------------------- # # Checks for libraries. # -- 1.7.0.4 -- Yue Lu (陆岳) ^ permalink raw reply [flat|nested] 13+ messages in thread
[parent not found: <87txmkxlu6.fsf@violet.siamics.net>]
* Re: [patch] for mig check in GDB's configure [not found] ` <87txmkxlu6.fsf@violet.siamics.net> @ 2013-05-04 8:29 ` Yue Lu 2013-05-16 21:55 ` Thomas Schwinge 0 siblings, 1 reply; 13+ messages in thread From: Yue Lu @ 2013-05-04 8:29 UTC (permalink / raw) To: Ivan Shmakov; +Cc: bug-hurd, gdb-patches Hi! thanks for your review. On Fri, May 3, 2013 at 8:57 PM, Ivan Shmakov <oneingray@gmail.com> wrote: > A few minor points. > I have update this patch after your feedback. From b50f9b2f9ab1792ad584d07c9d2da3c5857d82fe Mon Sep 17 00:00:00 2001 From: hacklu <hacklu.newborn@gmail.com> Date: Sat, 4 May 2013 16:17:25 +0800 Subject: [PATCH] Ensure MIG is available On GNU Hurd * configure.ac: Ensure MIG is available when building for GNU * Hurd. * configure: Regenerate. --- gdb/ChangeLog | 5 +++++ gdb/configure.ac | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 12254b7..4fa69ac 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-05-04 Yue Lu <hacklu.newborn@gmail.com> + + * configure.ac: Ensure MIG is available when building for GNU Hurd. + * configure: Regenerate. + 2013-04-30 Samuel Thibault <samuel.thibault@gnu.org> * i386gnu-nat.c (CREG_OFFSET): New macro. diff --git a/gdb/configure.ac b/gdb/configure.ac index bb7fbdd..29c68b4 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -486,8 +486,15 @@ AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(DLLTOOL, dlltool) AC_CHECK_TOOL(WINDRES, windres) -# Needed for GNU/Hurd. -AC_CHECK_TOOL(MIG, mig) +case $host_os in + gnu* ) + # Needed for GNU/Hurd. + AC_CHECK_TOOL(MIG, mig) + if test "$MIG" = "" ; then + AC_MSG_ERROR([MIG not found but required for $host]) + fi + ;; +esac # ---------------------- # # Checks for libraries. # -- 1.7.0.4 -- Yue Lu (陆岳) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [patch] for mig check in GDB's configure 2013-05-04 8:29 ` Yue Lu @ 2013-05-16 21:55 ` Thomas Schwinge 2013-05-17 5:30 ` Joel Brobecker 0 siblings, 1 reply; 13+ messages in thread From: Thomas Schwinge @ 2013-05-16 21:55 UTC (permalink / raw) To: Yue Lu; +Cc: bug-hurd, gdb-patches [-- Attachment #1: Type: text/plain, Size: 1551 bytes --] Hi! Sorry for the delay. On Sat, 4 May 2013 16:29:01 +0800, Yue Lu <hacklu.newborn@gmail.com> wrote: > * configure.ac: Ensure MIG is available when building for GNU > * Hurd. After reviewing and testing it, I now checked in your patch (very minor coding style and wording changes). Congratulations to your first contribution! :-) 2013-05-16 Yue Lu <hacklu.newborn@gmail.com> * configure.ac: Ensure MIG is available when building for GNU Hurd hosts. * configure: Regenerate. Index: configure.ac =================================================================== RCS file: /cvs/src/src/gdb/configure.ac,v retrieving revision 1.203 diff -u -p -r1.203 configure.ac --- configure.ac 10 May 2013 16:10:40 -0000 1.203 +++ configure.ac 16 May 2013 21:50:18 -0000 @@ -486,8 +486,15 @@ AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(DLLTOOL, dlltool) AC_CHECK_TOOL(WINDRES, windres) -# Needed for GNU/Hurd. -AC_CHECK_TOOL(MIG, mig) +case $host_os in + gnu*) + # Needed for GNU Hurd hosts. + AC_CHECK_TOOL(MIG, mig) + if test x"$MIG" = x; then + AC_MSG_ERROR([MIG not found but required for $host hosts]) + fi + ;; +esac # ---------------------- # # Checks for libraries. # Index: configure =================================================================== RCS file: /cvs/src/src/gdb/configure,v retrieving revision 1.391 diff -u -p -r1.391 configure --- configure 10 May 2013 16:10:40 -0000 1.391 +++ configure 16 May 2013 21:50:20 -0000 [...] Grüße, Thomas [-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [patch] for mig check in GDB's configure 2013-05-16 21:55 ` Thomas Schwinge @ 2013-05-17 5:30 ` Joel Brobecker 2013-05-17 6:34 ` Yue Lu 2013-05-17 7:00 ` Thomas Schwinge 0 siblings, 2 replies; 13+ messages in thread From: Joel Brobecker @ 2013-05-17 5:30 UTC (permalink / raw) To: Thomas Schwinge; +Cc: Yue Lu, bug-hurd, gdb-patches Hi Thomas and Yue, > After reviewing and testing it, I now checked in your patch (very minor > coding style and wording changes). Congratulations to your first > contribution! :-) > > 2013-05-16 Yue Lu <hacklu.newborn@gmail.com> > > * configure.ac: Ensure MIG is available when building for GNU Hurd > hosts. > * configure: Regenerate. I cannot remember if we said Yue had a copyright assignment on file, or not. I checked the file, and couldn't locate him. Can you clarify? This patch is small enough that it can be accepted without regardless; but if we do, I'd like to mark it as such in the ChangeLog entry (using "(tiny change)", as mentioned by the guide for GNU maintainers). Thank you! > > Index: configure.ac > =================================================================== > RCS file: /cvs/src/src/gdb/configure.ac,v > retrieving revision 1.203 > diff -u -p -r1.203 configure.ac > --- configure.ac 10 May 2013 16:10:40 -0000 1.203 > +++ configure.ac 16 May 2013 21:50:18 -0000 > @@ -486,8 +486,15 @@ AC_CHECK_TOOL(AR, ar) > AC_CHECK_TOOL(DLLTOOL, dlltool) > AC_CHECK_TOOL(WINDRES, windres) > > -# Needed for GNU/Hurd. > -AC_CHECK_TOOL(MIG, mig) > +case $host_os in > + gnu*) > + # Needed for GNU Hurd hosts. > + AC_CHECK_TOOL(MIG, mig) > + if test x"$MIG" = x; then > + AC_MSG_ERROR([MIG not found but required for $host hosts]) > + fi > + ;; > +esac > > # ---------------------- # > # Checks for libraries. # > Index: configure > =================================================================== > RCS file: /cvs/src/src/gdb/configure,v > retrieving revision 1.391 > diff -u -p -r1.391 configure > --- configure 10 May 2013 16:10:40 -0000 1.391 > +++ configure 16 May 2013 21:50:20 -0000 > [...] > > > GrüÃe, > Thomas -- Joel ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [patch] for mig check in GDB's configure 2013-05-17 5:30 ` Joel Brobecker @ 2013-05-17 6:34 ` Yue Lu 2013-05-17 7:00 ` Thomas Schwinge 1 sibling, 0 replies; 13+ messages in thread From: Yue Lu @ 2013-05-17 6:34 UTC (permalink / raw) To: Joel Brobecker; +Cc: Thomas Schwinge, bug-hurd, gdb-patches Hi, On Fri, May 17, 2013 at 1:30 PM, Joel Brobecker <brobecker@adacore.com> wrote: > Hi Thomas and Yue, > I cannot remember if we said Yue had a copyright assignment on file, > or not. I checked the file, and couldn't locate him. Can you clarify? > As this is the first time for me to submit patches, I don't know how to do the copyright assignment. Could you please tell me how to do that? thanks. -- Yue Lu (陆岳) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [patch] for mig check in GDB's configure 2013-05-17 5:30 ` Joel Brobecker 2013-05-17 6:34 ` Yue Lu @ 2013-05-17 7:00 ` Thomas Schwinge 2013-05-17 7:07 ` Joel Brobecker 1 sibling, 1 reply; 13+ messages in thread From: Thomas Schwinge @ 2013-05-17 7:00 UTC (permalink / raw) To: Yue Lu, Joel Brobecker; +Cc: bug-hurd, gdb-patches [-- Attachment #1.1: Type: text/plain, Size: 1524 bytes --] Hi! On Fri, 17 May 2013 09:30:42 +0400, Joel Brobecker <brobecker@adacore.com> wrote: > > After reviewing and testing it, I now checked in your patch (very minor > > coding style and wording changes). Congratulations to your first > > contribution! :-) > > > > 2013-05-16 Yue Lu <hacklu.newborn@gmail.com> > > > > * configure.ac: Ensure MIG is available when building for GNU Hurd > > hosts. > > * configure: Regenerate. > > I cannot remember if we said Yue had a copyright assignment on file, > or not. I checked the file, and couldn't locate him. Can you clarify? No, we have not yet started that process -- but indeed perhaps already should. Yue, the GDB project, as part of the GNU project, requires copyright assignment for any substantial changes, <http://www.gnu.org/licenses/why-assign.html>. For simplicity, I suggest you use the »assignment form for your past and future changes«, which I have attached to this email. Would that be OK for you? As you're working on Hurd-related things, I suggest you request papers for all relevant projects, so please specify the following: GDB, Hurd, GNU Mach, glibc. When you send the email, please put me in CC. > This patch is small enough that it can be accepted without regardless; > but if we do, I'd like to mark it as such in the ChangeLog entry > (using "(tiny change)", as mentioned by the guide for GNU maintainers). Sorry, I have not been aware of actually having to do this. Now added. Grüße, Thomas [-- Attachment #1.2: request-assign.future --] [-- Type: text/plain, Size: 965 bytes --] Please email the following information to assign@gnu.org, and we will send you the assignment form for your past and future changes. Please use your full legal name (in ASCII characters) as the subject line of the message. ---------------------------------------------------------------------- REQUEST: SEND FORM FOR PAST AND FUTURE CHANGES [What is the name of the program or package you're contributing to?] [Did you copy any files or text written by someone else in these changes? Even if that material is free software, we need to know about it.] [Do you have an employer who might have a basis to claim to own your changes? Do you attend a school which might make such a claim?] [For the copyright registration, what country are you a citizen of?] [What year were you born?] [Please write your email address here.] [Please write your postal address here.] [Which files have you changed so far, and which new files have you written so far?] [-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [patch] for mig check in GDB's configure 2013-05-17 7:00 ` Thomas Schwinge @ 2013-05-17 7:07 ` Joel Brobecker 0 siblings, 0 replies; 13+ messages in thread From: Joel Brobecker @ 2013-05-17 7:07 UTC (permalink / raw) To: Thomas Schwinge; +Cc: Yue Lu, bug-hurd, gdb-patches > No, we have not yet started that process -- but indeed perhaps already > should. Yue, the GDB project, as part of the GNU project, requires > copyright assignment for any substantial changes, > <http://www.gnu.org/licenses/why-assign.html>. For simplicity, I suggest > you use the »assignment form for your past and future changes«, which I > have attached to this email. Would that be OK for you? As you're > working on Hurd-related things, I suggest you request papers for all > relevant projects, so please specify the following: GDB, Hurd, GNU Mach, > glibc. When you send the email, please put me in CC. > > > This patch is small enough that it can be accepted without regardless; > > but if we do, I'd like to mark it as such in the ChangeLog entry > > (using "(tiny change)", as mentioned by the guide for GNU maintainers). > > Sorry, I have not been aware of actually having to do this. Now added. Wonderful - thanks for taking care of Yue. Do not hesitate to ask me if anyone has any question. -- Joel ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [patch] for mig check in GDB's configure 2013-05-03 10:44 ` 陆岳 [not found] ` <87txmkxlu6.fsf@violet.siamics.net> @ 2013-05-04 17:22 ` Doug Evans 2013-05-05 5:31 ` Yue Lu 1 sibling, 1 reply; 13+ messages in thread From: Doug Evans @ 2013-05-04 17:22 UTC (permalink / raw) To: 陆岳; +Cc: Thomas Schwinge, bug-hurd, gdb-patches On Fri, May 3, 2013 at 3:43 AM, 陆岳 <hacklu.newborn@gmail.com> wrote: >> Hmm, I think that instead of only examining the host system, $host, this >> also needs to examine the target system, $target. (Please tell if the >> difference between build, host, and target system is not clear to you.) >> The MIG tool is used to generate files (from RPC definition files) that >> are used by the native GDB port for GNU Hurd (which, of couse, is the >> only GNU Hurd port that currently exists.) But if someone, for example, >> builds GDB targeting mips-linux-gnu on a GNU Hurd system, they would not >> need the MIG tool. >> > > To my knowledge now, $target just need to set when building a compiler > which specify which plateform your compiler generate code for. When we > build GDB, it is trivial to check the variable. > In your example, builds GDB targeting mips-linux-gnu means the GDB is > running on mips-linux. So we only need to set the > $host=mips-linux-gnu, $build=*-*-gnu. > Maybe I have got a wrong understanding about these gcc terms. I can run gdb on an x86 system and debug a program running on a mips system via gdbserver (or some other program that speaks gdb's remote protocol). --build = system you're building the tool on --host = system the tool will run on --target = system the tool will handle or target (generate code for in the case of gcc, debug in the case of gdb) [These terms are common to all GNU tools, not just gcc btw.] All three can be different for gdb as well as gcc. So for example I *could*, given appropriately ported tools, build gdb on x86, run it on mips, and have it debug programs running on arm. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [patch] for mig check in GDB's configure 2013-05-04 17:22 ` Doug Evans @ 2013-05-05 5:31 ` Yue Lu 2013-05-05 17:35 ` Doug Evans 0 siblings, 1 reply; 13+ messages in thread From: Yue Lu @ 2013-05-05 5:31 UTC (permalink / raw) To: Doug Evans; +Cc: Thomas Schwinge, bug-hurd, gdb-patches Hi, On Sun, May 5, 2013 at 1:22 AM, Doug Evans <dje@google.com> wrote: > On Fri, May 3, 2013 at 3:43 AM, 陆岳 <hacklu.newborn@gmail.com> wrote: >>> Hmm, I think that instead of only examining the host system, $host, this >>> also needs to examine the target system, $target. (Please tell if the >>> difference between build, host, and target system is not clear to you.) >>> The MIG tool is used to generate files (from RPC definition files) that >>> are used by the native GDB port for GNU Hurd (which, of couse, is the >>> only GNU Hurd port that currently exists.) But if someone, for example, >>> builds GDB targeting mips-linux-gnu on a GNU Hurd system, they would not >>> need the MIG tool. >>> > I can run gdb on an x86 system and debug a program running on a mips > system via gdbserver (or some other program that speaks gdb's remote > protocol). > > --build = system you're building the tool on > --host = system the tool will run on > --target = system the tool will handle or target (generate code for in > the case of gcc, debug in the case of gdb) > > [These terms are common to all GNU tools, not just gcc btw.] Thanks for the explanation. I have known about these three terms. > So for example I *could*, given appropriately ported tools, > build gdb on x86, run it on mips, and have it debug programs running on arm. But I have one more question, why the one run on GNU Hurd which targeting arm doesn't need to use MIG? As it run under GNU Hurd, it must use the message transport facility and need to use MIG to generate the interface file automatically or someone write it by hands. -- Yue Lu (陆岳) ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [patch] for mig check in GDB's configure 2013-05-05 5:31 ` Yue Lu @ 2013-05-05 17:35 ` Doug Evans 2013-05-16 22:10 ` Thomas Schwinge 0 siblings, 1 reply; 13+ messages in thread From: Doug Evans @ 2013-05-05 17:35 UTC (permalink / raw) To: Yue Lu; +Cc: Thomas Schwinge, bug-hurd, gdb-patches On Sat, May 4, 2013 at 10:30 PM, Yue Lu <hacklu.newborn@gmail.com> wrote: > But I have one more question, why the one run on GNU Hurd which > targeting arm doesn't need to use MIG? As it run under GNU Hurd, it > must use the message transport facility and need to use MIG to > generate the interface file automatically or someone write it by > hands. That's a good question (assuming I understand it, it's a bit hard to parse as written). I don't know MIG or GNU Hurd. This stuff is pretty straightforward though, there's no magic. The answer depends on what GDB uses MIG for. If GDB on Hurd uses MIG like GDB on Linux uses ptrace, then that would explain it (again, assuming I understand the question). But someone who knows Hurd and MIG will need to step up and provide a real answer. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [patch] for mig check in GDB's configure 2013-05-05 17:35 ` Doug Evans @ 2013-05-16 22:10 ` Thomas Schwinge 0 siblings, 0 replies; 13+ messages in thread From: Thomas Schwinge @ 2013-05-16 22:10 UTC (permalink / raw) To: Doug Evans, Yue Lu; +Cc: bug-hurd, gdb-patches [-- Attachment #1: Type: text/plain, Size: 1872 bytes --] Hi! On Sun, 5 May 2013 10:35:25 -0700, Doug Evans <dje@google.com> wrote: > On Sat, May 4, 2013 at 10:30 PM, Yue Lu <hacklu.newborn@gmail.com> wrote: > > But I have one more question, why the one run on GNU Hurd which > > targeting arm doesn't need to use MIG? As it run under GNU Hurd, it > > must use the message transport facility and need to use MIG to > > generate the interface file automatically or someone write it by > > hands. > > That's a good question (assuming I understand it, it's a bit hard to > parse as written). I don't know MIG or GNU Hurd. > This stuff is pretty straightforward though, there's no magic. > The answer depends on what GDB uses MIG for. > > If GDB on Hurd uses MIG like GDB on Linux uses ptrace, > then that would explain it (again, assuming I understand the question). > But someone who knows Hurd and MIG will need to step up > and provide a real answer. That's basically it. Basically, RPC interface definition files (*.defs, included with the Hurd system) basically describe all possible "system calls", including ptrace, and the MIG tool translates these into C code stub functions. So, MIG is needed everywhere where a Linux port of GDB would talk to the kernel. This means in the Hurd context: a) for a native configuration (GDB host equals GDB target: runs on the host, speaks to the target (which is the same system, hence native); the only configuration existing right now), or b) -- to be worked on -- via gdbserver, where the GDB host can be anything, the GDB target is Hurd (assuming the GDB host is not Hurd, then MIG is not needed, because that GDB configuration will not directly interact with a Hurd system), and for gdbserver itself, again host equals target, as it runs on the host, and speaks to the target (which is the same system, hence native). Grüße, Thomas [-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [patch] for mig check in GDB's configure 2013-05-03 8:28 ` [patch] for mig check in GDB's configure Thomas Schwinge 2013-05-03 10:44 ` 陆岳 @ 2013-05-03 14:51 ` Pedro Alves 1 sibling, 0 replies; 13+ messages in thread From: Pedro Alves @ 2013-05-03 14:51 UTC (permalink / raw) To: Thomas Schwinge; +Cc: 陆岳, bug-hurd, gdb-patches On 05/03/2013 09:28 AM, Thomas Schwinge wrote: > Hmm, I think that instead of only examining the host system, $host, this > also needs to examine the target system, $target. (Please tell if the > difference between build, host, and target system is not clear to you.) > The MIG tool is used to generate files (from RPC definition files) that > are used by the native GDB port for GNU Hurd (which, of couse, is the > only GNU Hurd port that currently exists.) But if someone, for example, > builds GDB targeting mips-linux-gnu on a GNU Hurd system, they would not > need the MIG tool. > > GDB folks, would it make sense to use something like: > > case $gdb_native:$host in > [...] > yes:i[[3456]]86-*-gnu*) > [error if MIG not found] > > ..., to check that both host and target are GNU Hurd? Sure. Looking at config/i386/i386gnu.mh, NAT_GENERATED_FILES in particular, I think gdb will want to run mig even on cross gdbs hosted on GNU Hurd, though... -- Pedro Alves ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-05-17 7:07 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CAB8fV=gfGtguD28FGa-A5DZT8jqvEA1AoaK4dO=cHMQcCVvB-w@mail.gmail.com>
2013-05-03 8:28 ` [patch] for mig check in GDB's configure Thomas Schwinge
2013-05-03 10:44 ` 陆岳
[not found] ` <87txmkxlu6.fsf@violet.siamics.net>
2013-05-04 8:29 ` Yue Lu
2013-05-16 21:55 ` Thomas Schwinge
2013-05-17 5:30 ` Joel Brobecker
2013-05-17 6:34 ` Yue Lu
2013-05-17 7:00 ` Thomas Schwinge
2013-05-17 7:07 ` Joel Brobecker
2013-05-04 17:22 ` Doug Evans
2013-05-05 5:31 ` Yue Lu
2013-05-05 17:35 ` Doug Evans
2013-05-16 22:10 ` Thomas Schwinge
2013-05-03 14:51 ` Pedro Alves
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox