From: qinwei<qinwei@sunnorth.com.cn>
To: gdb@sourceware.org
Subject: Re: GDB infinite loop when stepping on "while (1) i++;"
Date: Thu, 22 Mar 2007 09:15:00 -0000 [thread overview]
Message-ID: <OF5F4E4B25.5DF63CD1-ON482572A6.00329C92-482572A6.0032D298@sunnorth.com.cn> (raw)
In-Reply-To: <1174552530.5491.4.camel@localhost>
> > When program stops at "while (1) i++;", and printing "next" command
will
> > cause gdb infinite loop.
> > The target are x86, score, or other? (gdb-6.6 release version)
> >
> > Is the reason that the following dwarf-2 info:
> >
> > "Special opcode 104: advance Address by 7 to 0x8048357 and Line by 1
to
> > 4"
> > "Advance PC by 7 to 804835e"
> >
> > which makes "while (1)" and "i++;" the same line number? And gdb will
get
> > "stop_pc" from the range [0x8048357, 0x804835e] and will not stop?
>
> Yes. The command `next' is used to move to advance execution to the next
> line of the current function.
Thanks!
next prev parent reply other threads:[~2007-03-22 9:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-22 7:44 qinwei
2007-03-22 8:33 ` Kunal Parmar
2007-03-22 9:15 ` qinwei [this message]
2007-03-22 8:58 Wenbo Yang
2007-03-22 9:04 ` GDB " Wenbo Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF5F4E4B25.5DF63CD1-ON482572A6.00329C92-482572A6.0032D298@sunnorth.com.cn \
--to=qinwei@sunnorth.com.cn \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox