delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/08/24/11:59:10

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,MIME_CHARSET_FARAWAY,RCVD_IN_DNSWL_LOW,TW_RG
X-Spam-Check-By: sourceware.org
From: Evgeny Tarasov <teval AT yandex DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: GDB behaves differently on the final cygwin1.dll 1.7.16 and on a previous one.
MIME-Version: 1.0
Message-Id: <857801345823905@web9d.yandex.ru>
Date: Fri, 24 Aug 2012 19:58:25 +0400
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Note-from-DJ: This may be spam

> š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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019