delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/09/17:36:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3C3CC5F4.215C7049@scotiacapital.com>
Date: Wed, 09 Jan 2002 17:36:36 -0500
From: Jeanine Kwong <jeanine_kwong AT scotiacapital DOT com>
X-Mailer: Mozilla 4.72 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Debugging Excel-callable dll in WinNT using GDB

Hi all,

I would like to debug an Excel-callable dll in Windows NT machine using
gdb version 4.17.1.  Because the dll contains a c++ function that
creates a thread, I put in a DebugBreak() call in the c++ codes before
and inside whhere the program creates a thread.  The program is compiled
with g++.

What the c++ function does is takes in the parameters from the excel
formula, do some calculations, then output the result to the cell.   

I tried the following:
(gdb) file c:\\progra~1\\micros~1\\office\\excel.exe    'path to
excel.exe
(gdb) run       'Excel started

At this point, gdb command window beaome inactive.
I put the formula in a cell in the Excel worksheet with the appropriate
parameters and pressed enter.
The dll kicks in and hit the line where "DebugBreak()" is.  gdb regains
its control.

(gdb) l      'show 10 lines after where debugBreak() is, before creating
a thread
(gdb) cont   'continue to the DebugBreak() after inside the procedure
when the thread is created.

(gdb) 1      '***PROBLEM STARTS****!!!
It showed 10 lines, but they are not the lines that I expected to see! 
I suspect that it gdb is still in the "old" thread.

(gdb) info threads         'attempt to find out the thread IDs
info threads               'not helpful at all!!

Questions:
Is there any way that I can find out the thread ID?  Is there any switch
that I have to have to put when I compile the program so that gdb
becomes thread-aware?  Any suggestion?  

I am thinking of getting a newer version of gdb, but I could not find a
pre-compiled version of it (ie. a .exe file).  If you do, please let me
know.

Any help is highly appreciated.

Thanks,
Jeanine Kwong
Analyst
Scotia Capital

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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