I'm probably missing something in one of the menus here, but CW7.2 would show you strings in the debug window as readable text strings, but CW10.2 will only let you display a vertical array of chars (by default shown by hex value). What have I missed?
Hello,
its this about normal C strings (character pointers)?
Have a look at Eclipse Debugging with Strings for ways how to view strings in Eclipse/CodeWarrior MCU10.
Hope this helps,
BK
That's a good article, but my copy of CodeWarrior (10.2 / Build Id:120126) doesn't seem to have that ability, here is what I see when I click on the variable name:
can you share the declaration of your str variable?
BK
String variable is defined as:
char str[50];
hmm, I tried it now with ColdFire, and see your problem now:
If I have
char buf[] = "abcd";char *p = &buf[0];unsigned char ubuf[]="ABCD";unsigned char *up = &ubuf[0];signed char sbuf[]="1234";signed char *sp = &sbuf[0];
then only 'p' and 'up' shows the string. Interesting. I'll need to dig into this.
BK
Thanks - glad it's not just me doing something wrong (which most things are!)
Yeah, happens to me all the time too :smileyhappy:.
What I have found out is that it works for 'unsigned char*', but not for signed char pointers. And not for arrays (independent if they are signed or not). I think this is an Eclipse problem, and I have filed a ticket on this subject.
There is good and bad news: I used Eclipse 3.7, and there you can at least cast in the Variable view the signed char* to an unsigned one: and it will show the string :smileyhappy:. The bad news: this does not work in Eclipse 3.6 for me (which is used in CodeWarrior for MCU10.2).
I guess I have to write a follow-up article then, and pushing for showing unsigned chars as strings, plus getting the casting working in Eclipse properly too :smileyhappy:.
Thanks for reporting that problem: that way things get fixed and improved....
BK
Great, thanks for following this up - I guess that means I've found two real bugs in CW10 now as well as in the silicon, I kinda feel like I should win a badge or something
Is there a way for us to track the status of the Eclipse bug?
So, any way to find out if this is picked up / progressed / fixed / ignored / buried in soft peat?