This is the mail archive of the mailing list for the GDB 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]

cygwin breakpoints fail under Cygwin

Not sure if this should be on the cygwin list, or the gdb list. I'll try here first because it is gdb specific.

Short description: GDB breakpoints are failing with Cygwin.

1) Fresh install of cygwin (I blew away my old install from 2005) - and reinstalled everything about 2 hours ago.

2) I run GDB against an application, then RUN.

3) Control-C to get the GDB prompt.

App I am debugging is a cygwin build of "openocd"
FYI openocd is the embedded jtag debug tool used with GDB.
4) I set a breakpoint at a function, in this case "target_configure"

5) I type "cont" to continue.

One of two things happen:

(A)  either the program continues ... the good thing.
   If (A) happens, I can debug, my breakpoint works.


(B) Immediately after pressing "ENTER"
   I get this message: "Program received signal SIGINT, Interrupt."

In case (B) no breakpoint I set will ever happen.

I am sort of stuck - and don't know what to try next.


Output showing the example from GDB is below

This worked before with an older version (2005) of GDB - which (as I said above, I just re-installed cygwin) I no longer have.

GDB version: GNU gdb (cygwin-special)

Host system: MS Windows - WinXP Home.

I start "GDB"

duane@desk ~/cortex/olimex
$ gdb ./openocd.exe
GNU gdb (cygwin-special)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
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-pc-cygwin"...
(gdb) run

I type "RUN' to run my program with no params.

Starting program: /home/duane/cortex/olimex/openocd.exe
[New thread 3400.0xda4]
[New thread 3400.0xdec]
Open On-Chip Debugger 1.0 (2008-08-29-22:00) svn:exported
$URL: $
jtag_speed: 2
Info: JTAG device found: 0x3f0f0f0f (Manufacturer: 0x787, Part: 0xf0f0, Version: 0x3)
Warning:no tcl port specified, using default port 6666
[New thread 3400.0xb0c]
Warning:DBGACK set while target was in unknown state. Reset or initialize target.
target state: halted
target halted in ARM state due to breakpoint, current mode: Supervisor
cpsr: 0x00000053 pc: 0x00000038
[New thread 3400.0xdc4]
[Switching to thread 3400.0xdc4]

At this point, I hit Control-C to get the GDB prompt.
(gdb) break target_configure
Breakpoint 1 at 0x40c060: file ../../../openocd23/src/target/target.c, line 2991.

Above I set my breakpoint, and type "cont" to continue my program.

(gdb) cont

Immediately- this "SIGINT" happens and breakpoints do not work.
Or - SIGINT does not happen, and everything works just fine.

Program received signal SIGINT, Interrupt.
0x7c87534d in KERNEL32!GetConsoleCharType () from /cygdrive/c/WINDOWS/system32/kernel32.dll
(gdb) cont
Warning:BUG: keep_alive() was not invoked in the 1000ms timelimit. GDB alive packet not sent! (28359)
[New thread 3400.0xe48]
[Switching to thread 3400.0xe48]
0x7c810659 in KERNEL32!CreateThread () from /cygdrive/c/WINDOWS/system32/kernel32.dll

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