This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB behaves differently on the final cygwin1.dll 1.7.16 and on a previous one.


>  You need to install Debug/cygwin-debuginfo package. Then you will be
>  able to set breakpoints by line:
>  (gdb) symbol-file cygwin1.dll
>  Reading symbols from /usr/bin/cygwin1.dll...Reading symbols from
>  /usr/lib/debug/usr/bin/cygwin1.dbg...done.
>  done.
>  (gdb) b _cygtls::call2
>  Breakpoint 1 at 0x610050e0: file
>  /usr/src/debug/cygwin-1.7.16-1/winsup/cygwin/cygtls.cc, line 92.
>
>  Andrey Khalyavin

Hello. It is quite interesting... but could you provide me with step-by-step instructions of how to move further according to the output underneath?

(Single trouble is that I usually use a 3rd party GUI IDE to debug my cygwin code. And this particular IDE (one of its nightly branches), while debugging, sets gdb breakpoints on basis of "mount-like" capabilities of cygwin (i.e. in the form of /cygdrive/disk/cygwin/home/and soon...).
So, I have 2 ways: either hack the sources of the IDE to adjust working with gdb on a bare filename basis (with no paths), or ask cygwin people to help to debug with "mount-like" filenames. Mount-like breakpoints were workable two month ago.)

$ uname -a
CYGWIN_NT-6.1 evgeny 1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin

$ gdb
GNU gdb (GDB) 7.3.50.20111026-cvs (cygwin-special)
Copyright (C) 2011 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 "i686-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) pwd
Working directory /home/evgeny/mip_cb.
(gdb) file comscan.exe
Reading symbols from /home/evgeny/mip_cb/comscan.exe...done.
(gdb) break "/cygdrive/c/cygwin/home/evgeny/mip_cb/Comscan/comscan.cpp:346"
No source file named /cygdrive/c/cygwin/home/evgeny/comscan.cpp.
Make breakpoint pending on future shared library load? (y or [n]) n
(gdb) break comscan.cpp:346
Breakpoint 1 at 0x4043db: file C:/cygwin/home/evgeny/mip_cb/Comscan/comscan.cpp, line 346.
(gdb) cont
The program is not being run.
(gdb) run
Starting program: /home/evgeny/mip_cb/comscan.exe
[New Thread 424.0xdd4]
[New Thread 424.0x870]
[New Thread 424.0x784]
[New Thread 424.0xb14]
[New Thread 424.0x270]

Breakpoint 1, main (argc=1, argv=0x22ac50) at C:/cygwin/home/evgeny/mip_cb/Comscan/comscan.cpp:346
346         w.setWindowTitle("QT-4 ComScan");
(gdb) list
341     {
342         QApplication a( argc, argv );
343         ComscanWidget w;
344         //w.moveToThread(QApplication::instance()->thread());
345         w.resize(600, 500 );
346         w.setWindowTitle("QT-4 ComScan");
347         w.show();
348
349         return a.exec();
350     }

than I'd  changed cygwin1.dll (to june version) and started cygwin bash shell again

$ uname -a
CYGWIN_NT-6.1 evgeny 1.7.16(0.261/5/3) 2012-06-05 15:54 i686 Cygwin

$ gdb
GNU gdb (GDB) 7.3.50.20111026-cvs (cygwin-special)
Copyright (C) 2011 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 "i686-cygwin".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
(gdb) pwd
Working directory /home/evgeny/mip_cb.
(gdb) file comscan.exe
Reading symbols from /home/evgeny/mip_cb/comscan.exe...done.
(gdb) break "/cygdrive/c/cygwin/home/evgeny/mip_cb/Comscan/comscan.cpp:346"
Breakpoint 1 at 0x4043db: file C:/cygwin/home/evgeny/mip_cb/Comscan/comscan.cpp, line 346.
(gdb) break "comscan.cpp:346"
Note: breakpoint 1 also set at pc 0x4043db.
Breakpoint 2 at 0x4043db: file C:/cygwin/home/evgeny/mip_cb/Comscan/comscan.cpp, line 346.

p.s.
Thus, 2012-06-05 version is fine!

p.p.s
2012-07-20 version is also workable at debug, but on a different mount (if executables and its sources are not in the structure of cygwin deploy tree, but on the D disk)
-------- Завершение пересылаемого сообщения --------

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]