Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: O-san on December 04, 2010, 03:58:59 pm

Title: Watching large buffers
Post by: O-san on December 04, 2010, 03:58:59 pm
I am having difficulties on how to watch a large buffer of characters. Until now I have used the watch window and also tried the Examine memory window. The watch window can only display 200 entries then it stops. The examine memory window can only display 256 bytes which is also too small. Is there a way to watch large amounts of text from a variable that I have missed?
Title: Re: Watching large buffers
Post by: oBFusCATed on December 04, 2010, 04:02:08 pm
Can you try the debuggers branch nightly?
Also if the debuggers branch nightly has the same problems, can you provide a test project, so we can reproduce them?
Title: Re: Watching large buffers
Post by: O-san on December 04, 2010, 04:19:02 pm
Thanks for the reply. I will try it but I am unable to do so right now. I am currently running a nightly build svn 5911. Is it really necessary to provide a test project for this problem? I mean.. I am having the same issue in all my projects. How would I go about watching a buffer such as this one:
Code
  char *buffer=0;
  buffer = new char[10000];
  for(int i=0;i<2000;i+=2){
    buffer[i]='a';
    buffer[i+1]='\n';
  }

Title: Re: Watching large buffers
Post by: oBFusCATed on December 04, 2010, 04:42:31 pm
Your example works correctly with my version of debuggers branch CB...
Title: Re: Watching large buffers
Post by: O-san on December 04, 2010, 07:41:36 pm
What method did you use to view the buffer?
Title: Re: Watching large buffers
Post by: oBFusCATed on December 04, 2010, 07:58:16 pm
I've dropped it in the watches window with drag'n'drop I think :)
Title: Re: Watching large buffers
Post by: O-san on December 04, 2010, 11:24:40 pm
heh okay and you got it to display how, as an array 0-199? or 0-2000/10000?
Title: Re: Watching large buffers
Post by: oBFusCATed on December 05, 2010, 12:08:50 am
It was displayed as simple string  'buffer | "adsadsd......asdsd"'