Hello,

I tried today to debug the opensc-tool program but it seems not to work
for me.

Steps to reproduce my problem:

First checkout the trunk of other release
svn co http://www.opensc-project.org/svn/opensc/trunk/ 

$ ./bootstrap 
$ ./configure 

My CFLAGS are including -g for debug info
$ make

After building I try to debug something. 

$ libtool --mode=execute gdb src/tools/opensc-tool

GNU gdb (GDB) 7.0-ubuntu
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /Projects/opensc/src/tools/.libs/lt-opensc-tool...done.
(gdb) r -l
Starting program: /Projects/opensc/src/tools/.libs/lt-opensc-tool -l
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
(gdb)

When adding breakpoint at gpriv->dlhandle = lt_dlopen(gpriv->provider_library);

gdb() b reader-pcsc.c:700
Breakpoint 1, pcsc_init (ctx=0x804f008, reader_data=0x804f040) at 
reader-pcsc.c:700
(gdb) p gpriv->provider_library 
$1 = 0xe1b8e3 "libpcsclite.so"
(gdb) n
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error
(gdb)


The strange behaviour is also that the program works without debugger. I tried 
it with the
sources my distribution uses (ubuntu karmic 9.10) and the same problem is 
there. In fact
the problem was always there if I checked out some earlier revisions on trunk 
too. 

What is the best way to debug this application ? 


kind regards,

Bart
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to