This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gdb seg violation during print command


> Try adding a line or three to main that do nothing.

Like this?

#include <iostream>

int tteesstt11 (int)
{
  cerr << "\n";
  return 4;
}

int main ()
{
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
  cout << "1\n";
}


I set my break on the first cout in main. When I print tteesstt11(1) I still
get the debugger seg violation.

-- DavidC

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]