Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57875 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17762 invoked from network); 14 Feb 2012 17:22:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2012 17:22:44 -0000 Authentication-Results: pb1.pair.com header.from=adi_mutu06@yahoo.com; sender-id=unknown; domainkeys=good Authentication-Results: pb1.pair.com smtp.mail=adi_mutu06@yahoo.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain yahoo.com from 98.139.91.224 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: adi_mutu06@yahoo.com X-Host-Fingerprint: 98.139.91.224 nm23-vm0.bullet.mail.sp2.yahoo.com Received: from [98.139.91.224] ([98.139.91.224:48921] helo=nm23-vm0.bullet.mail.sp2.yahoo.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 24/A4-26615-2689A3F4 for ; Tue, 14 Feb 2012 12:22:43 -0500 Received: from [98.139.91.63] by nm23.bullet.mail.sp2.yahoo.com with NNFMP; 14 Feb 2012 17:22:39 -0000 Received: from [98.139.91.40] by tm3.bullet.mail.sp2.yahoo.com with NNFMP; 14 Feb 2012 17:22:39 -0000 Received: from [127.0.0.1] by omp1040.mail.sp2.yahoo.com with NNFMP; 14 Feb 2012 17:22:39 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 897673.61098.bm@omp1040.mail.sp2.yahoo.com Received: (qmail 24127 invoked by uid 60001); 14 Feb 2012 17:22:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1329240159; bh=E2y8n+kn4CKL2cfDopFK6VQtntR4bbA4p9eSMYExLMU=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=AWaqEkcLVb1nR8OSj9oQOKYbmw6tVKTBzrQDFxdZ3asssYKaNJU3zTcFfa6pwnWv99UyzEE2JOoa5FwO625BbCgebgRJGtZ6EN7u/KvRoLAUyZsGbRgcrSrq5e42hpjrjkD04UsSkXCMLlPSpOymwUZYQTnuSjgT7TEfYd0vKfI= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=l3/mMgXZJ8iX1UrLB7uCkU8Uhi4NnT3hZb8lCZ6GAkIts59aOFnawG3NcRq029vGJX0idqyDmMrl8IHAmtzsDmkPOI4DuF3rDTf33oysqZZh0FVkAim6sTHprcIiE9flzAg5nGYrIWDwN+ig91XDq5PaR2dQ74arovh9d/0shrM=; X-YMail-OSG: zvdaDlwVM1lQrQSVo8I4JabtKLBPXVKVckI8hZxq0HZ41XY GyO2lKmWhZ.UpOGsiCMK5desH5U_NxxSnU4xaDPnImD9kIJepPaOIY3MjofT WolarTAD7eA0Dw8pA9DbpR2T8BgqVVOWGKqDeyptLnz9BqTcTWmFV9FIp8QV NukGzxDbyU2RPB_xBdleJbjSPrM_2hO3aXhk5d6KhUL3hICJeVL0B2cxXeUp YRC3MTkkB6n.VprkstqCaxU9h042i2BFiQy.bW39Jcb0XbhNgtzGnVmBEofp ZlNkCwPoDzBNmIolJ6yYWfNct_z5aQ9kuOGFk5W0kro37MgtS4voDH28ytYF J56RAyufsi6mnQcanM6VpFfHB8umlWhTwLRayy5fnHaqsc0iSKzQcGbpVDPZ 5a4vFQcHW8B0Km_q2eha2nKHhOhhokGX7.33KR_wkyomzHgFphq7O0hfVH4R ISh18YB2imRogcAx68kwenltLb.P9N1AX3GNZLesM3MHxRVFGI8AYPrXIiQ2 wUHA5kUWfvNtu7C9iI42w1ja4fcZxUkmsBRMit4XIT.oGfkcxicVYzKg- Received: from [193.230.227.3] by web43516.mail.sp1.yahoo.com via HTTP; Tue, 14 Feb 2012 09:22:39 PST X-Mailer: YahooMailWebService/0.8.116.338427 References: <1329166139.76210.YahooMailNeo@web43506.mail.sp1.yahoo.com> <4F399898.6060500@gmail.com> <1329205034.87613.YahooMailNeo@web43515.mail.sp1.yahoo.com> Message-ID: <1329240159.5958.YahooMailNeo@web43516.mail.sp1.yahoo.com> Date: Tue, 14 Feb 2012 09:22:39 -0800 (PST) Reply-To: Adi Mutu To: jpauli Cc: =?iso-8859-1?Q?=C1ngel_Gonz=E1lez?= , PHP Developers Mailing List In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-39719427-1167155815-1329240159=:5958" Subject: Re: [PHP-DEV] how to debug a php script ( the C code beneath it) From: adi_mutu06@yahoo.com (Adi Mutu) ---39719427-1167155815-1329240159=:5958 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thanks Julien....=0A=0AI don't know french, but i'll read it using google t= ranslate:)=0A=0A=0A________________________________=0A From: jpauli =0ATo: Adi Mutu =0ACc: =C1ngel Gonz=E1lez <= keisial@gmail.com>; PHP Developers Mailing List = =0ASent: Tuesday, February 14, 2012 11:17 AM=0ASubject: Re: [PHP-DEV] how t= o debug a php script ( the C code beneath it)=0A =0A2012/2/14 Adi Mutu =0A=0A> Perhaps i didn't explain correctly, my bad, sorry= .=0A> Basically what I want to see is the corresponding C code which is=0A>= executed, i could put a break in gdb, but how do I know at which C functio= n=0A> to put it, if i don't know the internals of php very good?=0A>=0A=0AA= nd the answer is : you cant.=0ASimply put, you have to study the code first= , before knowing through which=0Aline it will go.=0AThat's not very easy, a= s you can count on ~800.000 lines in trunk.=0A=0ATo see the path, use valgr= ind + callgrind. You'll get a very cool graph=0Alike this :=0Ahttp://julien= -pauli.developpez.com/tutoriels/php/internals/presentation/images/PHPIntern= als-callgraph.png=0A=0AYou could use gdb with the .gdbinit from trunk. Usin= g it with CDT is much=0Amore cool as it is GUI.=0A=0AI wrote some article a= bout PHP internals, mainly describing how it works.=0AIt's in french (=0Aht= tp://julien-pauli.developpez.com/tutoriels/php/internals/presentation)=0Awi= th some schema.=0A=0AMainly, the hardest part is ZendVM. If you dont have t= o debug ZendVM, it's=0Akinda "easy" and logic.=0A=0ACheers=0A=0AJulien.Paul= i=0A=0A=0A=0A>=0A> ________________________________=0A>=A0 From: =C1ngel Go= nz=E1lez =0A> To: Adi Mutu =0A> Cc= : PHP Developers Mailing List =0A> Sent: Tuesday, = February 14, 2012 1:11 AM=0A> Subject: Re: [PHP-DEV] how to debug a php scr= ipt ( the C code beneath it)=0A>=0A> On 13/02/12 21:48, Adi Mutu wrote:=0A>= > Hello,=0A> >=0A> > Perhaps this is a stupid question, but i haven't code= d in C in years and=0A> i'm not very familiar with development/debugging to= ols. If I have a php=0A> script say 20 lines,=0A> > How can I see a path of= the corresponding C code which is executed? What=0A> If i would like to br= eak at a certain php line in the script, is it=0A> possible?=0A> >=0A> > Th= anks,=0A> Why do you want to do it?=0A> It looks to me like that you are tr= ying to solve a problem the hard way=0A> by doing that.=0A> ---39719427-1167155815-1329240159=:5958--