This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/13431] jit code registration cleanup


https://sourceware.org/bugzilla/show_bug.cgi?id=13431

--- Comment #9 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The gdb-7.11-branch branch has been updated by Pedro Alves
<palves@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=cd64cabb8c66a5565fc33bf66a07c08bc767e413

commit cd64cabb8c66a5565fc33bf66a07c08bc767e413
Author: Yichao Yu <yyc1992@gmail.com>
Date:   Thu Mar 31 19:28:47 2016 +0100

    Fix PR gdb/19858: GDB doesn't register the JIT libraries on attach

    Ref: https://sourceware.org/ml/gdb/2016-03/msg00023.html

    GDB currently fails to fetch the list of already-registered JIT
    modules on attach.

    Nothing is calling jit_inferior_init, which is what is responsible for
    walking the JIT object list at init time.

    Despite the misleading naming, jit_inferior_created_hook ->
    jit_inferior_init is only called when the inferior execs.

    This regressed with the fix for PR gdb/13431 (03bef283c2d3):
     https://sourceware.org/ml/gdb-patches/2012-02/msg00023.html which
    removed the inferior_created (jit_inferior_created_observer)
    observer.

    Adding an inferior_created observer back fixes the issue.

    In turn, this exposes a bug in jit_breakpoint_re_set_internal as well,
    which is returning the wrong result when we already have the
    breakpoint at the right address.

    gdb/ChangeLog:
    2016-03-31  Yichao Yu  <yyc1992@gmail.com>

        PR gdb/19858
        * jit.c (jit_breakpoint_re_set_internal): Return 0 if we already
        got the breakpoint at the right address.
        (jit_inferior_created): New function.
        (_initialize_jit): Install jit_inferior_created as
        inferior_created observer.

    Signed-off-by: Pedro Alves <palves@redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]