public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] hurd: Fix RPC link names
@ 2022-02-01  0:04 Samuel Thibault
  2022-02-01  0:56 ` Simon Marchi
  0 siblings, 1 reply; 7+ messages in thread
From: Samuel Thibault @ 2022-02-01  0:04 UTC (permalink / raw)
  To: gdb-patches; +Cc: Thomas Schwinge, thomas

The RPC stub code expects to be calling a C function, not a C++
function.

diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 67ce00e9c30..030ccf01d68 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -1766,11 +1766,13 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
 
 \f
 #define ILL_RPC(fun, ...) \
+  extern "C" { \
   extern kern_return_t fun (__VA_ARGS__); \
   kern_return_t fun (__VA_ARGS__) \
   { \
     warning (_("illegal rpc: %s"), #fun); \
     return 0; \
+  } \
   }
 
 ILL_RPC (do_mach_notify_no_senders,

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] hurd: Fix RPC link names
  2022-02-01  0:04 [PATCH] hurd: Fix RPC link names Samuel Thibault
@ 2022-02-01  0:56 ` Simon Marchi
  2022-02-01  1:05   ` Samuel Thibault
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Marchi @ 2022-02-01  0:56 UTC (permalink / raw)
  To: Samuel Thibault, gdb-patches; +Cc: Thomas Schwinge, thomas

On 2022-01-31 19:04, Samuel Thibault via Gdb-patches wrote:
> The RPC stub code expects to be calling a C function, not a C++
> function.
> 
> diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
> index 67ce00e9c30..030ccf01d68 100644
> --- a/gdb/gnu-nat.c
> +++ b/gdb/gnu-nat.c
> @@ -1766,11 +1766,13 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
>  
>  \f
>  #define ILL_RPC(fun, ...) \
> +  extern "C" { \
>    extern kern_return_t fun (__VA_ARGS__); \

I think this could be on a single line:

  extern "C" kern_return_t fun..

LGTM in any case.

Simon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] hurd: Fix RPC link names
  2022-02-01  0:56 ` Simon Marchi
@ 2022-02-01  1:05   ` Samuel Thibault
  2022-02-01  1:05     ` Simon Marchi
  0 siblings, 1 reply; 7+ messages in thread
From: Samuel Thibault @ 2022-02-01  1:05 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches, Thomas Schwinge, thomas

Simon Marchi, le lun. 31 janv. 2022 19:56:35 -0500, a ecrit:
> On 2022-01-31 19:04, Samuel Thibault via Gdb-patches wrote:
> > The RPC stub code expects to be calling a C function, not a C++
> > function.
> > 
> > diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
> > index 67ce00e9c30..030ccf01d68 100644
> > --- a/gdb/gnu-nat.c
> > +++ b/gdb/gnu-nat.c
> > @@ -1766,11 +1766,13 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
> >  
> >  \f
> >  #define ILL_RPC(fun, ...) \
> > +  extern "C" { \
> >    extern kern_return_t fun (__VA_ARGS__); \
> 
> I think this could be on a single line:
> 
>   extern "C" kern_return_t fun..

Ah right here is a simplified version.

Samuel


The RPC stub code expects to be calling a C function, not a C++
function.

diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index e0219b1a3ff..81676308882 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -1766,7 +1766,7 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
 
 \f
 #define ILL_RPC(fun, ...) \
-  extern kern_return_t fun (__VA_ARGS__); \
+  extern "C" kern_return_t fun (__VA_ARGS__); \
   kern_return_t fun (__VA_ARGS__) \
   { \
     warning (_("illegal rpc: %s"), #fun); \

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] hurd: Fix RPC link names
  2022-02-01  1:05   ` Samuel Thibault
@ 2022-02-01  1:05     ` Simon Marchi
  2022-02-01  1:23       ` Samuel Thibault
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Marchi @ 2022-02-01  1:05 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: gdb-patches, Thomas Schwinge, thomas



On 2022-01-31 20:05, Samuel Thibault wrote:
> Simon Marchi, le lun. 31 janv. 2022 19:56:35 -0500, a ecrit:
>> On 2022-01-31 19:04, Samuel Thibault via Gdb-patches wrote:
>>> The RPC stub code expects to be calling a C function, not a C++
>>> function.
>>>
>>> diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
>>> index 67ce00e9c30..030ccf01d68 100644
>>> --- a/gdb/gnu-nat.c
>>> +++ b/gdb/gnu-nat.c
>>> @@ -1766,11 +1766,13 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
>>>  
>>>  \f
>>>  #define ILL_RPC(fun, ...) \
>>> +  extern "C" { \
>>>    extern kern_return_t fun (__VA_ARGS__); \
>>
>> I think this could be on a single line:
>>
>>   extern "C" kern_return_t fun..
> 
> Ah right here is a simplified version.
> 
> Samuel
> 
> 
> The RPC stub code expects to be calling a C function, not a C++
> function.
> 
> diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
> index e0219b1a3ff..81676308882 100644
> --- a/gdb/gnu-nat.c
> +++ b/gdb/gnu-nat.c
> @@ -1766,7 +1766,7 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
>  
>  \f
>  #define ILL_RPC(fun, ...) \
> -  extern kern_return_t fun (__VA_ARGS__); \
> +  extern "C" kern_return_t fun (__VA_ARGS__); \
>    kern_return_t fun (__VA_ARGS__) \
>    { \
>      warning (_("illegal rpc: %s"), #fun); \

Thanks, this is OK to push.

Simon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] hurd: Fix RPC link names
  2022-02-01  1:05     ` Simon Marchi
@ 2022-02-01  1:23       ` Samuel Thibault
  2022-02-01  1:31         ` Simon Marchi
  0 siblings, 1 reply; 7+ messages in thread
From: Samuel Thibault @ 2022-02-01  1:23 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches, Thomas Schwinge, thomas

Simon Marchi, le lun. 31 janv. 2022 20:05:53 -0500, a ecrit:
> 
> 
> On 2022-01-31 20:05, Samuel Thibault wrote:
> > Simon Marchi, le lun. 31 janv. 2022 19:56:35 -0500, a ecrit:
> >> On 2022-01-31 19:04, Samuel Thibault via Gdb-patches wrote:
> >>> The RPC stub code expects to be calling a C function, not a C++
> >>> function.
> >>>
> >>> diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
> >>> index 67ce00e9c30..030ccf01d68 100644
> >>> --- a/gdb/gnu-nat.c
> >>> +++ b/gdb/gnu-nat.c
> >>> @@ -1766,11 +1766,13 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
> >>>  
> >>>  \f
> >>>  #define ILL_RPC(fun, ...) \
> >>> +  extern "C" { \
> >>>    extern kern_return_t fun (__VA_ARGS__); \
> >>
> >> I think this could be on a single line:
> >>
> >>   extern "C" kern_return_t fun..
> > 
> > Ah right here is a simplified version.
> > 
> > Samuel
> > 
> > 
> > The RPC stub code expects to be calling a C function, not a C++
> > function.
> > 
> > diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
> > index e0219b1a3ff..81676308882 100644
> > --- a/gdb/gnu-nat.c
> > +++ b/gdb/gnu-nat.c
> > @@ -1766,7 +1766,7 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
> >  
> >  \f
> >  #define ILL_RPC(fun, ...) \
> > -  extern kern_return_t fun (__VA_ARGS__); \
> > +  extern "C" kern_return_t fun (__VA_ARGS__); \
> >    kern_return_t fun (__VA_ARGS__) \
> >    { \
> >      warning (_("illegal rpc: %s"), #fun); \
> 
> Thanks, this is OK to push.

(I don't have commit access)

Samuel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] hurd: Fix RPC link names
  2022-02-01  1:23       ` Samuel Thibault
@ 2022-02-01  1:31         ` Simon Marchi
  2022-02-01  2:08           ` Samuel Thibault
  0 siblings, 1 reply; 7+ messages in thread
From: Simon Marchi @ 2022-02-01  1:31 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: gdb-patches, Thomas Schwinge, thomas



On 2022-01-31 20:23, Samuel Thibault wrote:
> Simon Marchi, le lun. 31 janv. 2022 20:05:53 -0500, a ecrit:
>>
>>
>> On 2022-01-31 20:05, Samuel Thibault wrote:
>>> Simon Marchi, le lun. 31 janv. 2022 19:56:35 -0500, a ecrit:
>>>> On 2022-01-31 19:04, Samuel Thibault via Gdb-patches wrote:
>>>>> The RPC stub code expects to be calling a C function, not a C++
>>>>> function.
>>>>>
>>>>> diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
>>>>> index 67ce00e9c30..030ccf01d68 100644
>>>>> --- a/gdb/gnu-nat.c
>>>>> +++ b/gdb/gnu-nat.c
>>>>> @@ -1766,11 +1766,13 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
>>>>>  
>>>>>  \f
>>>>>  #define ILL_RPC(fun, ...) \
>>>>> +  extern "C" { \
>>>>>    extern kern_return_t fun (__VA_ARGS__); \
>>>>
>>>> I think this could be on a single line:
>>>>
>>>>   extern "C" kern_return_t fun..
>>>
>>> Ah right here is a simplified version.
>>>
>>> Samuel
>>>
>>>
>>> The RPC stub code expects to be calling a C function, not a C++
>>> function.
>>>
>>> diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
>>> index e0219b1a3ff..81676308882 100644
>>> --- a/gdb/gnu-nat.c
>>> +++ b/gdb/gnu-nat.c
>>> @@ -1766,7 +1766,7 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
>>>  
>>>  \f
>>>  #define ILL_RPC(fun, ...) \
>>> -  extern kern_return_t fun (__VA_ARGS__); \
>>> +  extern "C" kern_return_t fun (__VA_ARGS__); \
>>>    kern_return_t fun (__VA_ARGS__) \
>>>    { \
>>>      warning (_("illegal rpc: %s"), #fun); \
>>
>> Thanks, this is OK to push.
> 
> (I don't have commit access)
> 
> Samuel

Oh, sorry!  Pushed it for you.

Simon

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] hurd: Fix RPC link names
  2022-02-01  1:31         ` Simon Marchi
@ 2022-02-01  2:08           ` Samuel Thibault
  0 siblings, 0 replies; 7+ messages in thread
From: Samuel Thibault @ 2022-02-01  2:08 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches, Thomas Schwinge, thomas

Simon Marchi, le lun. 31 janv. 2022 20:31:22 -0500, a ecrit:
> On 2022-01-31 20:23, Samuel Thibault wrote:
> > Simon Marchi, le lun. 31 janv. 2022 20:05:53 -0500, a ecrit:
> >>
> >>
> >> On 2022-01-31 20:05, Samuel Thibault wrote:
> >>> Simon Marchi, le lun. 31 janv. 2022 19:56:35 -0500, a ecrit:
> >>>> On 2022-01-31 19:04, Samuel Thibault via Gdb-patches wrote:
> >>>>> The RPC stub code expects to be calling a C function, not a C++
> >>>>> function.
> >>>>>
> >>>>> diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
> >>>>> index 67ce00e9c30..030ccf01d68 100644
> >>>>> --- a/gdb/gnu-nat.c
> >>>>> +++ b/gdb/gnu-nat.c
> >>>>> @@ -1766,11 +1766,13 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
> >>>>>  
> >>>>>  \f
> >>>>>  #define ILL_RPC(fun, ...) \
> >>>>> +  extern "C" { \
> >>>>>    extern kern_return_t fun (__VA_ARGS__); \
> >>>>
> >>>> I think this could be on a single line:
> >>>>
> >>>>   extern "C" kern_return_t fun..
> >>>
> >>> Ah right here is a simplified version.
> >>>
> >>> Samuel
> >>>
> >>>
> >>> The RPC stub code expects to be calling a C function, not a C++
> >>> function.
> >>>
> >>> diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
> >>> index e0219b1a3ff..81676308882 100644
> >>> --- a/gdb/gnu-nat.c
> >>> +++ b/gdb/gnu-nat.c
> >>> @@ -1766,7 +1766,7 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
> >>>  
> >>>  \f
> >>>  #define ILL_RPC(fun, ...) \
> >>> -  extern kern_return_t fun (__VA_ARGS__); \
> >>> +  extern "C" kern_return_t fun (__VA_ARGS__); \
> >>>    kern_return_t fun (__VA_ARGS__) \
> >>>    { \
> >>>      warning (_("illegal rpc: %s"), #fun); \
> >>
> >> Thanks, this is OK to push.
> > 
> > (I don't have commit access)
> > 
> > Samuel
> 
> Oh, sorry!  Pushed it for you.

Thanks!

Samuel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-02-01  2:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-01  0:04 [PATCH] hurd: Fix RPC link names Samuel Thibault
2022-02-01  0:56 ` Simon Marchi
2022-02-01  1:05   ` Samuel Thibault
2022-02-01  1:05     ` Simon Marchi
2022-02-01  1:23       ` Samuel Thibault
2022-02-01  1:31         ` Simon Marchi
2022-02-01  2:08           ` Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).