no, that's not supported. On Wed, Feb 17, 2016 at 2:11 PM <[email protected]> wrote:
> There is no unique address of a js function. The code for the js function >> can move around, it can be compiled multiple times, etc.. >> > I know, but in particular point of time I can look for address of a js > function and go to it. V8 doesn't support this for debug purpose in gdb? > > > On Wednesday, February 17, 2016 at 6:35:24 PM UTC+6, Jochen Eisinger wrote: > >> There is no unique address of a js function. The code for the js function >> can move around, it can be compiled multiple times, etc.. >> >> On Wed, Feb 17, 2016 at 1:32 PM <[email protected]> wrote: >> >>> 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]> 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] >>>>> 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] >>> 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] > 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] 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.
