[0/3] Handling multiple JITers

Message ID cover.1590397723.git.tankut.baris.aktemur@intel.com
Headers show
Series
  • Handling multiple JITers
Related show

Message

H.J. Lu via Gdb-patches May 25, 2020, 9:38 a.m.
Hi,

This short series is about handling multiple JITers.

GDB defines an interface that JITers are expected to conform to, so
that JITed code can be debugged.  In particular, a JITer should invoke
(empty) functions from that interface at important points in the JIT
flow.  GDB puts breakpoints at these functions to be notified about
essential JIT events.  See

  https://sourceware.org/gdb/current/onlinedocs/gdb/JIT-Interface.html

GDB's internal JIT-tracking mechanism assumes that there is a single
objfile that contains the JIT symbols on which GDB inserts the
notification breakpoints.  This brings the problem that if multiple
JITers exist, only the first one will be decorated with JIT breakpoints
and the JIT events from the others will be missed.

The series proposed here makes GDB track multiple objfiles with JIT
symbols.

Regards.
Baris



Tankut Baris Aktemur (3): gdb/jit: use a map to store objfile and jit
  breakpoint info gdb/jit: enable tracking multiple jitter objfiles
  gdb/testsuite: fix minor things in jit tests

 gdb/jit.c                                    | 229 ++++++++++---------
 gdb/testsuite/gdb.base/jit-elf-so.exp        |   2 +-
 gdb/testsuite/gdb.base/jit-reader-simple.exp |  47 +++-
 3 files changed, 171 insertions(+), 107 deletions(-)

-- 
2.17.1

Comments

H.J. Lu via Gdb-patches June 12, 2020, 11:12 a.m. | #1
On Monday, May 25, 2020 11:39 AM, Tankut Baris Aktemur wrote:
> Hi,

> 

> This short series is about handling multiple JITers.

> 

> GDB defines an interface that JITers are expected to conform to, so

> that JITed code can be debugged.  In particular, a JITer should invoke

> (empty) functions from that interface at important points in the JIT

> flow.  GDB puts breakpoints at these functions to be notified about

> essential JIT events.  See

> 

>   https://sourceware.org/gdb/current/onlinedocs/gdb/JIT-Interface.html

> 

> GDB's internal JIT-tracking mechanism assumes that there is a single

> objfile that contains the JIT symbols on which GDB inserts the

> notification breakpoints.  This brings the problem that if multiple

> JITers exist, only the first one will be decorated with JIT breakpoints

> and the JIT events from the others will be missed.

> 

> The series proposed here makes GDB track multiple objfiles with JIT

> symbols.


Kindly pinging for

  https://sourceware.org/pipermail/gdb-patches/2020-May/168959.html

(Also CC'ed Simon this time because he looked at jit.c recently in detail.)

Regards
-Baris


Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Gary Kershaw
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928