public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/30784] New: Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information
@ 2023-08-20 16:11 koteswararao18 at gmail dot com
  2023-08-20 16:13 ` [Bug c++/30784] " koteswararao18 at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: koteswararao18 at gmail dot com @ 2023-08-20 16:11 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 30784
           Summary: Single stepping until exit from function
                    _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line
                    number information
           Product: gdb
           Version: 12.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: koteswararao18 at gmail dot com
  Target Milestone: ---

Hi

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

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

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?

regards
koti

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/30784] Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information
  2023-08-20 16:11 [Bug c++/30784] New: Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information koteswararao18 at gmail dot com
@ 2023-08-20 16:13 ` koteswararao18 at gmail dot com
  2023-08-21  1:44 ` simark at simark dot ca
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: koteswararao18 at gmail dot com @ 2023-08-20 16:13 UTC (permalink / raw)
  To: gdb-prs

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

nelakurthi koteswararao <koteswararao18 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/30784] Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information
  2023-08-20 16:11 [Bug c++/30784] New: Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information koteswararao18 at gmail dot com
  2023-08-20 16:13 ` [Bug c++/30784] " koteswararao18 at gmail dot com
@ 2023-08-21  1:44 ` simark at simark dot ca
  2023-08-21  3:04 ` koteswararao18 at gmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: simark at simark dot ca @ 2023-08-21  1:44 UTC (permalink / raw)
  To: gdb-prs

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

Simon Marchi <simark at simark dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simark at simark dot ca

--- Comment #1 from Simon Marchi <simark at simark dot ca> ---
Just a guess: because of the ".libs" directory, it sounds like the application
you debug uses libtool as part of its build system.  If so, if you want to
debug the application, running it inside the build tree, you need to use the
libtool wrapper:

  $ libtool --mode execute gdb your-binary

libtool will set up the appropriate LD_LIBRARY_PATH and other variables so that
your program will pick up the libraries

How do you run gdb in your case?

The message that says "/lib64/libshibsp-lite.so.10" is a sign that your
application is picking up the library installed on the system, not the library
in your build tree.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/30784] Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information
  2023-08-20 16:11 [Bug c++/30784] New: Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information koteswararao18 at gmail dot com
  2023-08-20 16:13 ` [Bug c++/30784] " koteswararao18 at gmail dot com
  2023-08-21  1:44 ` simark at simark dot ca
@ 2023-08-21  3:04 ` koteswararao18 at gmail dot com
  2023-08-21 19:35 ` tromey at sourceware dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: koteswararao18 at gmail dot com @ 2023-08-21  3:04 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #2 from nelakurthi koteswararao <koteswararao18 at gmail dot com> ---
Dear Simon Marchi,

>>How do you run gdb in your case?

>>The message that says "/lib64/libshibsp-lite.so.10" is a sign that your >>application is picking up the library installed on the system, not the library >>in your build tree.

Yes. i copied the built library "libshibsp-lite.so.10.0.3" to
/lib64/libshibsp-lite.so.10 on target and launched gdb on application by
setting breakpoints which is failing with error "Single stepping until exit
from function..." as mentioned in my previous comment.

regards
koti

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/30784] Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information
  2023-08-20 16:11 [Bug c++/30784] New: Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information koteswararao18 at gmail dot com
                   ` (2 preceding siblings ...)
  2023-08-21  3:04 ` koteswararao18 at gmail dot com
@ 2023-08-21 19:35 ` tromey at sourceware dot org
  2023-08-21 19:41 ` simark at simark dot ca
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2023-08-21 19:35 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #3 from Tom Tromey <tromey at sourceware dot org> ---
Are you sure the library has debug info?
Try "readelf -WS /lib64/libshibsp-lite.so.10 | grep debug"

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/30784] Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information
  2023-08-20 16:11 [Bug c++/30784] New: Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information koteswararao18 at gmail dot com
                   ` (3 preceding siblings ...)
  2023-08-21 19:35 ` tromey at sourceware dot org
@ 2023-08-21 19:41 ` simark at simark dot ca
  2023-08-22 14:16 ` koteswararao18 at gmail dot com
  2023-08-22 15:08 ` simark at simark dot ca
  6 siblings, 0 replies; 8+ messages in thread
From: simark at simark dot ca @ 2023-08-21 19:41 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Simon Marchi <simark at simark dot ca> ---
(In reply to nelakurthi koteswararao from comment #0)
> Hi
> 
> 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
> 
> 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
> 
> 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?
> 
> 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 special
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 makes 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, that
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/f0bdf68d3fb6db1dd2b83e07062e2104cdb785c2

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/30784] Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information
  2023-08-20 16:11 [Bug c++/30784] New: Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information koteswararao18 at gmail dot com
                   ` (4 preceding siblings ...)
  2023-08-21 19:41 ` simark at simark dot ca
@ 2023-08-22 14:16 ` koteswararao18 at gmail dot com
  2023-08-22 15:08 ` simark at simark dot ca
  6 siblings, 0 replies; 8+ messages in thread
From: koteswararao18 at gmail dot com @ 2023-08-22 14:16 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from nelakurthi koteswararao <koteswararao18 at gmail dot com> ---
Dear simon,
thank you for sharing the patch. i tested it by porting it to gdb and now able
to debug shibbole package.

regards
koti

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug c++/30784] Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information
  2023-08-20 16:11 [Bug c++/30784] New: Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information koteswararao18 at gmail dot com
                   ` (5 preceding siblings ...)
  2023-08-22 14:16 ` koteswararao18 at gmail dot com
@ 2023-08-22 15:08 ` simark at simark dot ca
  6 siblings, 0 replies; 8+ messages in thread
From: simark at simark dot ca @ 2023-08-22 15:08 UTC (permalink / raw)
  To: gdb-prs

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

Simon Marchi <simark at simark dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Simon Marchi <simark at simark dot ca> ---
(In reply to nelakurthi koteswararao from comment #5)
> Dear simon,
> thank you for sharing the patch. i tested it by porting it to gdb and now
> able to debug shibbole package.
> 
> regards
> koti

Ok, thanks, I'll close the bug then.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-22 15:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-20 16:11 [Bug c++/30784] New: Single stepping until exit from function _ZN6shibsp8SPConfig4initEPKcS2_@plt, which has no line number information koteswararao18 at gmail dot com
2023-08-20 16:13 ` [Bug c++/30784] " koteswararao18 at gmail dot com
2023-08-21  1:44 ` simark at simark dot ca
2023-08-21  3:04 ` koteswararao18 at gmail dot com
2023-08-21 19:35 ` tromey at sourceware dot org
2023-08-21 19:41 ` simark at simark dot ca
2023-08-22 14:16 ` koteswararao18 at gmail dot com
2023-08-22 15:08 ` simark at simark dot ca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).