Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-11-09 Thread Darin Adler
On Nov 9, 2012, at 9:59 AM, Rafael Brandao wrote: > I'd go with the overloads in a single file Why? Seems the overloads should be in the files of the classes they are for. -- Darin ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.w

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-11-09 Thread Rafael Brandao
You're right. Do you have any consensus of which approach is the best? I'd go with the overloads in a single file, as each one of them are likely inline, and this would make easier to add overloads. On Fri, Nov 9, 2012 at 2:33 PM, Maciej Stachowiak wrote: > > You could either put the code in th

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-11-09 Thread Maciej Stachowiak
You could either put the code in the headers for the relevant classes, or the base mechanism in WTF and specific overloads in a catchall header for WebCore. You don't have to put the basic mechanism in WebCore just to have overloads for WebCore types. - Maciej On Nov 9, 2012, at 9:29 AM, Raf

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-11-09 Thread Rafael Brandao
I was just trying to avoid adding code on other places, and it seemed wrong to include WebCore files inside WTF. If there's no problem on changing other files (like IntRect, IntSize, etc.), I have no problem with moving the appropriate overload around ENABLE(DEBUG_HELPERS). Regards, On Fri, Nov 9

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-11-09 Thread Filip Pizlo
I like this patch. But I don't quite see why this couldn't live in WTF. It would certainly be useful from places in JSC and WTF, so it would be unfortunate if this was WebCore-only. And I don't see the circular dependency. And if you wanted to have a wtfPrint() for IntRect, then couldn't you

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-11-09 Thread Rafael Brandao
I've just submitted a patch for this issue (bug 90823). I'm also a shameless printfer and I believe the project could benefit with such debugging helpers. I've decided to isolate the debug definitions in a single place, so instead of adding alien code

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-08-13 Thread Thiago Marcos P. Santos
On Thu, Jul 19, 2012 at 9:27 PM, Andreas Kling wrote: > On Thu, Jul 19, 2012 at 7:20 PM, Filip Pizlo wrote: >> >> >> dataLog("foo %d bar %x baz %p\n", a, b, c); > > > Reasoning and valid arguments aside, that actually looks totally beautiful. > Do want. > +1 from this shameless printfer. ___

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-25 Thread John Yani
>> That possibility aside, the stronger part of my objection is language >> purity. WebCore uses C++ as "C with classes" and I don't think it's worth >> it to confuse new (or existing) contributors about that going forward. >> > > Can you elaborate why WebCore uses C++ as "C with classes"? Proba

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-25 Thread Brady Eidson
On Jul 25, 2012, at 8:25 AM, Yong Li wrote: > 2012/7/19 Brady Eidson : >> >> On Jul 19, 2012, at 10:53 AM, Andreas Kling wrote: >> >> On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson wrote: >>> >>> >>> On Jul 10, 2012, at 5:25 AM, Alexis Menard >>> wrote: >>> On Mon, Jul 9, 2012 at 6:5

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-25 Thread Yong Li
2012/7/19 Brady Eidson : > > On Jul 19, 2012, at 10:53 AM, Andreas Kling wrote: > > On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson wrote: >> >> >> On Jul 10, 2012, at 5:25 AM, Alexis Menard >> wrote: >> >> > On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson wrote: >> >> >> >> On Jul 9, 2012, at 2:43

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-20 Thread Shezan Baig
On Fri, Jul 20, 2012 at 11:48 AM, Brady Eidson wrote: > On Jul 20, 2012, at 7:53 AM, Shezan Baig wrote: >> And because I'm in the middle of debugging a particular issue, I don't >> really want to create a new type that wraps up those (potentially >> unrelated) variables, just in order to create a

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-20 Thread Brady Eidson
On Jul 20, 2012, at 7:53 AM, Shezan Baig wrote: > On Fri, Jul 20, 2012 at 7:46 AM, Konstantin Tokarev wrote: >> >> 19.07.2012, 22:20, "Filip Pizlo" : >>> Now consider the stream form: >>> thingy << "foo " << a << " bar " << someWeirdNonsenseToEnableHex << b << " >>> baz " << c << endl; >>> Th

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-20 Thread Shezan Baig
On Fri, Jul 20, 2012 at 10:53 AM, Shezan Baig wrote: > On Fri, Jul 20, 2012 at 7:46 AM, Konstantin Tokarev wrote: >> >> 19.07.2012, 22:20, "Filip Pizlo" : >>> Now consider the stream form: >>> thingy << "foo " << a << " bar " << someWeirdNonsenseToEnableHex << b << " >>> baz " << c << endl; >>>

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-20 Thread Shezan Baig
On Fri, Jul 20, 2012 at 7:46 AM, Konstantin Tokarev wrote: > > 19.07.2012, 22:20, "Filip Pizlo" : >> Now consider the stream form: >> thingy << "foo " << a << " bar " << someWeirdNonsenseToEnableHex << b << " >> baz " << c << endl; >> This is 8 procedure calls and three string constants. This cod

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-20 Thread Konstantin Tokarev
19.07.2012, 22:20, "Filip Pizlo" : > Now consider the stream form: > thingy << "foo " << a << " bar " << someWeirdNonsenseToEnableHex << b << " > baz " << c << endl; > This is 8 procedure calls and three string constants. This code will be > somewhere around 8 times fatter. Hence, you will be le

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Brady Eidson
On Jul 19, 2012, at 3:09 PM, Filip Pizlo wrote: > On Jul 19, 2012, at 2:58 PM, Balazs Kelemen wrote: > >> But neither these compile to a single function call. Or we could define >> simple inline debug() overrides but we could also do that with the stream >> operator. And anyway, if the actua

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Filip Pizlo
On Jul 19, 2012, at 2:58 PM, Balazs Kelemen wrote: > On 07/19/2012 11:27 PM, Maciej Stachowiak wrote: >> On Jul 10, 2012, at 8:52 AM, Brady Eidson wrote: >> >>> On Jul 10, 2012, at 5:25 AM, Alexis Menard >>> wrote: >>> On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson wrote: > On Jul 9

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Balazs Kelemen
On 07/19/2012 11:27 PM, Maciej Stachowiak wrote: On Jul 10, 2012, at 8:52 AM, Brady Eidson wrote: On Jul 10, 2012, at 5:25 AM, Alexis Menard wrote: On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson wrote: On Jul 9, 2012, at 2:43 PM, Alexis Menard wrote: Hi, For those who "secretly" use pri

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Brady Eidson
On Jul 19, 2012, at 2:46 PM, Antti Koivisto wrote: > Maciej Stachowiak kirjoitti 20.7.2012 kello 0.27: > >> >> In principle, we could also have this support multiple arguments, so you >> could write: >> >> debug("frame: ", someFrame, " node: ", someNode, " string", someString); > > I think

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Maciej Stachowiak
On Jul 10, 2012, at 8:52 AM, Brady Eidson wrote: > > On Jul 10, 2012, at 5:25 AM, Alexis Menard > wrote: > >> On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson wrote: >>> >>> On Jul 9, 2012, at 2:43 PM, Alexis Menard >>> wrote: >>> Hi, For those who "secretly" use printf debu

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Alexis Menard
On Thu, Jul 19, 2012 at 4:11 PM, Filip Pizlo wrote: > But I do want a debugging utility to does land, is always compiled in, and > that everyone enjoys using. The header itself in the patch would land so you can use it right away (and compile even in release). But the actual "traces" or thingy()

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Filip Pizlo
But I do want a debugging utility to does land, is always compiled in, and that everyone enjoys using. -Filip On Jul 19, 2012, at 11:37 AM, Alexis Menard wrote: > On Thu, Jul 19, 2012 at 3:20 PM, Filip Pizlo wrote: >> One reason for preferring printf syntax is that it results in dramatically

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Tony Chang
On Thu, Jul 19, 2012 at 11:35 AM, Oliver Buchtala < oliver.bucht...@googlemail.com> wrote: > On 19.07.2012 20:26, Maciej Stachowiak wrote: > >> On Jul 19, 2012, at 11:01 AM, Oliver Buchtala < >> oliver.buchtala@googlemail.**com > wrote: >> FWIW, there is a gdb python API for changing the behavior.

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Ryosuke Niwa
On Thu, Jul 19, 2012 at 11:15 AM, Brady Eidson wrote: > On Jul 19, 2012, at 11:01 AM, Oliver Buchtala < > oliver.bucht...@googlemail.com> wrote: > > On 19.07.2012 19:53, Andreas Kling wrote: > > On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson wrote: > >> >> On Jul 10, 2012, at 5:25 AM, Alexis Men

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Alexis Menard
On Thu, Jul 19, 2012 at 3:20 PM, Filip Pizlo wrote: > One reason for preferring printf syntax is that it results in dramatically > more compact code. In JSC we take advantage of this to have debug printf > support built even in release builds. So or example if you want CodeBlock to > print itself

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Oliver Buchtala
On 19.07.2012 20:26, Maciej Stachowiak wrote: On Jul 19, 2012, at 11:01 AM, Oliver Buchtala wrote: Hi, I am probably one of those people who much dislike printf-debugging. What is your problem with using a debugger? Maybe because the displayed information is not appropriate? E.g., you would

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Filip Pizlo
I should note that WTF already has an API for this. See DataLog.h. In JSC we've been using it quite extensively to add pretty printers for a bunch of classes. -Filip On Jul 19, 2012, at 11:03 AM, Brady Eidson wrote: > > On Jul 19, 2012, at 10:53 AM, Andreas Kling wrote: > >> On Tue, Jul 10

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Andreas Kling
On Thu, Jul 19, 2012 at 7:20 PM, Filip Pizlo wrote: > > dataLog("foo %d bar %x baz %p\n", a, b, c); > Reasoning and valid arguments aside, that actually looks totally beautiful. Do want. -Kling ___ webkit-dev mailing list webkit-dev@lists.webkit.org h

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Maciej Stachowiak
On Jul 19, 2012, at 11:01 AM, Oliver Buchtala wrote: > > Hi, > > I am probably one of those people who much dislike printf-debugging. > What is your problem with using a debugger? > > Maybe because the displayed information is not appropriate? > E.g., you would like > someString.utf8().d

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Oliver Buchtala
On 19.07.2012 20:15, Brady Eidson wrote: On Jul 19, 2012, at 11:01 AM, Oliver Buchtala > wrote: On 19.07.2012 19:53, Andreas Kling wrote: On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson > wrote: On Jul 10, 2012, at 5:25 AM

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Filip Pizlo
One reason for preferring printf syntax is that it results in dramatically more compact code. In JSC we take advantage of this to have debug printf support built even in release builds. So or example if you want CodeBlock to print itself in a release build, you don't first have to #define a bunc

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Konstantin Tokarev
19.07.2012, 22:06, "Alexis Menard" : > > Say you have a low powered machine that can't link WebKit in debug > even stripped out of SVG etc... ... or you want to debug on device which cannot run debug WebKit under gdb because of memory limit. ... or you want to print some value from code which i

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Brady Eidson
On Jul 19, 2012, at 11:01 AM, Oliver Buchtala wrote: > On 19.07.2012 19:53, Andreas Kling wrote: >> On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson wrote: >> >> On Jul 10, 2012, at 5:25 AM, Alexis Menard >> wrote: >> >> > On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson wrote: >> >> >> >> On Ju

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Alexis Menard
On Thu, Jul 19, 2012 at 3:01 PM, Oliver Buchtala wrote: > On 19.07.2012 19:53, Andreas Kling wrote: > > On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson wrote: >> >> >> On Jul 10, 2012, at 5:25 AM, Alexis Menard >> wrote: >> >> > On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson wrote: >> >> >> >> On J

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Brady Eidson
On Jul 19, 2012, at 10:53 AM, Andreas Kling wrote: > On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson wrote: > > On Jul 10, 2012, at 5:25 AM, Alexis Menard > wrote: > > > On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson wrote: > >> > >> On Jul 9, 2012, at 2:43 PM, Alexis Menard > >> wrote: > >>

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Oliver Buchtala
On 19.07.2012 19:53, Andreas Kling wrote: On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson > wrote: On Jul 10, 2012, at 5:25 AM, Alexis Menard mailto:alexis.men...@openbossa.org>> wrote: > On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson mailto:beid...@apple.

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-19 Thread Andreas Kling
On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson wrote: > > On Jul 10, 2012, at 5:25 AM, Alexis Menard > wrote: > > > On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson wrote: > >> > >> On Jul 9, 2012, at 2:43 PM, Alexis Menard > wrote: > >> > >>> Hi, > >>> > >>> For those who "secretly" use printf deb

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-10 Thread Brady Eidson
On Jul 10, 2012, at 5:25 AM, Alexis Menard wrote: > On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson wrote: >> >> On Jul 9, 2012, at 2:43 PM, Alexis Menard >> wrote: >> >>> Hi, >>> >>> For those who "secretly" use printf debugging :). I know the >>> recommended way is to use a debugger and it'

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-10 Thread Alexis Menard
On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson wrote: > > On Jul 9, 2012, at 2:43 PM, Alexis Menard wrote: > >> Hi, >> >> For those who "secretly" use printf debugging :). I know the >> recommended way is to use a debugger and it's not the point of this >> discussion. > > A lot of us do this, and s

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-09 Thread Brady Eidson
On Jul 9, 2012, at 2:43 PM, Alexis Menard wrote: > Hi, > > For those who "secretly" use printf debugging :). I know the > recommended way is to use a debugger and it's not the point of this > discussion. A lot of us do this, and sometimes it's necessary. I agree with the gripe and support ad

Re: [webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-09 Thread Philip Rogers
Not that I admit to using printf debugging, but if I were to, hypothetically of course, I would find this patch helpful. On Mon, Jul 9, 2012 at 2:43 PM, Alexis Menard wrote: > Hi, > > For those who "secretly" use printf debugging :). I know the > recommended way is to use a debugger and it's not

[webkit-dev] Easing printf based debugging in WebKit with an helper.

2012-07-09 Thread Alexis Menard
Hi, For those who "secretly" use printf debugging :). I know the recommended way is to use a debugger and it's not the point of this discussion. The other day I was working on the Mac port (with no real possibility to have a debug build) and I missed a lot a great feature we have in Qt : qDebug()