From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17028 invoked by alias); 22 Mar 2007 08:58:47 -0000 Received: (qmail 17017 invoked by uid 22791); 22 Mar 2007 08:58:46 -0000 X-Spam-Check-By: sourceware.org Received: from smtp107.biz.mail.mud.yahoo.com (HELO smtp107.biz.mail.mud.yahoo.com) (68.142.200.255) by sourceware.org (qpsmtpd/0.31) with SMTP; Thu, 22 Mar 2007 08:58:43 +0000 Received: (qmail 99563 invoked from network); 22 Mar 2007 08:58:40 -0000 Received: from unknown (HELO ?192.168.1.126?) (wenbo.yang@simplnano.com@211.101.21.42 with plain) by smtp107.biz.mail.mud.yahoo.com with SMTP; 22 Mar 2007 08:58:39 -0000 X-YMail-OSG: h.0NbkoVM1kqEUhIpaOPZzpAkwhTGaOyO9okoMlYLx9W.fEAlDawHN09Xu73kpCMM5HhP8y3ukKpeArXcopiGcS5JU.zj5ZeREWzcVRfOAZr6NoMjfGX Message-ID: <46024522.7090007@simplnano.com> Date: Thu, 22 Mar 2007 08:58:00 -0000 From: Wenbo Yang User-Agent: Thunderbird 1.5.0.10 (X11/20070307) MIME-Version: 1.0 To: qinwei@sunnorth.com.cn CC: gdb@sourceware.org Subject: Re:GDB infinite loop when stepping on "while (1) i++;" Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00263.txt.bz2 > (gdb) n > 4 while (1) i++; > (gdb) n I think there is nothing wrong. You let GDB next, it next. And your line is a infinite loop, so it never stops. If "while (1) i++;" in you source code is put in a line. I think the debugging information should be a line. If not, maybe you compiler has problems. It is different with a single line function, i.e. "int a() {}". If you want to step into, why not use "step"? Wenbo -- Wenbo Yang SimpLight Nanoelectronics Ltd.