Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
larryvc
PostPosted: Jul 08, 2012 - 09:05 PM
Raving lunatic


Joined: Dec 06, 2007
Posts: 2512
Location: Redmond, WA USA

JohanEkdahl wrote:
If you have a small test project/solution, can you attach a ZIP of it here? I have attached mine below..

No need. I did get the same result as you with the code you provided. You are using "b" as a variable and it seems to be (pun intended) confusing the format specifier software. Try with a variable name that is not one of the format specifiers and you will see it works. Is this considered a BUG or a Feature?

_________________
Larry

Those afraid to embrace the future will quickly fade into the past. - larryvc
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Jul 08, 2012 - 09:13 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18547
Location: Lund, Sweden

Quote:

Is this considered a BUG or a Feature?

I don't have a Visual Studio (C/C++) installation handy ATM, so I can not check if the same problem occurs there. When I get to one I will check, and if this is specific for Atmel Studio then I will consider it an Atmel Studio bug or deficiency and report it in the tracker.

OT: On the fun side - I got tired of the spell checker marking "Atmel" so I decided to add it to the dictionary. On my way there I observed that the FF spell checker suggest changing "Atmel" to "Oatmeal". Very Happy
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
larryvc
PostPosted: Jul 08, 2012 - 09:27 PM
Raving lunatic


Joined: Dec 06, 2007
Posts: 2512
Location: Redmond, WA USA

JohanEkdahl wrote:
OT: On the fun side - I got tired of the spell checker marking "Atmel" so I decided to add it to the dictionary. On my way there I observed that the FF spell checker suggest changing "Atmel" to "Oatmeal". Very Happy

Smile My doctor has recommended that for breakfast every day, with a sprinkle of ground flax seed. Oatmeal of course, not Atmel. Wink

_________________
Larry

Those afraid to embrace the future will quickly fade into the past. - larryvc
 
 View user's profile Send private message  
Reply with quote Back to top
ka7ehk
PostPosted: Jul 08, 2012 - 09:33 PM
10k+ Postman


Joined: Nov 22, 2002
Posts: 12045
Location: Tangent, OR, USA

Can't figure out how to add the format specifier to the name. I click, I right-click and command-click. All over the %^^&%(&* Locals window (including the variable name). I can edit value but nowhere to add the specifier.

Enlightenment is desired.

Ugggh, OK, I can add a watch, with the variable name and format specifier. Ugly but works.

Jim

_________________
Jim Wagner
Oregon Research Electronics, Consulting Div.
Tangent, OR, USA

"The only thing standing between us and victory is defeat" P.G.Wodhouse in Wooster & Jeeves series
 
 View user's profile Send private message  
Reply with quote Back to top
larryvc
PostPosted: Jul 08, 2012 - 09:40 PM
Raving lunatic


Joined: Dec 06, 2007
Posts: 2512
Location: Redmond, WA USA

Use the watch window and enter the variable you want to watch, a comma, and the format specifier. The locals window is handled automatically by the debugger and cannot be changed as far as I know.

_________________
Larry

Those afraid to embrace the future will quickly fade into the past. - larryvc
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Jul 08, 2012 - 09:50 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18547
Location: Lund, Sweden

Yes - that is what I said initially. It works in the watch window. Not in the locals window, the content of which is auto-generated and not possible to edit in detail by the user.

Ugly? Not IMO. For quick debugging I can rely on e.g. the Locals window, but for any prolonged debugging work I like to set up my own watch's so that I have and see exactly what I need.

Please note that you can add a watch quickly by right-clicking the variable name anywhere in the editor and select "Add watch".

(What really sucks is that you can not re-order what you have in a watch window. That's Microsoft...).
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
meolsen
PostPosted: Jul 09, 2012 - 07:40 AM
Resident


Joined: Jul 27, 2011
Posts: 541
Location: Atmel, Norway

I've added another bug on the errors in the format specifiers

_________________
:: Morten
 
 View user's profile Send private message  
Reply with quote Back to top
larryvc
PostPosted: Jul 09, 2012 - 04:59 PM
Raving lunatic


Joined: Dec 06, 2007
Posts: 2512
Location: Redmond, WA USA

meolsen wrote:
I've added another bug on the errors in the format specifiers

Thank you. Smile

Is there an external tracking number for that?

_________________
Larry

Those afraid to embrace the future will quickly fade into the past. - larryvc
 
 View user's profile Send private message  
Reply with quote Back to top
meolsen
PostPosted: Jul 09, 2012 - 05:21 PM
Resident


Joined: Jul 27, 2011
Posts: 541
Location: Atmel, Norway

larryvc wrote:
meolsen wrote:
I've added another bug on the errors in the format specifiers

Thank you. Smile

Is there an external tracking number for that?


No, but I can carve out the internal one if someone wants it. I've commented that it may be wise to give a hint in this thread with the resolution, but this at best a "should" (not all devs have the balls to talk to you freaks Smile )

EDIT: If you want to make a bug in the external system, then to that by all means, and just PM me with the link and I'll link it up with our internal one

_________________
:: Morten
 
 View user's profile Send private message  
Reply with quote Back to top
larryvc
PostPosted: Jul 09, 2012 - 06:05 PM
Raving lunatic


Joined: Dec 06, 2007
Posts: 2512
Location: Redmond, WA USA

I would, but I am not sure what specific bugs you covered in your internal report. Can you PM me with that.

Quote:
not all devs have the...

Call them chicken, it got Marty McFly all fired up. Laughing

_________________
Larry

Those afraid to embrace the future will quickly fade into the past. - larryvc
 
 View user's profile Send private message  
Reply with quote Back to top
meolsen
PostPosted: Jul 09, 2012 - 06:33 PM
Resident


Joined: Jul 27, 2011
Posts: 541
Location: Atmel, Norway

Quote:

I would, but I am not sure what specific bugs you covered in your internal report. Can you PM me with that.



Done


Quote:

Quote:
not all devs have the...

Call them chicken, it got Marty McFly all fired up.

Very Happy

_________________
:: Morten
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Jul 09, 2012 - 07:22 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18547
Location: Lund, Sweden

Quote:

Quote:

I would, but I am not sure what specific bugs you covered in your internal report. Can you PM me with that.



Done

I'll take the error report off my to-do list then?
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
larryvc
PostPosted: Jul 09, 2012 - 07:39 PM
Raving lunatic


Joined: Dec 06, 2007
Posts: 2512
Location: Redmond, WA USA

Yes Johan, I am following up on that now. I will post the trace numbers as soon as I finish.

_________________
Larry

Those afraid to embrace the future will quickly fade into the past. - larryvc
 
 View user's profile Send private message  
Reply with quote Back to top
larryvc
PostPosted: Jul 09, 2012 - 08:10 PM
Raving lunatic


Joined: Dec 06, 2007
Posts: 2512
Location: Redmond, WA USA

Bugs 2562 and 2563 are now reported. Morten if you want to add tags to match your inside reports please do.

_________________
Larry

Those afraid to embrace the future will quickly fade into the past. - larryvc
 
 View user's profile Send private message  
Reply with quote Back to top
ka7ehk
PostPosted: Jul 09, 2012 - 09:11 PM
10k+ Postman


Joined: Nov 22, 2002
Posts: 12045
Location: Tangent, OR, USA

As a matter of sane user interface, I would like to suggest that a click (right click or command click) in the heading of the value column produce a contextual menu that applies to the whole column. But, a click in any individual value produce a menu that includes a value change and format selection for that particular value.

Jim

_________________
Jim Wagner
Oregon Research Electronics, Consulting Div.
Tangent, OR, USA

"The only thing standing between us and victory is defeat" P.G.Wodhouse in Wooster & Jeeves series
 
 View user's profile Send private message  
Reply with quote Back to top
lagger
PostPosted: Jul 10, 2012 - 10:47 AM
Hangaround


Joined: Sep 04, 2005
Posts: 193


Johan, have you tried using h instead of x to specify hexadecimal?
 
 View user's profile Send private message  
Reply with quote Back to top
JohanEkdahl
PostPosted: Jul 10, 2012 - 12:01 PM
10k+ Postman


Joined: Mar 27, 2002
Posts: 18547
Location: Lund, Sweden

Quote:

Johan, have you tried using h instead of x to specify hexadecimal?

No, because looking at Microsofts documentation that does not make sense. There it says that 'h' is a
Quote:
long or short prefix for: d, i, u, o, x, X

(my emphasis)
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
larryvc
PostPosted: Jul 10, 2012 - 05:02 PM
Raving lunatic


Joined: Dec 06, 2007
Posts: 2512
Location: Redmond, WA USA

JohanEkdahl wrote:
Quote:

Johan, have you tried using h instead of x to specify hexadecimal?

No, because looking at Microsofts documentation that does not make sense. There it says that 'h' is a
Quote:
long or short prefix for: d, i, u, o, x, X

(my emphasis)

Yes, but, then there is this: Wink

http://msdn.microsoft.com/en-us/library/e514eeby

It seems to be left up to who writes the visualizer.

_________________
Larry

Those afraid to embrace the future will quickly fade into the past. - larryvc
 
 View user's profile Send private message  
Reply with quote Back to top
danv
PostPosted: Jul 11, 2012 - 09:24 AM
Hangaround


Joined: Mar 01, 2011
Posts: 156
Location: Atmel, Norway

Here's an excerpt from the "official" Atmel help available on the help menu. Look it up in the help to get the nice formatting Smile

Help Viewer Home
* Atmel Studio User Guide
* * Debugging
* * * QuickWatch,Watch, Locals...
* * * * Expression formatting


Last edited by danv on Jul 11, 2012 - 09:46 AM; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
danv
PostPosted: Jul 11, 2012 - 09:38 AM
Hangaround


Joined: Mar 01, 2011
Posts: 156
Location: Atmel, Norway

I gave it a quick try in AS6 and this is what I get on a UC3 simulator project:
Code:
int main(void)
{
  volatile int a=0;
  volatile unsigned char b=0;
  while(1)
  {
    a++;
    b++;
  }
}


Here's my watch view:
Code:
      a   3   int{registers}@R08
      a,x   0x00000003   int{registers}@R08
      b   2   unsigned char@0x3ffb ([R13]+3)
      b,x   0x02   unsigned char@0x3ffb ([R13]+3)
      b,b   2   unsigned long
      b,b1   0b00000010   unsigned char@0x3ffb ([R13]+3)
      a,b   2   unsigned long
      a,b1   0b00000011   int{registers}@R08
      a,o   000000000003   int{registers}@R08


So the modifiers seem to work with the exception of "comma b", where I had to force a size (b1) to get it to work. Will check why now...

Dan
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits