Hi Ben,

The problem is that I don't get any breakpoint hit notification in gdb. The 
program just execute and exited normally, regardless of whether i set the 
breakpoint or not in __jit_debug_register_code.

I double checked in instructions that when I am using gm.py with target 
x64.debug, it does use the option ENABLE_GDB_JIT_INTERFACE.

So, then I am very confused why I don't get breakpoint hit in gdb.

Appreciate your help.

On Monday, June 18, 2018 at 3:20:44 PM UTC-7, Ben Noordhuis wrote:
>
> On Sun, Jun 17, 2018 at 11:15 PM, Mingwei Zhang <mingwa...@gmail.com 
> <javascript:>> wrote: 
> > Dear V8 developer, 
> > 
> > I recently tried to use the debugging interface for gdb on JIT code. 
> When I 
> > tried building a debug build of V8 and following the instructions in: 
> > 
> > https://github.com/v8/v8/wiki/GDB-JIT-Interface 
> > 
> > I launched my program using the following command: 
> > 
> >> gdb --args ./d8 --gdbjit helloworld.js 
> > 
> > 
> > In the gdb prompt, I setup a breakpoint in __jit_debug_register_code 
> before 
> > launch my program, but looks like the hook was never invoked. 
> > 
> > I am using gdb 7.11 in Ubuntu 16.04. 
> > d8 version 6.7.0 (candidate) 
> > 
> > My helloworld.js is very simple like this: 
> >>> 
> >>> function func() { 
> >>> 
> >>>         console.log('hello'); 
> >>> 
> >>> } 
> >>> 
> >>> 
> >>> func() 
> >> 
> >> 
> > 
> > Thanks. 
>
> You don't have to set a breakpoint in __jit_debug_register_code, gdb 
> does that for you.  It's a magic method that gdb recognizes, see 
> https://sourceware.org/gdb/onlinedocs/gdb/Declarations.html for 
> details. 
>
> That said, the gdbjit code is unmaintained - or at least not regularly 
> tested - and quite possibly broken.  YMMV. 
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to