Author Topic: Cannot debug large arrays  (Read 261 times)

Offline salexandru

  • Single posting newcomer
  • *
  • Posts: 3
Cannot debug large arrays
« on: December 01, 2017, 01:41:30 pm »
Hi! I have a problem that bugged over the few monthss and I decided to share because this bug is not listed anywhere. When I try to enter large arrays in the watches I get in the value field "value requires 400012 bytes, which is more than max-value-size". What should I do, because this never occured to me until some time ago and I have a fresh installation of Ubuntu 16.04 LTS. As I said a little earlier, this bug is not documented anywhere. Please help me, this problem is frustrating.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 5991
    • My Best Post
Re: Cannot debug large arrays
« Reply #1 on: December 01, 2017, 06:18:50 pm »
Please read the rules http://forums.codeblocks.org/index.php/topic,9996.0.html

Then, try to post an clear Code::Blocks question. I decided your question is a clear C::B Question; but, it is not one I understand.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10403
Re: Cannot debug large arrays
« Reply #2 on: December 01, 2017, 08:38:29 pm »
I decided your question is a clear C::B Question; but, it is not one I understand.
Yes, it is valid question and the answer is below.

To enable unlimited arrays do Debug -> Information -> Print elements -> Unlimited. This is only available while the debugger is running.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline salexandru

  • Single posting newcomer
  • *
  • Posts: 3
Re: Cannot debug large arrays
« Reply #3 on: December 02, 2017, 08:05:30 pm »
Thanks for your help, but I cannot see the option. I tried with and without debugger active. Please tell me what I'm doing wrong. In the meanwhile, in the attachments there are some pictures of my debugger settings.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10403
Re: Cannot debug large arrays
« Reply #4 on: December 02, 2017, 09:03:59 pm »
Steps to enable the option:
1. Start debugger
2. Stop on a breakpoint
3. Debug -> Information -> Print elements -> Unlimited
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline salexandru

  • Single posting newcomer
  • *
  • Posts: 3
Re: Cannot debug large arrays
« Reply #5 on: December 03, 2017, 12:55:19 pm »
Thank you for your help but it still doesn't work. The option was already on "Unlimited". Please see the photo in the attachments.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10403
Re: Cannot debug large arrays
« Reply #6 on: December 03, 2017, 09:18:03 pm »
Then it is some gdb thing and some setting.
This command fixes it for me.
Code: [Select]
set max-value-size unlimited

But, are you really sure you want to see in the ui so many elements better approach is to just view parts of the array. See the options in right click->properties menu for the watch.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]