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]

64-bit gdb: invalid decimal " 0x22DBF0"


Hi all,

The latest 64-bit gdb/cygwin combo chokes whenever a process it has attached to is backgrounded (and also if it blocks on I/O, I think). To repro with the attached STC:

1. gcc -g bug.c && ./a
<prints its PID>
2. gdb -p <PID>
3. Continue gdb
4. ^Z the STC
5. STC freezes, gdb gets confused.

An example gdb session is below. Note that, in spite of gdb thinking the threads are all running, the victim is actually frozen; once this happens, the only option is to detach from the process.
(gdb) attach 2468
Attaching to program `/home/Ryan/experiments/a.exe', process 3536
[New Thread 3536.0x1134]
[New Thread 3536.0x1284]
[New Thread 3536.0x13e4]
Reading symbols from /home/Ryan/experiments/a.exe...done.
(gdb) c
Continuing.
invalid decimal " 0x22DBF0"
(gdb) c
Continuing.
Cannot execute this command without a live selected thread.
(gdb) i th
  Id   Target Id         Frame
  2    Thread 3536.0x1284 (running)
  1    Thread 3536.0x1134 (running)

The current thread <Thread ID 3> has terminated.  See `help thread'.
(gdb) t 1
[Switching to thread 1 (Thread 3536.0x1134)](running)
(gdb) c
Continuing.
Cannot execute this command while the selected thread is running.
(gdb) detach
Detaching from program: /home/Ryan/experiments/a.exe, Pid 3536
(gdb)

I first discovered this trying to debug emacs, where I/O and perhaps other events sometimes also cause the same "invalid decimal" to pop up and freeze the program. I'm not sure how to repro those other cases, tho.

Thoughts?
Ryan

Attachment: bug.c
Description: Text document

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