Deleted Added
full compact
dbmethod.c (241973) dbmethod.c (243347)
1/*******************************************************************************
2 *
3 * Module Name: dbmethod - Debug commands for control methods
4 *
5 ******************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2012, Intel Corp.

--- 333 unchanged lines hidden (view full) ---

342
343
344 Method = AcpiDbConvertToNode (Name);
345 if (!Method)
346 {
347 return (AE_BAD_PARAMETER);
348 }
349
1/*******************************************************************************
2 *
3 * Module Name: dbmethod - Debug commands for control methods
4 *
5 ******************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2012, Intel Corp.

--- 333 unchanged lines hidden (view full) ---

342
343
344 Method = AcpiDbConvertToNode (Name);
345 if (!Method)
346 {
347 return (AE_BAD_PARAMETER);
348 }
349
350 if (Method->Type != ACPI_TYPE_METHOD)
351 {
352 ACPI_ERROR ((AE_INFO, "%s (%s): Object must be a control method",
353 Name, AcpiUtGetTypeName (Method->Type)));
354 return (AE_BAD_PARAMETER);
355 }
356
350 ObjDesc = Method->Object;
351
352 Op = AcpiPsCreateScopeOp ();
353 if (!Op)
354 {
355 return (AE_NO_MEMORY);
356 }
357
358 /* Create and initialize a new walk state */
359
360 WalkState = AcpiDsCreateWalkState (0, Op, NULL, NULL);
361 if (!WalkState)
362 {
363 return (AE_NO_MEMORY);
364 }
365
366 Status = AcpiDsInitAmlWalk (WalkState, Op, NULL,
357 ObjDesc = Method->Object;
358
359 Op = AcpiPsCreateScopeOp ();
360 if (!Op)
361 {
362 return (AE_NO_MEMORY);
363 }
364
365 /* Create and initialize a new walk state */
366
367 WalkState = AcpiDsCreateWalkState (0, Op, NULL, NULL);
368 if (!WalkState)
369 {
370 return (AE_NO_MEMORY);
371 }
372
373 Status = AcpiDsInitAmlWalk (WalkState, Op, NULL,
367 ObjDesc->Method.AmlStart,
368 ObjDesc->Method.AmlLength, NULL, ACPI_IMODE_LOAD_PASS1);
374 ObjDesc->Method.AmlStart,
375 ObjDesc->Method.AmlLength, NULL, ACPI_IMODE_LOAD_PASS1);
369 if (ACPI_FAILURE (Status))
370 {
371 return (Status);
372 }
373
376 if (ACPI_FAILURE (Status))
377 {
378 return (Status);
379 }
380
374 /* Parse the AML */
381 Status = AcpiUtAllocateOwnerId (&ObjDesc->Method.OwnerId);
382 WalkState->OwnerId = ObjDesc->Method.OwnerId;
375
383
384 /* Push start scope on scope stack and make it current */
385
386 Status = AcpiDsScopeStackPush (Method,
387 Method->Type, WalkState);
388 if (ACPI_FAILURE (Status))
389 {
390 return (Status);
391 }
392
393 /* Parse the entire method AML including deferred operators */
394
376 WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
377 WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
395 WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
396 WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
397
378 Status = AcpiPsParseAml (WalkState);
398 Status = AcpiPsParseAml (WalkState);
399 AcpiDmParseDeferredOps (Op);
379
400
401 /* Now we can disassemble the method */
402
403 AcpiGbl_DbOpt_verbose = FALSE;
380#ifdef ACPI_DISASSEMBLER
381 AcpiDmDisassemble (NULL, Op, 0);
382#endif
404#ifdef ACPI_DISASSEMBLER
405 AcpiDmDisassemble (NULL, Op, 0);
406#endif
407 AcpiGbl_DbOpt_verbose = TRUE;
408
383 AcpiPsDeleteParseTree (Op);
409 AcpiPsDeleteParseTree (Op);
410
411 /* Method cleanup */
412
413 AcpiNsDeleteNamespaceSubtree (Method);
414 AcpiNsDeleteNamespaceByOwner (ObjDesc->Method.OwnerId);
415 AcpiUtReleaseOwnerId (&ObjDesc->Method.OwnerId);
384 return (AE_OK);
385}
386
387
388/*******************************************************************************
389 *
390 * FUNCTION: AcpiDbWalkForExecute
391 *

--- 138 unchanged lines hidden ---
416 return (AE_OK);
417}
418
419
420/*******************************************************************************
421 *
422 * FUNCTION: AcpiDbWalkForExecute
423 *

--- 138 unchanged lines hidden ---