From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23789 invoked by alias); 31 Mar 2016 18:56:43 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 23281 invoked by uid 89); 31 Mar 2016 18:56:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1468 X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (176.31.208.32) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 31 Mar 2016 18:56:33 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Fix PR gdb/19858: GDB doesn't register the JIT libraries on attach From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: <9bb84c9f97cb81df81f18f4e47d6b24fa37b597c@gdb-build> Date: Thu, 31 Mar 2016 19:01:00 -0000 X-SW-Source: 2016-q1/txt/msg10202.txt.bz2 *** TEST RESULTS FOR COMMIT 9bb84c9f97cb81df81f18f4e47d6b24fa37b597c *** Author: Yichao Yu Branch: master Commit: 9bb84c9f97cb81df81f18f4e47d6b24fa37b597c 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 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