C-SPY에서 같은 이름의 변수 해석

기술노트 45813

아키텍처:

Arm, RL78

컴포넌트:

debugger

업데이트:

2018-02-28 오전 1:52

Introduction

If your application code contains variables with the same name, it might be difficult to set a breakpoint (using C-SPY macros), or to set a watch on one of them in the C-SPY watch window.

Solution

You need to specify the symbol location in a more specific way.

The syntax is:

<module>\<function>::<symbol>

For example, if the files "main.c" and "test.c" contain a static global (file global) variable called "testvar", the syntax would be:

main\testvar

and

test\testvar

If the file "main.c" contains a function called "testfunc" with a local variable called "testvar", the syntax to add this variable to the Watch window would be:

main\testfunc::testvar

The syntax above works in the Watch window and in C-SPY macros (for example __setSimBreak). Note that in C-SPY macros you need to protect the backslashes (\) with an extra backslash (for example "main\\testvar").

See the example screenshot from C-SPY (below), and the Example project for IAR Embedded Workbench for ARM 6.10.

 

All product names are trademarks or registered trademarks of their respective owners.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.