* A problem debugging libraries
@ 2017-03-17 13:35 Tommi Höynälänmaa
2017-03-17 18:57 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Tommi Höynälänmaa @ 2017-03-17 13:35 UTC (permalink / raw)
To: gdb
I'm writing software using libraries liboctave, LAPACK, and BLAS.
I added function dnrm2alt1 to blas and changed lapack to use that
instead of dnrm2. When I try to debug a program using blas "break
dnrm2_" works in gdb but "break dnrm2alt1_" does not. Gdb can't find
function dnrm2alt1_. Can anybody tell what is wrong?
Here are outputs of some commands:
---cut here---
tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$
update-alternatives --config libblas.so.3
There are 2 choices for the alternative libblas.so.3 (providing
/usr/lib/libblas.so.3).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/atlas-base/atlas/libblas.so.3 35 auto mode
1 /usr/lib/atlas-base/atlas/libblas.so.3 35
manual mode
* 2 /usr/lib/libblas/libblas.so.3 10 manual
mode
Press enter to keep the current choice[*], or type selection number:
tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$
---cut here---
---cut here---
tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$
update-alternatives --config liblapack.so.3
There are 2 choices for the alternative liblapack.so.3 (providing
/usr/lib/liblapack.so.3).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/lapack/liblapack.so.3 10 auto
mode
1 /usr/lib/atlas-base/atlas/liblapack.so.3 5
manual mode
2 /usr/lib/lapack/liblapack.so.3 10
manual mode
Press enter to keep the current choice[*], or type selection number:
tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$
---cut here---
---cut here---
tohoyn@tohoyn-laptop:/usr/lib/libblas$ objdump -T libblas.so.3.0 | grep
-i dnrm2
0000000000040320 g DF .text 0000000000000011 Base dnrm2sub_
000000000000fd50 g DF .text 000000000000002b Base cblas_dnrm2
0000000000040220 g DF .text 000000000000006b Base dnrm2_
0000000000040290 g DF .text 0000000000000084 Base dnrm2alt1_
tohoyn@tohoyn-laptop:/usr/lib/libblas$
---cut here---
---cut here---
tohoyn@tohoyn-laptop:/usr/lib/lapack$ objdump -T liblapack.so.3.0 | grep
-i dnrm2
0000000000000000 DF *UND* 0000000000000000 dnrm2alt1_
tohoyn@tohoyn-laptop:/usr/lib/lapack$
---cut here---
- Tommi H.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: A problem debugging libraries
2017-03-17 13:35 A problem debugging libraries Tommi Höynälänmaa
@ 2017-03-17 18:57 ` Simon Marchi
2017-04-06 12:38 ` Tommi Höynälänmaa
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2017-03-17 18:57 UTC (permalink / raw)
To: Tommi Höynälänmaa, gdb
On 17-03-17 09:35 AM, Tommi Höynälänmaa wrote:
> I'm writing software using libraries liboctave, LAPACK, and BLAS.
> I added function dnrm2alt1 to blas and changed lapack to use that
> instead of dnrm2. When I try to debug a program using blas "break
> dnrm2_" works in gdb but "break dnrm2alt1_" does not. Gdb can't find
> function dnrm2alt1_. Can anybody tell what is wrong?
>
> Here are outputs of some commands:
>
> ---cut here---
> tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$
> update-alternatives --config libblas.so.3
> There are 2 choices for the alternative libblas.so.3 (providing
> /usr/lib/libblas.so.3).
>
> Selection Path Priority Status
> ------------------------------------------------------------
> 0 /usr/lib/atlas-base/atlas/libblas.so.3 35 auto mode
> 1 /usr/lib/atlas-base/atlas/libblas.so.3 35
> manual mode
> * 2 /usr/lib/libblas/libblas.so.3 10 manual
> mode
>
> Press enter to keep the current choice[*], or type selection number:
> tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$
> ---cut here---
> ---cut here---
> tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$
> update-alternatives --config liblapack.so.3
> There are 2 choices for the alternative liblapack.so.3 (providing
> /usr/lib/liblapack.so.3).
>
> Selection Path Priority Status
> ------------------------------------------------------------
> * 0 /usr/lib/lapack/liblapack.so.3 10 auto
> mode
> 1 /usr/lib/atlas-base/atlas/liblapack.so.3 5
> manual mode
> 2 /usr/lib/lapack/liblapack.so.3 10
> manual mode
>
> Press enter to keep the current choice[*], or type selection number:
> tohoyn@tohoyn-laptop:~/tyo/omat/aallokkeet/libinterp3d1$
> ---cut here---
> ---cut here---
> tohoyn@tohoyn-laptop:/usr/lib/libblas$ objdump -T libblas.so.3.0 | grep
> -i dnrm2
> 0000000000040320 g DF .text 0000000000000011 Base dnrm2sub_
> 000000000000fd50 g DF .text 000000000000002b Base cblas_dnrm2
> 0000000000040220 g DF .text 000000000000006b Base dnrm2_
> 0000000000040290 g DF .text 0000000000000084 Base dnrm2alt1_
> tohoyn@tohoyn-laptop:/usr/lib/libblas$
> ---cut here---
> ---cut here---
> tohoyn@tohoyn-laptop:/usr/lib/lapack$ objdump -T liblapack.so.3.0 | grep
> -i dnrm2
> 0000000000000000 DF *UND* 0000000000000000 dnrm2alt1_
> tohoyn@tohoyn-laptop:/usr/lib/lapack$
> ---cut here---
>
> - Tommi H.
>
Hi Tommi,
You can try to use "info shared" to see which library is effectively loaded in your
program and see if it matches your expectations. You can also type "reak dnrm2" and
<tab> to see what symbols GDB knows about.
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: A problem debugging libraries
2017-03-17 18:57 ` Simon Marchi
@ 2017-04-06 12:38 ` Tommi Höynälänmaa
0 siblings, 0 replies; 3+ messages in thread
From: Tommi Höynälänmaa @ 2017-04-06 12:38 UTC (permalink / raw)
To: gdb
17.03.2017, 20:56, Simon Marchi kirjoitti:
> Hi Tommi,
>
> You can try to use "info shared" to see which library is effectively loaded in your
> program and see if it matches your expectations. You can also type "reak dnrm2" and
> <tab> to see what symbols GDB knows about.
>
> Simon
>
Thanks for your help. The reason for the bug was a static library
containing an erroneous reimplementation of function dnrm2.
- Tommi H.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-06 12:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17 13:35 A problem debugging libraries Tommi Höynälänmaa
2017-03-17 18:57 ` Simon Marchi
2017-04-06 12:38 ` Tommi Höynälänmaa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox