Re: CVS commit: src/usr.bin/kdump

2017-11-06 Thread Joerg Sonnenberger
On Sun, Nov 05, 2017 at 12:44:29PM -0500, Christos Zoulas wrote:
> Module Name:  src
> Committed By: christos
> Date: Sun Nov  5 17:44:29 UTC 2017
> 
> Modified Files:
>   src/usr.bin/kdump: mkioctls
> 
> Log Message:
> deal with the stdbool.h mess defining bool in  and 
> and then xf86Opt.h wanting to define a struct field called bool.

I'd prefer to fix the latter.

Joerg


Re: CVS commit: src/usr.bin/kdump

2017-11-06 Thread Christos Zoulas
In article <20171106163453.gb28...@britannica.bec.de>,
Joerg Sonnenberger   wrote:
>On Sun, Nov 05, 2017 at 12:44:29PM -0500, Christos Zoulas wrote:
>> Module Name: src
>> Committed By:christos
>> Date:Sun Nov  5 17:44:29 UTC 2017
>> 
>> Modified Files:
>>  src/usr.bin/kdump: mkioctls
>> 
>> Log Message:
>> deal with the stdbool.h mess defining bool in  and 
>> and then xf86Opt.h wanting to define a struct field called bool.
>
>I'd prefer to fix the latter.

You mean change xf86Opt.h and rename 'bool' to 'xbool' or something else?
That would probably require touching a lot of other X client code, and
things will stop compiling out of the box for NetBSD. I think upstream
should fix it first :-)

christos



Re: CVS commit: src/usr.bin/kdump

2018-06-03 Thread J. Hannken-Illjes



> On 2. Jun 2018, at 22:07, matthew green  wrote:
> 
> Module Name:  src
> Committed By: mrg
> Date: Sat Jun  2 20:07:15 UTC 2018
> 
> Modified Files:
>   src/usr.bin/kdump: mkioctls
> 
> Log Message:
> just include  for mkioctls.  this works fine for me
> for several platforms and fixes the clang build.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.50 -r1.51 src/usr.bin/kdump/mkioctls

This breaks the build:

In file included from /build/devel/src/sys/net/if.h:99:0,
 from kdump-ioctl.c:23:
/build/devel/src/sys/altq/if_altq.h:48:2: error: unknown type name 'kmutex_t'
  kmutex_t *ifq_lock;
  ^~~~

The real problem seems the sys include search path:

#include <...> search starts here:
 /build/devel/obj/dist.amd64/usr/X11R7/include/libdrm
 /build/devel/obj/dist.amd64/usr/X11R7/include/pixman-1
 /build/devel/obj/dist.amd64/usr/X11R7/include
 /build/devel/src/external/cddl/osnet/sys
 /build/devel/src/external/cddl/osnet/dist/uts/common
 /build/devel/src/usr.bin/ktrace
 /build/devel/src/sys
 /build/devel/obj/dist.amd64/usr/include/gcc-6
 /build/devel/obj/tools.amd64/lib/gcc/x86_64--netbsd/6.4.0/include-fixed
 /build/devel/obj/dist.amd64/usr/include

Most  includes come from "cddl/osnet/sys/sys" which looks wrong.

Suppose the search better starts with "-I${NETBSDSRCDIR}/sys" ...

--
J. Hannken-Illjes - hann...@eis.cs.tu-bs.de - TU Braunschweig (Germa


re: CVS commit: src/usr.bin/kdump

2018-06-03 Thread matthew green
> > On 2. Jun 2018, at 22:07, matthew green  wrote:
> > 
> > Module Name:src
> > Committed By:   mrg
> > Date:   Sat Jun  2 20:07:15 UTC 2018
> > 
> > Modified Files:
> > src/usr.bin/kdump: mkioctls
> > 
> > Log Message:
> > just include  for mkioctls.  this works fine for me
> > for several platforms and fixes the clang build.
> > 
> > 
> > To generate a diff of this commit:
> > cvs rdiff -u -r1.50 -r1.51 src/usr.bin/kdump/mkioctls
> 
> This breaks the build:
> 
> In file included from /build/devel/src/sys/net/if.h:99:0,
>  from kdump-ioctl.c:23:
> /build/devel/src/sys/altq/if_altq.h:48:2: error: unknown type name 'kmutex_t'
>   kmutex_t *ifq_lock;
>   ^~~~
> 
> The real problem seems the sys include search path:
> 
> #include <...> search starts here:
>  /build/devel/obj/dist.amd64/usr/X11R7/include/libdrm
>  /build/devel/obj/dist.amd64/usr/X11R7/include/pixman-1
>  /build/devel/obj/dist.amd64/usr/X11R7/include
>  /build/devel/src/external/cddl/osnet/sys
>  /build/devel/src/external/cddl/osnet/dist/uts/common
>  /build/devel/src/usr.bin/ktrace
>  /build/devel/src/sys
>  /build/devel/obj/dist.amd64/usr/include/gcc-6
>  /build/devel/obj/tools.amd64/lib/gcc/x86_64--netbsd/6.4.0/include-fixed
>  /build/devel/obj/dist.amd64/usr/include
> 
> Most  includes come from "cddl/osnet/sys/sys" which looks wrong.
> 
> Suppose the search better starts with "-I${NETBSDSRCDIR}/sys" ...

i remain unable to reproduce this on my own system.  i guess
either your idea, or, -I${DESTDIR}/usr/include before the cddl
includes, and make them all last.

FWIW, this patch works for me (in that, it doesn't break).

please feel free to commit this or something similar that works
for you, as i'm hesitant to commit something else here without
confirming it helps the problem i don't see.

thanks.


.mrg.

Index: Makefile.ioctl-c
===
RCS file: /cvsroot/src/usr.bin/kdump/Makefile.ioctl-c,v
retrieving revision 1.35
diff -p -u -r1.35 Makefile.ioctl-c
--- Makefile.ioctl-c28 May 2018 21:05:02 -  1.35
+++ Makefile.ioctl-c3 Jun 2018 11:43:19 -
@@ -47,11 +47,6 @@ DPSRCS+= ${PROG}-ioctl.c
 CPPFLAGS+= -I${DESTDIR}/usr/X11R7/include/libdrm
 CPPFLAGS+= -I${DESTDIR}/usr/X11R7/include/pixman-1
 CPPFLAGS+= -I${DESTDIR}/usr/X11R7/include
-.if ${MKDTRACE} != "no"
-CPPFLAGS+= -I${NETBSDSRCDIR}/external/cddl/osnet/sys
-CPPFLAGS+= -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common
-CWARNFLAGS+=   -Wno-unknown-pragmas
-.endif
 CPPFLAGS+= -D_DEV_IC_BT8XX_H_
 CPPFLAGS+= -D_ALTQ_ALTQ_JOBS_H_# redefinition of inline
 # De-select one, dup ioctls
@@ -65,4 +60,13 @@ CPPFLAGS+=   -D__RADEON_DRM_H__  # Dup ioct
 CPPFLAGS+= -D__MACH64_DRM_H__  # Dup ioctls
 CPPFLAGS+= -D__MGA_DRM_H__ # Dup ioctls
 
+# Make sure these are last.
+.if ${MKDTRACE} != "no"
+# We put /usr/include here explicitly to always prefer NetBSD headers.
+CPPFLAGS+= -I${DESTDIR}/usr/include
+CPPFLAGS+= -I${NETBSDSRCDIR}/external/cddl/osnet/sys
+CPPFLAGS+= -I${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common
+CWARNFLAGS+=   -Wno-unknown-pragmas
+.endif
+
 ${DEPFILES}: .PRECIOUS


Re: CVS commit: src/usr.bin/kdump

2020-04-02 Thread Kamil Rytarowski
On 02.04.2020 19:40, Christos Zoulas wrote:
> +set -x
> +AWK=gawk
> +

gawk?


Re: CVS commit: src/usr.bin/kdump

2020-04-02 Thread Christos Zoulas
Ah debugging remnants. I'll remove it. Can you look at PR/55128?

static inline union savefpu *
fpu_lwp_area(struct lwp *l)
{
struct pcb *pcb = lwp_getpcb(l);
union savefpu *area = &pcb->pcb_savefpu;

KASSERT((l->l_flag & LW_SYSTEM) == 0);
if (l == curlwp) {
fpu_save();
}
KASSERT(!(l->l_md.md_flags & MDL_FPU_IN_CPU)); <- this will fire if the 
debugger calls it with l != curlew and it uses cpu

return area;
}


> On Apr 2, 2020, at 5:31 PM, Kamil Rytarowski  wrote:
> 
> On 02.04.2020 19:40, Christos Zoulas wrote:
>> +set -x
>> +AWK=gawk
>> +
> 
> gawk?



signature.asc
Description: Message signed with OpenPGP


Re: CVS commit: src/usr.bin/kdump

2020-04-02 Thread Kamil Rytarowski
On 02.04.2020 23:35, Christos Zoulas wrote:
> Ah debugging remnants. I'll remove it. Can you look at PR/55128?
>

OK!

> static inline union savefpu *
> fpu_lwp_area(struct lwp *l)
> {
> struct pcb *pcb = lwp_getpcb(l);
> union savefpu *area = &pcb->pcb_savefpu;
>
> KASSERT((l->l_flag & LW_SYSTEM) == 0);
> if (l == curlwp) {
> fpu_save();
> }
> KASSERT(!(l->l_md.md_flags & MDL_FPU_IN_CPU)); <- this will fire if 
> the debugger calls it with l != curlew and it uses cpu
>
> return area;
> }
>
>
>> On Apr 2, 2020, at 5:31 PM, Kamil Rytarowski  wrote:
>>
>> On 02.04.2020 19:40, Christos Zoulas wrote:
>>> +set -x
>>> +AWK=gawk
>>> +
>>
>> gawk?
>