--- Begin Message ---
Subject: |
gud Cannot find bounds of current function, but gdb works |
Date: |
Wed, 5 Nov 2014 23:26:56 +0300 |
User-agent: |
Mutt/1.5.22 (2013-10-16) |
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".
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",
bt show
#0 0x00007fffffffdd40 in ?? ()
#1 0x00007ffff7ddb678 in std::string::_Rep::_S_empty_rep_storage () from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.2/libstdc++.so.6
#2 0x0000000000000000 in ?? ()
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:
br main
run
while true
step
end
--
/Evgeniy
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#18961: gud Cannot find bounds of current function, but gdb works |
Date: |
Thu, 06 Nov 2014 22:45:55 +0200 |
> Date: Thu, 6 Nov 2014 23:45:05 +0300
> From: Evgeniy Dushistov <address@hidden>
> Cc: address@hidden
>
> On Thu, Nov 06, 2014 at 06:12:43PM +0200, Eli Zaretskii wrote:
> > 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.
> >
>
> Thanks, gdb 7.8.1 solved problem for me.
OK, closing the bug.
--- End Message ---