forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdebug.cpp
More file actions
725 lines (585 loc) · 18.9 KB
/
debug.cpp
File metadata and controls
725 lines (585 loc) · 18.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
/* Copyright (C) 2003-2015 LiveCode Ltd.
This file is part of LiveCode.
LiveCode is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License v3 as published by the Free
Software Foundation.
LiveCode is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
#include "prefix.h"
#include "globdefs.h"
#include "filedefs.h"
#include "objdefs.h"
#include "parsedef.h"
#include "mcio.h"
#include "hndlrlst.h"
#include "handler.h"
#include "param.h"
#include "mcerror.h"
#include "object.h"
#include "stack.h"
#include "card.h"
#include "field.h"
#include "util.h"
#include "debug.h"
#include "parentscript.h"
#include "chunk.h"
#include "scriptpt.h"
#include "dispatch.h"
#include "globals.h"
#include "mode.h"
#include "exec.h"
#include "system.h"
////////////////////////////////////////////////////////////////////////////////
MCExecContext *MCECptr;
MCStackHandle MCtracestackptr;
Window MCtracewindow;
Boolean MCtrace;
Boolean MCtraceabort;
MCObjectHandle MCtracedobject;
Boolean MCtracereturn = True;
uint4 MCtraceuntil = MAXUINT2;
uint2 MCtracedelay = 500;
MCStackHandle MCmbstackptr = nil;
Breakpoint *MCbreakpoints = nil;
uint2 MCnbreakpoints = 0;
Watchvar *MCwatchedvars = nil;
uint2 MCnwatchedvars = 0;
MCExecContext *MCexecutioncontexts[MAX_CONTEXTS];
uint2 MCnexecutioncontexts = 0;
uint2 MCdebugcontext = MAXUINT2;
Boolean MCmessagemessages = False;
MCNameRef MClogmessage;
////////////////////////////////////////////////////////////////////////////////
#if defined(_SERVER)
#include "srvdebug.h"
void MCB_setmsg(MCExecContext& ctxt, MCStringRef p_string)
{
// At some point we will add the ability to manipulate/look at the 'message box' in a
// remote debugging session.
}
void MCB_trace(MCExecContext &ctxt, uint2 line, uint2 pos)
{
MCServerDebugTrace(ctxt, line, pos);
}
void MCB_break(MCExecContext &ctxt, uint2 line, uint2 pos)
{
MCServerDebugBreak(ctxt, line, pos);
}
bool MCB_error(MCExecContext &ctxt, uint2 line, uint2 pos, uint2 id)
{
MCServerDebugError(ctxt, line, pos, id);
// Increasing the error lock means that more MCB_error invocations won't occur as
// we step back up the (script) call stack.
MCerrorlock++;
return true;
}
void MCB_done(MCExecContext &ctxt)
{
}
void MCB_setvar(MCExecContext &ctxt, MCValueRef p_value, MCNameRef name)
{
MCServerDebugVariableChanged(ctxt, name);
}
void MCB_setvalue(MCExecContext &ctxt, MCExecValue p_value, MCNameRef name)
{
if (!MCExecTypeIsValueRef(p_value . type))
{
MCAutoValueRef t_value;
MCExecTypeConvertAndReleaseAlways(ctxt, p_value . type, &p_value, kMCExecValueTypeValueRef, &(&t_value));
MCB_setvar(ctxt, *t_value, name);
}
else
{
MCB_setvar(ctxt, p_value . valueref_value, name);
}
}
#else
void MCB_setmsg(MCExecContext &ctxt, MCStringRef p_string)
{
Exec_stat t_stat = ES_NOT_HANDLED;
MCObject *t_target = nil;
if (ctxt.GetObject() != nil)
t_target = ctxt.GetObject();
else if (MCdefaultstackptr . IsValid())
t_target = MCdefaultstackptr;
if (t_target != nil)
{
Boolean oldlock = MClockmessages;
MClockmessages = False;
MCAutoStringRef t_handler;
t_handler = MCNameGetString(ctxt.GetHandler()->getname());
MCParameter t_handler_parameter;
t_handler_parameter.setvalueref_argument(*t_handler);
MCAutoNumberRef t_line;
MCParameter t_line_parameter;
if (MCNumberCreateWithUnsignedInteger(ctxt.GetLine(), &t_line))
{
t_line_parameter.setvalueref_argument(*t_line);
t_handler_parameter.setnext(&t_line_parameter);
}
bool t_added = false;
if (MCnexecutioncontexts < MAX_CONTEXTS && ctxt.GetObject() != nil)
{
MCexecutioncontexts[MCnexecutioncontexts++] = &ctxt;
t_added = true;
}
t_stat = t_target -> message(MCM_msgchanged, &t_handler_parameter, True, True, False);
if (t_added)
MCnexecutioncontexts--;
MClockmessages = oldlock;
}
if (t_stat == ES_NOT_HANDLED || t_stat == ES_PASS)
{
if (MCnoui)
{
MCAutoStringRefAsCString t_output;
/* UNCHECKED */ t_output . Lock(p_string);
MCS_write(*t_output, sizeof(char), strlen(*t_output), IO_stdout);
uint4 length = MCStringGetLength(p_string);
if (length && MCStringGetCharAtIndex(p_string, length - 1) != '\n')
MCS_write("\n", sizeof(char), 1, IO_stdout);
return;
}
else
{
MCsystem -> Debug(p_string);
}
}
}
void MCB_message(MCExecContext &ctxt, MCNameRef mess, MCParameter *p)
{
Boolean exitall = MCexitall;
MCSaveprops sp;
MCU_saveprops(sp);
MCU_resetprops(True);
MCtrace = False;
if (MCtracestackptr)
MCtracewindow = MCtracestackptr->getw();
else
MCtracewindow = ctxt.GetObject()->getw();
MCVariable *oldresult = MCresult;
/* UNCHECKED */ MCVariable::createwithname(MCNAME("MCdebugresult"), MCresult);
MCtracereturn = False;
MCtraceabort = False;
MCExecResultMode t_oldresultmode = MCresultmode;
Boolean oldcheck;
oldcheck = MCcheckstack;
MCcheckstack = False;
// OK-2008-05-19 : Bug 3915. If the object is disabled, message() will not send messages to it
// unless the "send" parameter is specified.
// OK-2008-11-28: [[Bug 7491]] - It seems that using the "send" parameter causes problems with the MetaCard debugger
// So instead of doing that, I've added a new optional parameter to MCObject::send, called p_force, and used this instead.
if (ctxt.GetObject() -> message(mess, p, True, False, True) == ES_NORMAL)
{
MCcheckstack = oldcheck;
while (!MCtracereturn)
{
MCU_resetprops(True);
MCscreen->wait(REFRESH_INTERVAL, True, True);
}
if (!MCtracedobject)
MCtracedobject = ctxt.GetObject();
if (MCtraceabort)
{
MCtraceabort = False;
exitall = True;
}
else
if (MCtracestackptr)
MCtrace = True;
}
MCcheckstack = oldcheck;
MCtracewindow = NULL;
delete MCresult;
MCresult = oldresult;
MCU_restoreprops(sp);
MCexitall = exitall;
MCresultmode = t_oldresultmode;
}
void MCB_prepmessage(MCExecContext &ctxt, MCNameRef mess, uint2 line, uint2 pos, uint2 id, MCStringRef p_info)
{
Boolean added = False;
if (MCnexecutioncontexts < MAX_CONTEXTS)
{
ctxt.SetLineAndPos(line, pos);
MCexecutioncontexts[MCnexecutioncontexts++] = &ctxt;
added = True;
}
MCParameter p1, p2, p3, p4;
p1.setvalueref_argument(ctxt.GetHandler()->getname());
p1.setnext(&p2);
p2.setn_argument((real8)line);
p2.setnext(&p3);
p3.setn_argument((real8)pos);
if (id != 0)
{
p3.setnext(&p4);
MCeerror->add(id, line, pos);
MCAutoValueRef t_val;
ctxt.GetObject()->names(P_LONG_ID, &t_val);
MCeerror->add(EE_OBJECT_NAME, 0, 0, *t_val);
MCAutoStringRef t_error;
MCeerror -> copyasstringref(&t_error);
p4.setvalueref_argument(*t_error);
}
else if (!MCStringIsEmpty(p_info))
{
p3.setnext(&p4);
p4.setvalueref_argument(p_info);
}
MCDeletedObjectsFreezePool();
MCB_message(ctxt, mess, &p1);
MCDeletedObjectsThawPool();
if (id != 0)
MCeerror->clear();
if (added)
MCnexecutioncontexts--;
}
void MCB_trace(MCExecContext &ctxt, uint2 line, uint2 pos)
{
uint2 i;
// MW-2015-03-03: [[ Bug 13110 ]] If this is an internal handler as a result of do
// then *don't* debug it.
if (ctxt . GetHandler() -> getname() == MCM_message)
return;
if (MCtrace && (MCtraceuntil == MAXUINT2 || MCnexecutioncontexts == MCtraceuntil))
{
MCtraceuntil = MAXUINT2;
MCB_prepmessage(ctxt, MCM_trace, line, pos, 0);
}
else
{
// MW-2009-01-28: [[ Inherited parentScripts ]]
// If in parentScript context, we check against the parentScript's object
// rather than the ep's object.
for (i = 0 ; i < MCnbreakpoints ; i++)
if (MCbreakpoints[i].line == line)
{
MCParentScriptUse *t_parentscript;
t_parentscript = ctxt . GetParentScript();
if ((t_parentscript == NULL && MCbreakpoints[i].object == ctxt.GetObject()) ||
(t_parentscript != NULL && MCbreakpoints[i].object == t_parentscript -> GetParent() -> GetObject()))
MCB_prepmessage(ctxt, MCM_trace_break, line, pos, 0, *MCbreakpoints[i].info);
}
}
}
void MCB_break(MCExecContext &ctxt, uint2 line, uint2 pos)
{
// We hit a breakpoint - end all modal loops
MCscreen->breakModalLoops();
MCB_prepmessage(ctxt, MCM_trace_break, line, pos, 0);
}
bool s_in_trace_error = false;
bool MCB_error(MCExecContext &ctxt, uint2 line, uint2 pos, uint2 id)
{
// An unhandled error has been thrown - end all modal loops
MCscreen->breakModalLoops();
// OK-2009-03-25: [[Bug 7517]] - The crash described in this bug report is probably caused by a stack overflow. This overflow is due to
// errors being thrown in the IDE (or in this case GLX2) component of the debugger. This should prevent traceError from recursing.
if (s_in_trace_error)
return false;
s_in_trace_error = true;
MCB_prepmessage(ctxt, MCM_trace_error, line, pos, id);
MCerrorlock++; // suppress errors as stack unwinds
s_in_trace_error = false;
return true;
}
void MCB_done(MCExecContext &ctxt)
{
MCB_message(ctxt, MCM_trace_done, NULL);
}
void MCB_setvar(MCExecContext &ctxt, MCValueRef p_value, MCNameRef name)
{
Boolean added = False;
if (MCnexecutioncontexts < MAX_CONTEXTS)
{
MCexecutioncontexts[MCnexecutioncontexts++] = &ctxt;
added = True;
}
MCParameter p1, p2, p3;
p1.setn_argument(ctxt . GetLine());
p1.setnext(&p2);
p2.setvalueref_argument(name);
p2.setnext(&p3);
p3.setvalueref_argument(p_value);
MCB_message(ctxt, MCM_update_var, &p1);
if (added)
MCnexecutioncontexts--;
}
void MCB_setvalue(MCExecContext &ctxt, MCExecValue p_value, MCNameRef name)
{
Boolean added = False;
if (MCnexecutioncontexts < MAX_CONTEXTS)
{
MCexecutioncontexts[MCnexecutioncontexts++] = &ctxt;
added = True;
}
MCParameter p1, p2, p3;
MCExecValue t_copy;
p1.setn_argument(ctxt . GetLine());
p1.setnext(&p2);
p2.setvalueref_argument(name);
p2.setnext(&p3);
MCExecTypeCopy(p_value, t_copy);
p3.give_exec_argument(t_copy);
MCB_message(ctxt, MCM_update_var, &p1);
if (added)
MCnexecutioncontexts--;
}
#endif
////////////////////////////////////////////////////////////////////////////////
void MCB_clearbreaks(MCObject *p_for_object)
{
for(size_t n = 0; n < MCnbreakpoints; ++n)
{
if (p_for_object == nil || !MCbreakpoints[n].object || MCbreakpoints[n].object == p_for_object)
{
MCbreakpoints[n].Clear();
}
}
if (p_for_object == nil && MCbreakpoints != nil)
{
MCnbreakpoints = 0;
MCMemoryDestroy(MCbreakpoints);
MCbreakpoints = nil;
}
}
bool MCB_unparsebreaks(MCStringRef& r_value)
{
bool t_success;
t_success = true;
MCAutoListRef t_breakpoint_list;
if (t_success)
t_success = MCListCreateMutable('\n', &t_breakpoint_list);
if (t_success)
{
// MW-2005-06-26: Fix breakpoint crash issue - ignore any breakpoints with NULL object
for (uint32_t i = 0 ; i < MCnbreakpoints ; i++)
{
if (MCbreakpoints[i].object)
{
MCAutoListRef t_breakpoint;
t_success = MCListCreateMutable(',', &t_breakpoint);
if (t_success)
{
MCAutoValueRef t_breakpoint_id;
t_success = MCbreakpoints[i] . object -> names(P_LONG_ID, &t_breakpoint_id) &&
MCListAppend(*t_breakpoint, *t_breakpoint_id);
}
if (t_success)
{
MCAutoStringRef t_line;
t_success = MCStringFormat(&t_line, "%d", MCbreakpoints[i] . line) &&
MCListAppend(*t_breakpoint, *t_line);
}
if (t_success && !MCStringIsEmpty(*MCbreakpoints[i].info))
{
t_success = MCListAppend(*t_breakpoint, *MCbreakpoints[i].info);
}
if (t_success)
t_success = MCListAppend(*t_breakpoint_list, *t_breakpoint);
}
}
}
if (t_success)
t_success = MCListCopyAsString(*t_breakpoint_list, r_value);
return t_success;
}
void MCB_parsebreaks(MCExecContext& ctxt, MCStringRef p_input)
{
MCB_clearbreaks(NULL);
uindex_t t_return_offset = 0;
uindex_t t_last_offset = 0;
uindex_t t_input_length;
t_input_length = MCStringGetLength(p_input);
bool t_found;
t_found = true;
bool t_success;
t_success = true;
while (t_found && t_success)
{
uindex_t t_length;
MCAutoStringRef t_break;
t_found = MCStringFirstIndexOfChar(p_input, '\n', t_last_offset, kMCCompareExact, t_return_offset);
if (!t_found) //last line
t_length = t_input_length - t_last_offset;
else
t_length = t_return_offset - t_last_offset;
t_success = MCStringCopySubstring(p_input, MCRangeMake(t_last_offset, t_length), &t_break);
bool t_in_quotes;
t_in_quotes = false;
uindex_t t_offset;
if (t_success)
{
for (t_offset = 0; t_offset < t_length; t_offset++)
{
if (!t_in_quotes && MCStringGetCharAtIndex(*t_break, t_offset) == ',')
break;
if (MCStringGetCharAtIndex(*t_break, t_offset) == '"')
t_in_quotes = !t_in_quotes;
}
}
if (t_success && t_offset < t_length)
{
MCAutoStringRef t_head;
MCAutoStringRef t_tail;
MCObjectPtr t_object;
if (t_success)
t_success = MCStringDivideAtIndex(*t_break, t_offset, &t_head, &t_tail);
MCAutoStringRef t_line_string;
MCAutoStringRef t_info;
if (t_success)
t_success = MCStringDivideAtChar(*t_tail, ',', kMCCompareExact, &t_line_string, &t_info);
// AL-2015-07-31: [[ Bug 15822 ]] Don't abort parsing if a given line is not correctly formatted
bool t_valid_break;
t_valid_break = t_success;
if (t_valid_break)
t_valid_break = MCInterfaceTryToResolveObject(ctxt, *t_head, t_object);
int32_t t_line;
t_line = 0;
if (t_valid_break)
t_valid_break = MCU_strtol(*t_line_string, t_line) && t_line > 0;
if (t_valid_break)
{
Breakpoint *t_new_breakpoints;
if (!MCMemoryReallocate(MCbreakpoints, sizeof(Breakpoint) * (MCnbreakpoints + 1), t_new_breakpoints))
break;
MCbreakpoints = t_new_breakpoints;
new (&MCbreakpoints[MCnbreakpoints]) Breakpoint(t_object.object->GetHandle(), t_line, *t_info);
MCnbreakpoints++;
}
}
t_last_offset = t_return_offset + 1;
}
}
////////////////////////////////////////////////////////////////////////////////
void MCB_clearwatches(void)
{
for (size_t i = 0; i < MCnwatchedvars; i++)
{
MCwatchedvars[i].Clear();
}
if (MCwatchedvars != nil)
{
MCnwatchedvars = 0;
MCMemoryDestroy(MCwatchedvars);
MCwatchedvars = nil;
}
}
void MCB_parsewatches(MCExecContext& ctxt, MCStringRef p_input)
{
MCB_clearwatches();
uindex_t t_return_offset = 0;
uindex_t t_last_offset = 0;
uindex_t t_input_length;
t_input_length = MCStringGetLength(p_input);
if (t_input_length == 0)
return;
bool t_found;
t_found = true;
bool t_success;
t_success = true;
while (t_found && t_success)
{
uindex_t t_length;
MCAutoStringRef t_watch;
t_found = MCStringFirstIndexOfChar(p_input, '\n', t_last_offset, kMCCompareExact, t_return_offset);
if (!t_found) //last line
t_length = t_input_length - t_last_offset;
else
t_length = t_return_offset - t_last_offset;
t_success = MCStringCopySubstring(p_input, MCRangeMake(t_last_offset, t_length), &t_watch);
MCAutoStringRef t_obj;
MCAutoStringRef t_obj_tail;
if (t_success)
t_success = MCStringDivideAtChar(*t_watch, ',', kMCCompareExact, &t_obj, &t_obj_tail);
// SN-2014-09-18: [[ Bug 13453 ]] The input is object, handler, variable, condition
MCAutoStringRef t_hname;
MCAutoStringRef t_hname_tail;
if (t_success)
t_success = MCStringDivideAtChar(*t_obj_tail, ',', kMCCompareExact, &t_hname, &t_hname_tail);
MCAutoStringRef t_vname;
MCAutoStringRef t_express;
if (t_success)
t_success = MCStringDivideAtChar(*t_hname_tail, ',', kMCCompareExact, &t_vname, &t_express);
MCObjectPtr t_object;
bool t_resolved_object;
if (t_success)
t_resolved_object = MCInterfaceTryToResolveObject(ctxt, *t_obj, t_object);
if (t_success)
{
// OK-2010-01-14: [[Bug 6506]] - Allow globals in watchedVariables
// If the object and handler are empty we assume its a global, otherwise
// do the previous behavior.
if ((MCStringIsEmpty(*t_obj) && MCStringIsEmpty(*t_hname)) ||
t_object . object != nil)
{
Watchvar *t_new_watches;
if (!MCMemoryReallocate(MCwatchedvars, sizeof(Watchvar) * (MCnwatchedvars + 1), t_new_watches))
{
t_success = false;
break;
}
MCObjectHandle t_objecthandle;
MCNewAutoNameRef t_handlername;
MCNewAutoNameRef t_varname;
if (t_resolved_object)
t_objecthandle = t_object.object;
/* UNCHECKED */ MCNameCreate(*t_hname, &t_handlername);
/* UNCHECKED */ MCNameCreate(*t_vname, &t_varname);
MCwatchedvars = t_new_watches;
new (&MCwatchedvars[MCnwatchedvars]) Watchvar(t_objecthandle, *t_handlername, *t_varname, *t_express);
MCnwatchedvars++;
}
}
t_last_offset = t_return_offset + 1;
}
}
bool MCB_unparsewatches(MCStringRef &r_watches)
{
bool t_success;
t_success = true;
MCAutoListRef t_watches_list;
if (t_success)
t_success = MCListCreateMutable('\n', &t_watches_list);
if (t_success)
{
for (uint32_t i = 0 ; i < MCnwatchedvars ; i++)
{
MCAutoListRef t_watched_var;
t_success = MCListCreateMutable(',', &t_watched_var);
if (t_success)
{
if (MCwatchedvars[i].object)
{
MCAutoValueRef t_var_id;
t_success = MCwatchedvars[i] . object -> names(P_LONG_ID, &t_var_id) &&
MCListAppend(*t_watched_var, *t_var_id);
}
else
t_success = MCListAppend(*t_watched_var, kMCEmptyString);
}
if (t_success)
{
if (!MCwatchedvars[i].handlername.IsSet())
t_success = MCListAppend(*t_watched_var, kMCEmptyString);
else
t_success = MCListAppend(*t_watched_var, *MCwatchedvars[i].handlername);
}
if (t_success)
t_success = MCListAppend(*t_watched_var, *MCwatchedvars[i].varname);
// SN-2014-09-18: [[ Bug 13453 ]] A watched variable's expression is never nil
if (t_success)
t_success = MCListAppend(*t_watched_var, *MCwatchedvars[i].expression);
if (t_success)
t_success = MCListAppend(*t_watches_list, *t_watched_var);
}
}
if (t_success)
t_success = MCListCopyAsString(*t_watches_list, r_watches);
return t_success;
}