From: Konstantin Karganov <kostik@ispras.ru>
To: gdb@sources.redhat.com
Subject: GDB is stepping past main()
Date: Wed, 13 Jul 2005 12:53:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.44.0507131621590.6056-100000@ispserv.ispras.ru> (raw)
In-Reply-To: <42D62354.5090607@sakuraindustries.com>
Hello, all.
Why doesn't gdb stop at the main() end and continues to step further?
Ok, it's not a big problem for human, but what should the frontend
debugger do with unknown functions w/o source file positions?
Test case: gcc 3.2.2 and gdb 6.3 on RH Linux, session log here:
(gdb) br main
Breakpoint 1 at 0x8048618: file tmp.cpp, line 7.
(gdb) run
Starting program: /home/kostik/Work/a.out
Breakpoint 1, main (argc=1, argv=0xbffff2f4) at tmp.cpp:7
7 cout<<" Hello world! "<<endl;
(gdb) l
2
3 using namespace std;
4
5 int main(int argc,char* argv[])
6 {
7 cout<<" Hello world! "<<endl;
8 }
9
(gdb) step
Hello world!
8 }
(gdb) step
0x42015574 in __libc_start_main () from /lib/tls/libc.so.6
(gdb) step
Single stepping until exit from function __libc_start_main,
which has no line number information.
Program exited normally.
(gdb)
What the hell "__libc_start_main" is doing here?
The same happens using "next" instead of "step" and when using a MI
interface...
Best regards,
Konstantin.
next prev parent reply other threads:[~2005-07-13 12:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-11 16:21 Thread backtrace termination Jonathan Larmour
2005-07-11 16:23 ` Daniel Jacobowitz
2005-07-11 17:52 ` Jonathan Larmour
2005-07-11 18:19 ` Daniel Jacobowitz
2005-07-12 18:32 ` Jonathan Larmour
2005-07-13 10:35 ` Steven Johnson
2005-07-13 12:53 ` Konstantin Karganov [this message]
2005-07-13 13:05 ` GDB is stepping past main() Daniel Jacobowitz
2005-07-13 13:31 ` Konstantin Karganov
2005-07-13 13:39 ` Nathan J. Williams
2005-07-13 13:47 ` Konstantin Karganov
2005-07-13 13:50 ` Dave Korn
2005-07-13 13:46 ` Daniel Jacobowitz
2005-07-13 13:57 ` Konstantin Karganov
2005-07-14 14:27 ` MI *stopped reason Konstantin Karganov
2005-07-14 14:40 ` Bob Rossi
2005-07-14 15:15 ` Incorrect breakpoint diagnostics in MI Konstantin Karganov
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=Pine.LNX.4.44.0507131621590.6056-100000@ispserv.ispras.ru \
--to=kostik@ispras.ru \
--cc=gdb@sources.redhat.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).