From: Eli Zaretskii <eliz@gnu.org>
To: Evgeniy Dushistov <dushistov@mail.ru>
Cc: 18961@debbugs.gnu.org
Subject: bug#18961: gud Cannot find bounds of current function, but gdb works
Date: Thu, 06 Nov 2014 18:12:43 +0200 [thread overview]
Message-ID: <83lhnotiis.fsf@gnu.org> (raw)
In-Reply-To: <20141105202656.GA2831@fifteen>
> Date: Wed, 5 Nov 2014 23:26:56 +0300
> From: Evgeniy Dushistov <dushistov@mail.ru>
>
> I try debug such simple C++ code(
> from here: http://www.boost.org/doc/libs/1_55_0/libs/tokenizer/introduc.htm):
>
> #include<iostream>
> #include<boost/tokenizer.hpp>
> #include<string>
>
> int main(){
> using namespace std;
> using namespace boost;
> string s = "This is, a test";
> tokenizer<> tok(s);
> for(tokenizer<>::iterator beg=tok.begin(); beg!=tok.end();++beg){
> cout << *beg << "\n";
> }
> }
>
> compiled with "g++ -Wall -ggdb test.cpp".
You should use "-ggdb -g3" for better results. (Actually, -ggdb
should be redundant with modern GCC versions. But -g3 is still highly
recommended.)
> using "Next Line" I reach
> for(tokenizer<>::iterator beg=tok.begin(); beg!=tok.end();++beg)
> and the I use "Step Line"
> class iterator_facade in /usr/include/boost/iterator/iterator_facade.hpp,
> after that "Step Line" stop working,
> and gud says "Cannot find bounds of current function",
This message comes from GDB, not from Emacs.
Anyway, I cannot reproduce this problem, stepping by clicking the Step
Line button works for me with that example Boost program.
I used GDB 7.8, so I suggest that you upgrade your GDB and try again.
Debugging of C++ programs gets significant improvements with each GDB
release, so using the latest one (GDB 7.8.1 was released a few days
ago) is recommended.
I also used the latest Boost, but I doubt that this could be the
reason.
> But if I run the same binary in gdb without emacs mediation,
> and use step on the same line, all works fine, I can step until
> the end of program, also simple script like this reach the end of main
> without any problems in plain gdb:
Please note that Emacs generally uses somewhat different commands, not
the ones you'd use from CLI, and also sends a lot of commands to GDB
to receive the state of the debuggee, so comparison with CLI sessions
are not always the way to blame Emacs.
next prev parent reply other threads:[~2014-11-06 16:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 20:26 bug#18961: gud Cannot find bounds of current function, but gdb works Evgeniy Dushistov
2014-11-05 20:43 ` bug#18961: gud Cannot find bounds of current function, but gdb works: version info Evgeniy Dushistov
2014-11-06 16:12 ` Eli Zaretskii [this message]
2014-11-06 20:45 ` bug#18961: gud Cannot find bounds of current function, but gdb works Evgeniy Dushistov
2014-11-06 20:45 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83lhnotiis.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=18961@debbugs.gnu.org \
--cc=dushistov@mail.ru \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).