Re: [PATCH] Fix /bin/sh compilation with CFLAGS += -DDEBUG > 1

2010-10-13 Thread Garrett Cooper
On Tue, Oct 12, 2010 at 11:56 AM, John Baldwin wrote: > On Tuesday, October 12, 2010 2:31:36 pm Garrett Cooper wrote: >> On Tue, Oct 12, 2010 at 5:30 AM, John Baldwin wrote: >> > You should use %z to print size_t's, but even better is to just use %t >> > to print a ptrdiff_t (which is the type th

Re: [PATCH] Fix /bin/sh compilation with CFLAGS += -DDEBUG > 1

2010-10-12 Thread John Baldwin
On Tuesday, October 12, 2010 2:31:36 pm Garrett Cooper wrote: > On Tue, Oct 12, 2010 at 5:30 AM, John Baldwin wrote: > > You should use %z to print size_t's, but even better is to just use %t > > to print a ptrdiff_t (which is the type that holds the difference of two > > pointers). > > Ok. T

Re: [PATCH] Fix /bin/sh compilation with CFLAGS += -DDEBUG > 1

2010-10-12 Thread Garrett Cooper
On Tue, Oct 12, 2010 at 5:30 AM, John Baldwin wrote: > On Tuesday, October 12, 2010 6:47:49 am Garrett Cooper wrote: >> Hi, >>     It looks like the format strings are broken on 64-bit archs in >> /bin/sh's TRACE functionality (can be enabled by uncommenting -DDEBUG >> > 1 in bin/sh/Makefile). The

Re: [PATCH] Fix /bin/sh compilation with CFLAGS += -DDEBUG > 1

2010-10-12 Thread John Baldwin
On Tuesday, October 12, 2010 6:47:49 am Garrett Cooper wrote: > Hi, > It looks like the format strings are broken on 64-bit archs in > /bin/sh's TRACE functionality (can be enabled by uncommenting -DDEBUG > > 1 in bin/sh/Makefile). The attached patch fixes this functionality > again so one can

[PATCH] Fix /bin/sh compilation with CFLAGS += -DDEBUG > 1

2010-10-12 Thread Garrett Cooper
Hi, It looks like the format strings are broken on 64-bit archs in /bin/sh's TRACE functionality (can be enabled by uncommenting -DDEBUG > 1 in bin/sh/Makefile). The attached patch fixes this functionality again so one can trace sh's calls with TRACE, which may or may be helpful to those debugg