C::B 15.12 rev 10596
SDK version 1.29.0
wx2.8.12 (Windows, Unicode) - 32 bit
Windows 10 Pro 64 bit
I define a locale vector in a function:
char buffer_data[SIZE_BUFFER];
where SIZE_BUFFER is 16384
If I try to watch size_buffer C::B freezes and I can't do anything but force it to close with task manager.
I suggest you give us a minimal test code, and the steps you did when debugging, so that other people can try the steps in their computers.
I can provide all the project.
It's a small project to concatenate two intel-hex files.
It's just a main.c, a main.h and two files for the intel-hex functions.
Is there some place I can upload the whole project zipped?
Just upload the test file as attachments.
Let me know if it works.
OK, I can build your project, but this project is quite complex, and I suggest you give us a minimal code. Also, you should tell us what is the steps you do when you debugging? When you add the watch? Thanks.
I'm sorry, I forgot to point out where the problem happens.
If you look at the end of main.c file you can see the function append_file_boot.
In it is defined the vector char buffer_data[SIZE_BUFFER]
Put a breakpoint in the first line of that function and run the debugger, of course in debug mode, it should run straight to the breakpoint with the program argument I set up in the cbp project.
Then try to watch the vector buffer_data you should get the freeze I'm getting.
It's happening even with the locals disabled.
I can see the watch window with the vector in it, but as soon as I try to move the watch window C::B freezes.
Let me know if you need more directions.
I can debug the app, but I can't reach the breakpoint.
For your issue, this is because you try to see some un-initialized local variable. I think you can add a command like: (200 is the max number to print)
See here: http://stackoverflow.com/a/233339/154911
This way, GDB should work quite well.
In the project->set programs' argument setting put this for Debug target:
-a TestApp.hex -b TestBoot.hex -s 0x7000 -o Test-App+Boot.hex
Then compile and run, it should breaks on the first line of append_file_boot function.
Still can't hit the breakpoint.
Did you take my suggest way already? That should fix your issue.
No, I don't. Because it would be useless to me: I need to see what happens at the end of the buffer, so I don't care to watch the first 200 bytes of it.
About debugging: sorry, I changed the project to upload here and I wrote the wrong program argument, it should be:
-a Test\Test-App.hex -b Test\Test-Boot.hex -s 0x7000 -o Test\Test-App+Boot.hex
and works with the attached files put in the Test directory.
You can use the GDB's x command to view all the contents, such as:
Which means you want to see 30 bytes from the address "buffer_data+16000".
OK, I can see the content of the buffer, not from the watch window, but from the debugger debug log penel, here is the log:
You see, all the contents is shown. But they are just random values.
You see random values, because this is treated as char string. If you go to the watch properties (right click -> properties) and then you can tell c::b to interpret it as array. You can give it the start position and the size.
Also the x command is the same as the examine memory window.
Also you can enter buffer_data+16000 in the watches. It supports evaluating expressions.