Author Topic: Variable not editable under debugger  (Read 9362 times)

dunkers

  • Senior Community Member
  • Posts: 763
  • Hero Points: 36
Variable not editable under debugger
« on: April 24, 2008, 04:16:55 pm »
I run an application on a remote target (Linux) via gdb and arrange for executation to halt at some point. A simple int variable is showing value '1' and I want to change it to '0', so I have the variable show in the Locals debug window (and also try Autos). I click on the variable value shown expecting to be able to edit the value, but I can't. The Locals window (and Autos) ignores my clicking. If I right click I get a context menu which allows me to change the way the variable value is displayed, but no option to edit it.

V12 was fine with this. I think v13 beta may have been OK but wouldn't swear to it.

Unfortunately, the variable I'm trying to edit is a debugging halt flag which stops the app until I attach and change it, so I'm unable to debug any this urgent project...

dunkers

  • Senior Community Member
  • Posts: 763
  • Hero Points: 36
Re: Variable not editable under debugger
« Reply #1 on: April 24, 2008, 04:25:54 pm »
OK, I right click the variable and select Show Memory. Get an error cos it's trying to display 2740 bytes or so of an int. Change to 4 and get a display:
Code: [Select]
0x7fa76d48 |00 00 00 01  -- -- -- --     |.... ....
I click on the 00 00 00 01 and get the chance to edit them, so I change it to 00 00 00 00 by only changing the last digit. Hit return and get:

Quote
Invalid characters: Expecting hexadecimal numbers only

Only way out is to hit ESC. Try again, but this time I just click and don't make any changes then hit enter. Same error message.

This is rubbish, isn't it?

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3911
  • Hero Points: 513
Re: Variable not editable under debugger
« Reply #2 on: April 28, 2008, 02:18:40 pm »
Yeah, it's broken.  We'll look into putting together a hot fix.

dunkers

  • Senior Community Member
  • Posts: 763
  • Hero Points: 36
Re: Variable not editable under debugger
« Reply #3 on: April 28, 2008, 02:36:18 pm »
Thanks, Dennis   ;)

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 3911
  • Hero Points: 513
Re: Variable not editable under debugger
« Reply #4 on: April 28, 2008, 05:06:12 pm »
The issue with the memory tool window will be fixed with the next rev of the hot fix.

Your other issue -- I suspected that it was related to some new code we put in to prevent the user from trying to modify a variable while the debuggee was running.  However, after testing things seem to work fine, and the change in question went in after 13.0.0, so that can't be the problem you were seeing anyway.  If, after applying the hot fix, you still can not modify the variable while the application is suspended, then please take note (by looking at the state of "Debug > Suspend") whether you *really* have the application suspended when you try to modify that variable.

dunkers

  • Senior Community Member
  • Posts: 763
  • Hero Points: 36
Re: Variable not editable under debugger
« Reply #5 on: May 03, 2008, 05:04:22 pm »
Just noticed this looks to be fixed. Thanks Dennis, and sorry for the delay in testing.

dunkers

  • Senior Community Member
  • Posts: 763
  • Hero Points: 36
Re: Variable not editable under debugger
« Reply #6 on: May 07, 2008, 11:38:04 pm »
Or perhaps not! When I posted my previous comment I could edit a variable. Earlier, I got the same problem as my original post - the variable was uneditable. I checked that the debugger was in the suspend state (Debug menu, suspend greyed and Run clickable).

I'll try and figure out what was different between the two session (different apps, but from the same project and debugged in the same way).

dunkers

  • Senior Community Member
  • Posts: 763
  • Hero Points: 36
Re: Variable not editable under debugger
« Reply #7 on: May 07, 2008, 11:49:38 pm »
Found it: the first debugging session after SE is started won't allow editing of the variables. Terminate the debugger and start another debugging session - without closing SE - and the same variable is now editable.