This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug gdb/19998] New: interrupt test failing due to SIGINT failing to interrupt


https://sourceware.org/bugzilla/show_bug.cgi?id=19998

            Bug ID: 19998
           Summary: interrupt test failing due to SIGINT failing to
                    interrupt
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: andre.simoesdiasvieira at arm dot com
  Target Milestone: ---

Hello,

I am running gdb regression tests for an ARM Cortex-M3 using qemu and recently
I found the interrupt.exp tests to be failing.

gdb.log:
(gdb) spawn qemu-system-arm -cpu cortex-m3 -nographic -monitor null -serial
null -semihosting -S -gdb tcp::2451 -kernel interrupt
target remote localhost:2451
Remote debugging using localhost:2451
0x000080e4 in _start ()
(gdb) jump *_start
Continuing at 0x80e4.

Breakpoint 1, main () at src/gdb/gdb/testsuite/gdb.base/interrupt.c:23
23        gdb_unbuffer_output ();
(gdb) continue
Continuing.
talk to me baby
PASS: gdb.base/interrupt.exp: process is alive
a
a
PASS: gdb.base/interrupt.exp: child process ate our char
^CFAIL: gdb.base/interrupt.exp: send_gdb control C (timeout)
p func1 ()

Program received signal SIGINT, Interrupt.
0x0000a88a in _read ()

As you can see the send_gdb control C fails by timeout, even though '^C' was
passed.

I can sort of reproduce this manually by:
$arm-none-eabi-gcc -c   -g  -mthumb -mcpu=cortex-m3 -o interrupt0.o
../src/binutils/gdb/testsuite/gdb.base/interrupt.c

$arm-none-eabi-gcc  interrupt0.o   -g  -lm -specs=rdimon.specs -lc -lg -lrdimon
 -mthumb -mcpu=cortex-m3 -o interrupt

$qemu-system-arm  -machine versatilepb -cpu cortex-m3 -nographic -monitor null
-serial null -semihosting -S -gdb tcp::2707 -kernel interrupt

Then on a parallel shell:

$ arm-none-eabi-gdb -nw -nx -data-directory ./
(gdb) file interrupt
(gdb) break main
(gdb) shell stty intr '^C'
(gdb) target remote localhost:2707
Remote debugging using :2707
0x000080e4 in _start ()
(gdb) jump *_start
Continuing at 0x80e4.

Breakpoint 1, main () at ../src/binutils/gdb/testsuite/gdb.base/interrupt.c:23
23 gdb_unbuffer_output ();
(gdb) continue
Continuing.
talk to me baby

If I now hit CTRL+C, it will display '^C' but it will not interrupt the
execution. However, if I hit ENTER after, it does interrupt.

Might be noteworthy to mention that previous versions would interrupt with
CTRL+C alone and display '^CQuit'.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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