Deleted Added
sdiff udiff text old ( 218590 ) new ( 222544 )
full compact
1/*******************************************************************************
2 *
3 * Module Name: dbinput - user front-end to the AML debugger
4 *
5 ******************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2011, Intel Corp.

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

49
50#ifdef ACPI_DEBUGGER
51
52#define _COMPONENT ACPI_CA_DEBUGGER
53 ACPI_MODULE_NAME ("dbinput")
54
55/* Local prototypes */
56
57static char *
58AcpiDbGetNextToken (
59 char *String,
60 char **Next);
61
62static UINT32
63AcpiDbGetLine (
64 char *InputBuffer);
65
66static UINT32
67AcpiDbMatchCommand (
68 char *UserCommand);
69

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

280 AcpiOsPrintf (" Type <Object> Display object type\n");
281
282 AcpiOsPrintf ("\nControl Method Execution Commands:\n");
283 AcpiOsPrintf (" Arguments (or Args) Display method arguments\n");
284 AcpiOsPrintf (" Breakpoint <AmlOffset> Set an AML execution breakpoint\n");
285 AcpiOsPrintf (" Call Run to next control method invocation\n");
286 AcpiOsPrintf (" Debug <Namepath> [Arguments] Single Step a control method\n");
287 AcpiOsPrintf (" Execute <Namepath> [Arguments] Execute control method\n");
288 AcpiOsPrintf (" Go Allow method to run to completion\n");
289 AcpiOsPrintf (" Information Display info about the current method\n");
290 AcpiOsPrintf (" Into Step into (not over) a method call\n");
291 AcpiOsPrintf (" List [# of Aml Opcodes] Display method ASL statements\n");
292 AcpiOsPrintf (" Locals Display method local variables\n");
293 AcpiOsPrintf (" Results Display method result stack\n");
294 AcpiOsPrintf (" Set <A|L> <#> <Value> Set method data (Arguments/Locals)\n");
295 AcpiOsPrintf (" Stop Terminate control method\n");

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

313 * Next - Return value, end of next token
314 *
315 * RETURN: Pointer to the start of the next token.
316 *
317 * DESCRIPTION: Command line parsing. Get the next token on the command line
318 *
319 ******************************************************************************/
320
321static char *
322AcpiDbGetNextToken (
323 char *String,
324 char **Next)
325{
326 char *Start;
327
328
329 /* At end of buffer? */
330
331 if (!String || !(*String))
332 {
333 return (NULL);
334 }
335
336 /* Get rid of any spaces at the beginning */
337
338 if (*String == ' ')
339 {
340 while (*String && (*String == ' '))
341 {
342 String++;
343 }
344
345 if (!(*String))
346 {
347 return (NULL);
348 }
349 }
350
351 if (*String == '"')
352 {
353 /* This is a quoted string, scan until closing quote */
354
355 String++;
356 Start = String;
357
358 /* Find end of token */
359
360 while (*String && (*String != '"'))
361 {
362 String++;
363 }
364 }
365 else
366 {
367 Start = String;
368
369 /* Find end of token */
370
371 while (*String && (*String != ' '))
372 {
373 String++;
374 }
375 }
376
377 if (!(*String))
378 {
379 *Next = NULL;
380 }
381 else
382 {
383 *String = 0;
384 *Next = String + 1;
385 }
386
387 return (Start);
388}
389
390
391/*******************************************************************************
392 *
393 * FUNCTION: AcpiDbGetLine
394 *

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

411 char *This;
412
413
414 ACPI_STRCPY (AcpiGbl_DbParsedBuf, InputBuffer);
415
416 This = AcpiGbl_DbParsedBuf;
417 for (i = 0; i < ACPI_DEBUGGER_MAX_ARGS; i++)
418 {
419 AcpiGbl_DbArgs[i] = AcpiDbGetNextToken (This, &Next);
420 if (!AcpiGbl_DbArgs[i])
421 {
422 break;
423 }
424
425 This = Next;
426 }
427

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

570 Status = AE_OK;
571 break;
572
573 case CMD_CLOSE:
574 AcpiDbCloseDebugFile ();
575 break;
576
577 case CMD_DEBUG:
578 AcpiDbExecute (AcpiGbl_DbArgs[1], &AcpiGbl_DbArgs[2], EX_SINGLE_STEP);
579 break;
580
581 case CMD_DISASSEMBLE:
582 (void) AcpiDbDisassembleMethod (AcpiGbl_DbArgs[1]);
583 break;
584
585 case CMD_DUMP:
586 AcpiDbDecodeAndDisplayObject (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);

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

596 break;
597
598 case CMD_EVENT:
599 AcpiOsPrintf ("Event command not implemented\n");
600 break;
601
602 case CMD_EXECUTE:
603 AcpiDbExecute (AcpiGbl_DbArgs[1],
604 &AcpiGbl_DbArgs[2], EX_NO_SINGLE_STEP);
605 break;
606
607 case CMD_FIND:
608 Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
609 break;
610
611 case CMD_GO:
612 AcpiGbl_CmSingleStep = FALSE;

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

956 }
957 else
958 {
959 AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_EXECUTE_PROMPT);
960 }
961
962 /* Get the user input line */
963
964 (void) AcpiOsGetLine (AcpiGbl_DbLineBuf);
965
966 /* Check for single or multithreaded debug */
967
968 if (AcpiGbl_DebuggerConfiguration & DEBUGGER_MULTI_THREADED)
969 {
970 /*
971 * Signal the debug thread that we have a command to execute,
972 * and wait for the command to complete.

--- 31 unchanged lines hidden ---