From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1B65838555AB; Mon, 21 Aug 2023 19:41:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B65838555AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1692646908; bh=BWTyMnmxERpVI/nPD3cS6VGwLE2UOPurph9zgvi6kBA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OXtpd/RXCa5PJrYj8au0YFN9gd9X7Q0Gsxhzk4/HeBkt3f+Wiy+WFAw9WwHBwA3I9 8Zmjdwf+x7Rd36vrXQLY7FO8zVNjhbeOwU+okyVww7vVoWf2c3LbnZzkWL+7EkK9ZY td7aBzY5lmBu5/kcNyekb0GdWNPPvPaldPzCY+8U= From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug c++/30784] Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information Date: Mon, 21 Aug 2023 19:41:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: simark at simark dot ca X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- 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=3D30784 --- Comment #4 from Simon Marchi --- (In reply to nelakurthi koteswararao from comment #0) > Hi >=20 > built shibboleth-sp-3.3.0 package by passing '-g' option to enable debug > symbols. > but gdb fails with below error when break point is set in SPConfig::init() > (shibboleth-sp-3.3.0/shibsp/SPConfig.cpp) > {{ > (gdb) n >=20 > Thread 1 "dbd" hit Breakpoint 3, 0x00007ffff132bf50 in > shibsp::SPConfig::init(char const*, char const*)@plt () from > /lib64/libshibsp-lite.so.10 > (gdb) n > Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@= plt, > which has no line number information. > 0x00007ffff1329020 in ?? () from /lib64/libshibsp-lite.so.10 > }} > libs build using shiboleth-sp-3.3.0 are given below. > {{ > lrwxrwxrwx 1 root root 24 Aug 20 05:48 libshibsp-lite.so -> > libshibsp-lite.so.10.0.3 > lrwxrwxrwx 1 root root 24 Aug 20 05:48 libshibsp-lite.so.10 -> > libshibsp-lite.so.10.0.3 > -rwxr-xr-x 1 root root 24714944 Aug 20 05:48 libshibsp-lite.so.10.0.3 > lrwxrwxrwx 1 root root 19 Aug 20 05:47 libshibsp.so -> > libshibsp.so.10.0.3 > lrwxrwxrwx 1 root root 19 Aug 20 05:47 libshibsp.so.10 -> > libshibsp.so.10.0.3 > -rwxr-xr-x 1 root root 57520408 Aug 20 05:47 libshibsp.so.10.0.3 > }} > shibboleth-sp-3.3.0/shibsp$ file .libs/libshibsp.so.10.0.3 > .libs/libshibsp.so.10.0.3: ELF 64-bit LSB shared object, x86-64, version 1 > (GNU/Linux), dynamically linked, with debug_info, not stripped >=20 > shibsp$ file .libs/libshibsp-lite.so.10.0.3 > .libs/libshibsp-lite.so.10.0.3: ELF 64-bit LSB shared object, x86-64, > version 1 (GNU/Linux), dynamically linked, with debug_info, not stripped > shibboleth-sp-3.3.0/shibsp$ > }} > is it required to load above so file using gdb command before setting > breakpoint ? or symbol links to .so files is causing failure? > any insight in to the isuse? >=20 > regards > koti The other problem I can see is that you are stopped at shibsp::SPConfig::init(char const*, char const*)@plt, not shibsp::SPConfig::init(char const*, char const*). The @plt symbol is a spe= cial symbol resolver function called the first time the function is called, to resolve which version of the function to use (in the context of shared libraries where there might be multiple). Normally, when you put a breakpoint on shibsp::SPConfig::init, GDB should _= not_ put a breakpoint on the corresponding @plt function. But it sometimes make= s a mistake and does put a breakpoint there, meaning that execution will stop on the @plt function first. If that happens, continue the execution again, th= at should make you stop on the real shibsp::SPConfig::init function. A problem like this was fixed in this commit, for example: https://gitlab.com/gnutools/binutils-gdb/-/commit/f0bdf68d3fb6db1dd2b83e070= 62e2104cdb785c2 --=20 You are receiving this mail because: You are on the CC list for the bug.=