Re: [PATCH] hurd: Add shared mig declarations

2020-05-30 Thread Simon Marchi
On 2020-05-30 2:23 p.m., Samuel Thibault wrote: > Fixes > > exc_request_S.c:177:24: error: no previous declaration for ‘exc_server’ > [-Werror=missing-declarations] > 177 | mig_external boolean_t exc_server > > gdb/ChangeLog: > > * config/i386/i386gnu.mn [%_S.o %_U.o] (COMPILE.post):

Re: [PATCH] gnu-nat: Move local functions inside gnu_nat_target class

2020-05-30 Thread Simon Marchi
On 2020-05-30 2:04 p.m., Samuel Thibault wrote: > This allows to have the process_stratum_target object at hand for future use > in > the gdb API, and only use gnu_target from external calls. > > gdb/Changelog: > > * gnu-nat.h (inf_validate_procs, inf_suspend, inf_set_traced, >

Re: [PATCH] hurd: Add shared mig declarations

2020-05-30 Thread Samuel Thibault
Pedro Alves, le sam. 30 mai 2020 20:51:17 +0100, a ecrit: > On 5/30/20 7:23 PM, Samuel Thibault wrote: > > +++ binutils-gdb/gdb/gnu-nat-mig.h > > @@ -0,0 +1,33 @@ > > +/* Common things used by the various *gnu-nat.c files > > + Copyright (C) 2020 Free Software Foundation, Inc. > > + > > +

Re: [PATCH] hurd: Add shared mig declarations

2020-05-30 Thread Pedro Alves
On 5/30/20 7:23 PM, Samuel Thibault wrote: > +++ binutils-gdb/gdb/gnu-nat-mig.h > @@ -0,0 +1,33 @@ > +/* Common things used by the various *gnu-nat.c files > + Copyright (C) 2020 Free Software Foundation, Inc. > + > + Written by Samuel Thibault Please don't take this the wrong way, but a

Re: [PATCHv2 1/7] hurd: fix gnu_debug_flag type

2020-05-30 Thread Samuel Thibault
Ok, I pushed this series of 7 patches for now. Thanks for the reviews, Samuel

Re: [PATCH] hurd: Add shared mig declarations

2020-05-30 Thread Samuel Thibault
Samuel Thibault, le sam. 30 mai 2020 20:23:18 +0200, a ecrit: > +boolean_t exc_server (mach_msg_header_t *InHeadP, mach_msg_header_t > *OutHeadP); > +boolean_t msg_reply_server (mach_msg_header_t *InHeadP, > + mach_msg_header_t *OutHeadP) > +boolean_t notify_server

[PATCH] hurd: Add shared mig declarations

2020-05-30 Thread Samuel Thibault
Fixes exc_request_S.c:177:24: error: no previous declaration for ‘exc_server’ [-Werror=missing-declarations] 177 | mig_external boolean_t exc_server gdb/ChangeLog: * config/i386/i386gnu.mn [%_S.o %_U.o] (COMPILE.post): Add "-include gnu-nat-mig.h". * gnu-nat-mig.h:

[PATCH] gnu-nat: Move local functions inside gnu_nat_target class

2020-05-30 Thread Samuel Thibault
This allows to have the process_stratum_target object at hand for future use in the gdb API, and only use gnu_target from external calls. gdb/Changelog: * gnu-nat.h (inf_validate_procs, inf_suspend, inf_set_traced, steal_exc_port, proc_get_state, inf_clear_wait, inf_cleanup,

Re: [PATCHv2 1/7] hurd: fix gnu_debug_flag type

2020-05-30 Thread Simon Marchi
On 2020-05-30 12:53, Samuel Thibault wrote: Simon Marchi, le sam. 30 mai 2020 12:12:24 -0400, a ecrit: We can either push on your behalf. But if you'd like to have push access, because you plan to make regular contributions, you can ask for an account here, and specify me as "email address

Re: [PATCHv2 6/7] hurd: add gnu_target pointer to fix thread API calls

2020-05-30 Thread Samuel Thibault
Simon Marchi, le sam. 30 mai 2020 12:08:53 -0400, a ecrit: > On 2020-05-30 11:53 a.m., Samuel Thibault wrote: > > Simon Marchi, le sam. 30 mai 2020 10:57:42 -0400, a ecrit: > >>> @@ -1106,12 +1109,12 @@ inf_validate_procs (struct inf *inf) > >>> if (inferior_ptid == ptid_t (inf->pid)) > >>>

Re: [PATCHv2 1/7] hurd: fix gnu_debug_flag type

2020-05-30 Thread Samuel Thibault
Simon Marchi, le sam. 30 mai 2020 12:12:24 -0400, a ecrit: > We can either push on your behalf. But if you'd like to have push access, > because > you plan to make regular contributions, you can ask for an account here, and > specify > me as "email address of person who approved request". > >

Re: [PATCHv2 1/7] hurd: fix gnu_debug_flag type

2020-05-30 Thread Simon Marchi
On 2020-05-30 12:00 p.m., Samuel Thibault wrote: > Simon Marchi, le sam. 30 mai 2020 10:39:19 -0400, a ecrit: >> On 2020-05-29 6:00 p.m., Samuel Thibault wrote: >>> Fixes >>> >>> ../../gdb/gnu-nat.c:96:6: error: conflicting declaration ‘bool >>> gnu_debug_flag’ >>>96 | bool gnu_debug_flag =

Re: [PATCHv2 6/7] hurd: add gnu_target pointer to fix thread API calls

2020-05-30 Thread Simon Marchi
On 2020-05-30 11:53 a.m., Samuel Thibault wrote: > Simon Marchi, le sam. 30 mai 2020 10:57:42 -0400, a ecrit: >>> @@ -1106,12 +1109,12 @@ inf_validate_procs (struct inf *inf) >>> if (inferior_ptid == ptid_t (inf->pid)) >>> /* This is the first time we're hearing about thread >>>

Re: [PATCHv2 3/7] hurd: make function cast stronger

2020-05-30 Thread Simon Marchi
On 2020-05-30 11:32 a.m., Samuel Thibault wrote: > Simon Marchi, le sam. 30 mai 2020 10:47:50 -0400, a ecrit: >> On 2020-05-29 6:01 p.m., Samuel Thibault wrote: >>> process_reply_S.c:104:23: error: function called through a non-compatible >>> type [-Werror] >>> 104 | OutP->RetCode =

Re: [PATCHv2 1/7] hurd: fix gnu_debug_flag type

2020-05-30 Thread Samuel Thibault
Simon Marchi, le sam. 30 mai 2020 10:39:19 -0400, a ecrit: > On 2020-05-29 6:00 p.m., Samuel Thibault wrote: > > Fixes > > > > ../../gdb/gnu-nat.c:96:6: error: conflicting declaration ‘bool > > gnu_debug_flag’ > >96 | bool gnu_debug_flag = false; > > ../../gdb/gnu-nat.c: In function ‘void

Re: [PATCHv2 6/7] hurd: add gnu_target pointer to fix thread API calls

2020-05-30 Thread Samuel Thibault
Simon Marchi, le sam. 30 mai 2020 10:57:42 -0400, a ecrit: > > @@ -1106,12 +1109,12 @@ inf_validate_procs (struct inf *inf) > > if (inferior_ptid == ptid_t (inf->pid)) > > /* This is the first time we're hearing about thread > > ids, after a fork-child. */ > > -

Re: [PATCHv2 3/7] hurd: make function cast stronger

2020-05-30 Thread Samuel Thibault
Simon Marchi, le sam. 30 mai 2020 10:47:50 -0400, a ecrit: > On 2020-05-29 6:01 p.m., Samuel Thibault wrote: > > process_reply_S.c:104:23: error: function called through a non-compatible > > type [-Werror] > > 104 | OutP->RetCode = (*(kern_return_t (*)(mach_port_t, > > kern_return_t))

Re: [PATCH] hurd: unwinding support over signal trampolines

2020-05-30 Thread Simon Marchi
On 2020-05-29 7:00 p.m., Samuel Thibault wrote: > gdb/ChangeLog: > > 2020-05-29 Samuel Thibault > > * i386-gnu-tdep.c: Include "gdbcore.h" > (gnu_sigtramp_code, i386_gnu_sc_reg_offset): New arrays. > (GNU_SIGTRAMP_LEN, GNU_SIGTRAMP_TAIL, >

Re: [PATCHv2 7/7] hurd: fix pushing target on inferior creation

2020-05-30 Thread Simon Marchi
On 2020-05-29 6:04 p.m., Samuel Thibault wrote: > This fixes creating inferiors, which was broken since 5b6d1e4fa > ('Multi-target support') > > gdb/ChangeLog: > > 2020-05-29 Samuel Thibault > > * gnu-nat.c (gnu_nat_target::create_inferior): Move push_target call > before

Re: [PATCHv2 6/7] hurd: add gnu_target pointer to fix thread API calls

2020-05-30 Thread Simon Marchi
On 2020-05-29 6:03 p.m., Samuel Thibault wrote: > Fixes > > ../../gdb/gnu-nat.c:1110:28: error: cannot convert ‘ptid_t’ to > ‘process_stratum_target*’ > 1110 |thread_change_ptid (inferior_ptid, ptid); > > and others related to 5b6d1e4fa ("Multi-target support") > > gdb/ChangeLog: > >

Re: [PATCHv2 5/7] hurd: remove unused variables

2020-05-30 Thread Simon Marchi
On 2020-05-29 6:03 p.m., Samuel Thibault wrote: > Fixes > > ../../gdb/gnu-nat.c:2554:7: error: unused variable ‘res’ > [-Werror=unused-variable] > 2554 | int res; > ../../gdb/gnu-nat.c:2644:20: error: unused variable ‘old_address’ > [-Werror=unused-variable] > 2644 | vm_address_t

Re: [PATCHv2 4/7] hurd: add missing include

2020-05-30 Thread Simon Marchi
On 2020-05-29 6:02 p.m., Samuel Thibault wrote: > Fixes > > ../../gdb/gnu-nat.c:2522:14: error: ‘target_gdbarch’ was not declared in this > scope; did you mean ‘target_detach’? > 2522 |paddress (target_gdbarch (), memaddr), pulongest (len), > > gdb/Changelog: > > 2020-05-29 Samuel

Re: [PATCHv2 3/7] hurd: make function cast stronger

2020-05-30 Thread Simon Marchi
On 2020-05-29 6:01 p.m., Samuel Thibault wrote: > Fixes > > process_reply_S.c:104:23: error: function called through a non-compatible > type [-Werror] > 104 | OutP->RetCode = (*(kern_return_t (*)(mach_port_t, > kern_return_t)) S_proc_setmsgport_reply) (In0P->Head.msgh_request_port, In0P-

Re: [PATCHv2 2/7] hurd: add missing awk script dependency

2020-05-30 Thread Simon Marchi
On 2020-05-29 6:01 p.m., Samuel Thibault wrote: > gdb/ChangeLog: > > 2020-05-29 Samuel Thibault > > * config/i386/i386gnu.mn (%_reply_S.c): Add dependency on > $(srcdir)/reply_mig_hack.awk. > > diff --git a/gdb/config/i386/i386gnu.mn b/gdb/config/i386/i386gnu.mn > index

Re: [PATCHv2 1/7] hurd: fix gnu_debug_flag type

2020-05-30 Thread Simon Marchi
On 2020-05-29 6:00 p.m., Samuel Thibault wrote: > Fixes > > ../../gdb/gnu-nat.c:96:6: error: conflicting declaration ‘bool gnu_debug_flag’ >96 | bool gnu_debug_flag = false; > ../../gdb/gnu-nat.c: In function ‘void _initialize_gnu_nat()’: > ../../gdb/gnu-nat.c:3511:7: error: cannot > >