This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: FYI: DLL breakpoint bug [was: Re: DLLs and Insight...]
- To: Ian Roxborough <irox at redhat dot com>
- Subject: Re: FYI: DLL breakpoint bug [was: Re: DLLs and Insight...]
- From: Keith Seitz <keiths at cygnus dot com>
- Date: Wed, 24 Oct 2001 13:33:35 -0700 (PDT)
- cc: <insight at sources dot redhat dot com>
On Tue, 23 Oct 2001, Ian Roxborough wrote:
> > This is odd. I would not expect entering the breakpoint at the console
> > prompt to change the breakpoint. Does "info break" show the right
> > location? What does "tk gdb_get_breakpoint_info BKPT#" show?
>
> Both show the same as the breakpoint window (i.e. the breakpoints set
> in the wrong places).
I dunno. I can certainly reproduce this with the command line:
$ gdb.exe -q -nw -nx gdb.exe
(gdb) b main
Breakpoint 1 at 0x402116: file ../../src/gdb/main.c, line 698.
(gdb) r
Starting program:
/home/keiths/sources/built-net/H-i686-pc-cygwin/bint/gdb.exe
Breakpoint 1 main (argc=1, argv=0x10291348) at ../../src/gdb/main.c:698
698 {
(gdb) b tkWinWm.c:4023
Breakpoint 2 at 0x10021282: file ../../../src/tkwin/tkWinWm.c, line 4023.
(gdb) inf br
Num Type Disp Enb Address What
1 breakpoint keep y 0x00402116 in main at ../../src/gdb/main.c:698
2 breakpoint keep y 0x10021282 in DictionaryCompare
at ../../../src/tk/win/tkWinWm.c:4023
(gdb) p DictionaryCompare
$2 = {int (char *, char*)} 0x5f8e88 (DictionaryCompare)
(gdb) p WmProc
$1 = {LRESULT (HWND, UINT, WPARAM, LPARAM)} 0x10021560 (WmProc@16)
(gdb) disass WmProc
[stuff from 0x10021560 - 0x100218dd]
So it would appear that the breakpoint was set at the right place, but gdb
reports the wrong function for it.
I think the reason this happens is because dlls symbols don't appear to be
relocated. "info shared" shows that cygtcl83.dll is loaded at 10001000,
while cygtk83.dll is at 00b7100. This cannot be correct, since WmProc is
in cygtk83.dll!
Maybe this has something to do with the WmProcs type? "static LRESULT
CALLBACK" -- I don't exactly know what they would do to the
compiler/linker.
I dunno. I'm outta ideas right now...
Keith