From: Emmet Ford <emmet@optonline.net>
To: linux-assembly@vger.kernel.org
Subject: Re: gdb help
Date: Mon, 23 Feb 2004 20:18:28 -0500 [thread overview]
Message-ID: <403AA664.1070501@optonline.net> (raw)
I use gas rather than nasm, but I also find that I am unable to break on
the first instruction in a program. Generally, what I do is use the gdb
'list' command to list out the program and then set a break point on the
line number of the second instruction in the program.
This issue is documented in various places, one of them being
http://www.csee.umbc.edu/~chang/cs313.f03/gdb_help.shtml, where it says:
-->
Due to a bug in gdb,
<br> break *_start<br> does not stop the program before the execution of
the first instruction. A workaround is to add a no operation instruction
(mnemonic "nop") to the beginning of your program and use: <br> break
*_start+1
<--
This may not be the problem that you are experiencing, however, since
programs normally start at _start, not main. In any case, you might try
break *main+1
--Emmet Ford
next reply other threads:[~2004-02-24 1:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-24 1:18 Emmet Ford [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-02-21 17:36 gdb help glburt
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=403AA664.1070501@optonline.net \
--to=emmet@optonline.net \
--cc=linux-assembly@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).