This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C6678调试时查看变量问题



在C6678开发板上调试多核SYS/BIOS程序,多核共用一个程序。将一个float型指针inBuf添加到Expressions,运行后显示 error:cannot work on multiple contexts.Select one frame on thread.请问在调试多核共用一个程序时,如何查看某一个核中变量值?

  • 请问其他变量能添加吗?还是就这个变量不能添加?

  • 您好:都不能添加,可能这个变量在每个核中定义的地址不同所以无法显示,但是我尝试了在一个核里定义局部变量,依然是这样的错误

  • 是否有按照下面的步骤添加。

    Tracking an Expression's Value

    Use the Expressions View if you want to add specific expressions or monitor global variables. The view enables you to specify expressions that you want to monitor while debugging your program. Several methods are available for adding variables to the view. You can edit the name and/or the value of any expression in the view.

    To add an expression:

    1. Select the last row in the view, that is, the row that has <Add new expression> on its Expression cell. Click the <Add new expression> cell. Notice that you are now editing the cell in-place.

    2. Type the expression that you want to evaluate. For example, (x-5)*3 .

    3. Press Enter or click elsewhere to complete the in-place editing. The expression and its value appear in the view. When the execution of a program is suspended, all expressions are re-evaluated.

    4. Click once on the + sign next to an expression. The line expands to list all the elements of the structure and their values.

    5. Double-click on the value of any element in the structure to edit that value.

    6. Change the value of an expression. Notice that the value changes in the view. The value also changes background color to yellow, indicating that you have changed it manually.

  • 在单核的非SYS/BIOS程序中可以正常查看,就是在多核共用的一个程序里无法查看

  • 那在memory browser中能观察到变量是有值的吗?

  • 你在调试时,选中一个核之后,在查看,不要再选中多核的情况下查看,再不行的话暂停后再按前面说的再试试。