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 90823https://bugs.webkit.org/show_bug.cgi?id=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-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 m...@apple.com wrote: You could either put

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 rafael.l...@openbossa.org 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

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 kl...@webkit.org wrote: On Thu, Jul 19, 2012 at 7:20 PM, Filip Pizlo fpi...@apple.com 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

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

2012-07-25 Thread Yong Li
2012/7/19 Brady Eidson beid...@apple.com: On Jul 19, 2012, at 10:53 AM, Andreas Kling kl...@webkit.org wrote: On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson beid...@apple.com wrote: On Jul 10, 2012, at 5:25 AM, Alexis Menard alexis.men...@openbossa.org wrote: On Mon, Jul 9, 2012 at 6:53

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 yong.li.web...@gmail.com wrote: 2012/7/19 Brady Eidson beid...@apple.com: On Jul 19, 2012, at 10:53 AM, Andreas Kling kl...@webkit.org wrote: On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson beid...@apple.com wrote: On Jul 10, 2012, at 5:25 AM,

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? Probably he meant

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 fpi...@apple.com: 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 less likely to

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 annu...@yandex.ru wrote: 19.07.2012, 22:20, Filip Pizlo fpi...@apple.com: Now consider the stream form: thingy foo a bar someWeirdNonsenseToEnableHex b baz c endl; This is 8 procedure calls and three string constants. This

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 shezbaig...@gmail.com wrote: On Fri, Jul 20, 2012 at 7:46 AM, Konstantin Tokarev annu...@yandex.ru wrote: 19.07.2012, 22:20, Filip Pizlo fpi...@apple.com: Now consider the stream form: thingy foo a bar someWeirdNonsenseToEnableHex b

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 shezbaig...@gmail.com wrote: On Fri, Jul 20, 2012 at 7:46 AM, Konstantin Tokarev annu...@yandex.ru wrote: 19.07.2012, 22:20, Filip Pizlo fpi...@apple.com: Now consider the stream form: thingy foo a bar someWeirdNonsenseToEnableHex b baz

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 beid...@apple.com wrote: On Jul 20, 2012, at 7:53 AM, Shezan Baig shezbaig...@gmail.com 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)

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 beid...@apple.com wrote: On Jul 10, 2012, at 5:25 AM, Alexis Menard alexis.men...@openbossa.org wrote: On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson beid...@apple.com wrote: On Jul 9, 2012, at 2:43 PM, Alexis Menard

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 beid...@apple.com mailto:beid...@apple.com wrote: On Jul 10, 2012, at 5:25 AM, Alexis Menard alexis.men...@openbossa.org mailto:alexis.men...@openbossa.org wrote: On Mon, Jul 9, 2012 at

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 kl...@webkit.org wrote: On Tue, Jul 10, 2012 at 4:52 PM, Brady Eidson beid...@apple.com wrote: On Jul 10, 2012, at 5:25 AM, Alexis Menard alexis.men...@openbossa.org wrote: On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson beid...@apple.com wrote:

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 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 beid...@apple.com wrote: On Jul 10, 2012, at 5:25 AM, Alexis Menard alexis.men...@openbossa.org wrote: On Mon,

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 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 beid...@apple.com wrote: On Jul 10, 2012, at 5:25 AM, Alexis Menard alexis.men...@openbossa.org wrote: On Mon,

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 alexis.men...@openbossa.org: 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

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

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 oliver.bucht...@googlemail.com mailto: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 beid...@apple.com

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 oliver.bucht...@googlemail.com 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

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 fpi...@apple.com 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

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 beid...@apple.com wrote: On Jul 19, 2012, at 10:53 AM, Andreas Kling

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 oliver.bucht...@googlemail.com 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

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 fpi...@apple.com 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

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 beid...@apple.com 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 beid...@apple.com wrote: On Jul 10, 2012,

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 oliver.bucht...@googlemail.com wrote: FWIW, there is a gdb python API for

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 alexis.men...@openbossa.org wrote: On Thu, Jul 19, 2012 at 3:20 PM, Filip Pizlo fpi...@apple.com wrote: One reason for preferring printf

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 fpi...@apple.com 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

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 beid...@apple.com wrote: On Jul 10, 2012, at 5:25 AM, Alexis Menard alexis.men...@openbossa.org wrote: On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson beid...@apple.com wrote: On Jul 9, 2012, at 2:43 PM, Alexis Menard alexis.men...@openbossa.org

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 akoivi...@gmail.com wrote: Maciej Stachowiak m...@apple.com 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,

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 Eidsonbeid...@apple.com wrote: On Jul 10, 2012, at 5:25 AM, Alexis Menardalexis.men...@openbossa.org wrote: On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidsonbeid...@apple.com wrote: On Jul 9, 2012, at 2:43 PM,

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 kbal...@webkit.org wrote: On 07/19/2012 11:27 PM, Maciej Stachowiak wrote: On Jul 10, 2012, at 8:52 AM, Brady Eidsonbeid...@apple.com wrote: On Jul 10, 2012, at 5:25 AM, Alexis Menardalexis.men...@openbossa.org wrote: On Mon, Jul 9, 2012 at

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 fpi...@apple.com wrote: On Jul 19, 2012, at 2:58 PM, Balazs Kelemen kbal...@webkit.org 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

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 beid...@apple.com wrote: On Jul 9, 2012, at 2:43 PM, Alexis Menard alexis.men...@openbossa.org 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.

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 alexis.men...@openbossa.org wrote: On Mon, Jul 9, 2012 at 6:53 PM, Brady Eidson beid...@apple.com wrote: On Jul 9, 2012, at 2:43 PM, Alexis Menard alexis.men...@openbossa.org wrote: Hi, For those who secretly use printf debugging :). I know

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 alexis.men...@openbossa.orgwrote: Hi, For those who secretly use printf debugging :). I know the recommended way is to use a

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 alexis.men...@openbossa.org 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