Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Ctrl-C interrupt problem.
@ 2000-11-10 16:13 Fabrice Gautier
  0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Gautier @ 2000-11-10 16:13 UTC (permalink / raw)
  To: GDB (E-mail)

Hi,

I'm using gdb (insight)  to debug an eCos program running above RedBoot. I
have a problem when running some test program to make the ctrl-C works
correctly. The target is a remote i386 PC.

My program only do some printf (which are sent to gdb as O packets) in a
loop wiht some delay betwen the printfs. 

What happenif that I can interrupt with Ctrl-C a first time, then if I
continue Ctrl-C doesn't work again immediately, i have to wait for another
printf (and so a O packet) in order to be abble to use ctrl-C again.

This happen only when using Ethernet not when debugging through serial port.

I first thought it was a problem  with the gdb stub in RedBoot/eCos. But
when I "set remote debug 1" i can see that the first time i hit ctrl-C i
have:

remote_interrupt called
remote_stop called

but the second time (when it doesn't works) i have nothing. So it looked
like the SIGINT didn't reach the correct gdb function somewhere. 


I have been looking a bit in the gdb code to figure out what was the path
when receving a ctrl-C, but i'm not sure which function exaclty is called.
remote_interrupt or async_remote_interrupt (which) seems to be called when
it works, but i've also seen some SIGINT handling with handle_remote_sigint
or request_quit.

So can someone teach me what happen when i hit ctrl-C in the remote TCP case
?

Thanks

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 




^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: Ctrl-C interrupt problem.
@ 2000-11-15 17:48 Fabrice Gautier
  0 siblings, 0 replies; 4+ messages in thread
From: Fabrice Gautier @ 2000-11-15 17:48 UTC (permalink / raw)
  To: gdb

Well, 

I don't know how, but half the problem is resolved by upgrading to CVS
version.

"half" means that i can't crash gdb with ctrl-C anymore with a native
target.

However the frist half (second ctrl-C is not caught by a remote i386-elf
target) is still there.

Thanks

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 
From Fabrice_Gautier@sdesigns.com Wed Nov 15 20:46:00 2000
From: Fabrice Gautier <Fabrice_Gautier@sdesigns.com>
To: gdb@sources.redhat.com
Cc: "Ecos-List (E-mail)" <ecos-discuss@sourceware.cygnus.com>
Subject: RE: Ctrl-C interrupt problem.
Date: Wed, 15 Nov 2000 20:46:00 -0000
Message-id: <B1F6452C89AFD411AE0800A0CC734C23015020@EMAIL1>
X-SW-Source: 2000-11/msg00181.html
Content-length: 800

[eCos and RedBoot guys, I think this may concern you 
 its about a ctrl-C problem which only happen when debugging via ethernet.
 full story in the gdb list archives ]

I Got it! 
Well, i hope....

And it make sens why it only happens with TCP...

The problem is that when gdb send the continue packet to the target, it wait
for the target to send the '+' Ack. During this time the SIGINT handler is
not set.

My guess is that RedBoot intedn to send it BUT (tata) the ethernet driver
just wait to have a full packet before really sending! So this happen when a
O packet is sent.

So i guess the only thing needed in RedBoot is to add a "flush" somewhere.
I'm not sure at what level, but i'll look at it tomorrow if nobody does it
before.

Thanks

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 




^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <B1F6452C89AFD411AE0800A0CC734C23015020@EMAIL1>]

end of thread, other threads:[~2000-11-16  5:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-10 16:13 Ctrl-C interrupt problem Fabrice Gautier
2000-11-15 17:48 Fabrice Gautier
     [not found] <B1F6452C89AFD411AE0800A0CC734C23015020@EMAIL1>
2000-11-15 23:10 ` Fernando Nasser
     [not found] ` <200011161325.eAGDP8P09301@deneb.localdomain>
2000-11-16  5:48   ` Fernando Nasser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox