But, where I need stop gdb in v8 so that it gives me address for js function?
On Wednesday, February 17, 2016 at 5:34:36 PM UTC+6, Yang Guo wrote: > > I'd google for "gdb set break point at address" :) > > On Wed, Feb 17, 2016, 09:42 <[email protected] <javascript:>> wrote: > >> Thank Jochen, but I don't clearly understand how to set breakpoint on JS >> function? I can set breakpoints only on c++ functions in gdb. >> >> On Wednesday, February 17, 2016 at 2:07:04 PM UTC+6, Jochen Eisinger >> wrote: >> >>> V8 will move code objects around during garbage collection. If you want >>> to debug code in code objects, you'll have an easier time if you disable >>> this by passing --nocompact_code_space. >>> >>> Otherwise, using the regular commands to set breakpoints in gdb should >>> work just fine. >>> >>> On Wed, Feb 17, 2016 at 8:55 AM <[email protected]> wrote: >>> >> Hi v8 community! >>>> >>>> I have a js function: >>>> >>>> function foo(o) { >>>> return o.x; >>>> } >>>> >>>> >>>> print(foo(37)); >>>> >>>> >>>> I can see asm code for this function via "--print-code" flag, >>>> but I want to set a breakpoint at this function and see asm code in my >>>> gdb. >>>> >>>> For example: >>>> >>>> If I see this code in logs: >>>> 0x1ec9f1e3eeb8 24 488bd0 REX.W movq rdx,rax >>>> 0x1ec9f1e3eebb 27 48b959bb34fb37140000 REX.W movq rcx, >>>> 0x1437fb34bb59 ;; debug: position 27 >>>> ;; object: >>>> 0x1437fb34bb59 <String[1]: x> >>>> 0x1ec9f1e3eec5 37 48b80000000001000000 REX.W movq rax,0x100000000 >>>> 0x1ec9f1e3eecf 47 e8cc92fdff call 0x1ec9f1e181a0 ;; code: >>>> contextual, LOAD_IC, GENERIC >>>> ] >>>> [ Return sequence >>>> 0x1ec9f1e3eed4 52 48bb91d03dfb37140000 REX.W movq rbx, >>>> 0x1437fb3dd091 ;; object: 0x1437fb3dd091 Cell for 6144 >>>> >>>> In runtime I want to jump into 0x1ec9f1e181a0 and see what is happening >>>> there. >>>> >>>> How can I do this? >>>> >>>> -- >>>> -- >>>> v8-dev mailing list >>>> >>> [email protected] >>> >>> >>>> http://groups.google.com/group/v8-dev >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "v8-dev" group. >>>> >>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>> >>> >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >> -- >> v8-dev mailing list >> [email protected] <javascript:> >> http://groups.google.com/group/v8-dev >> --- >> You received this message because you are subscribed to the Google Groups >> "v8-dev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
