From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 06BF13858401; Tue, 18 Oct 2022 13:24:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06BF13858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666099496; bh=WTJlciLUAwEuPrQTd76y19Sca09s9rU8iO9paci8f7M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=coZiOzSEigx81cLxzV6NaTT+8S6cZi79No9UQ9xgFupe2gk5p8sGeVCfNInQ5Te9Y 9l0DqUKq17VaZDS471WxAzcNFF6LK1ffGg308KUiiCLsU68NCNACcG7DIgGMfk1aEX GE6IxlKBa155c+GqqVpoF6Xx4CLB1XDmqrTgiMoY= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/11839] gdb does not detect calls to dlmopen Date: Tue, 18 Oct 2022 13:24:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 7.1 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D11839 --- Comment #7 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Markus Metzger : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8d56636a0ecb= e6c38bf52b0683326ee21693c548 commit 8d56636a0ecbe6c38bf52b0683326ee21693c548 Author: Markus Metzger Date: Mon Oct 4 10:24:35 2021 +0200 gdb, gdbserver: support dlmopen() In glibc, the r_debug structure contains (amongst others) the following fields: int r_version: Version number for this protocol. It should be greater than 0. If r_version is 2, struct r_debug is extended to struct r_debug_extended with one additional field: struct r_debug_extended *r_next; Link to the next r_debug_extended structure. Each r_debug_extended structure represents a different namespace. The first r_debug_exte= nded structure is for the default namespace. 1. Change solib_svr4_r_map argument to take the debug base. 2. Add solib_svr4_r_next to find the link map in the next namespace from the r_next field. 3. Update svr4_current_sos_direct to get the link map in the next names= pace from the r_next field. 4. Don't check shared libraries in other namespaces when updating shared libraries in a new namespace. 5. Update svr4_same to check the load offset in addition to the name 6. Update svr4_default_sos to also set l_addr_inferior 7. Change the flat solib_list into a per-namespace list using the namespace's r_debug address to identify the namespace. Add gdb.base/dlmopen.exp to test this. To remain backwards compatible with older gdbserver, we reserve the namespace zero for a flat list of solibs from all namespaces. Subseque= nt patches will extend RSP to allow listing libraries grouped by namespace. This fixes PR 11839. Co-authored-by: Lu, Hongjiu --=20 You are receiving this mail because: You are on the CC list for the bug.=