Hello! I have encountered some problems on debugging C source code under the Workbench. I want to 'examine' or 'deposit' the C defined variable in transator's command output window. For instance, ex f0.reg.reg_name_0 While the compiler won't generate the symbol representing the variable, I can only use the following instead: ex f0.reg.@b31 We know that the C compiler provide global_label function to preserve the C label. Is there any similar solution to the variable?! Thanks a lot. And thanks for your attention.
Using the workbench it is possible to see which register is assigned to a variable. Debug the program and in the window that shows the source code, switch in assembly mode. (that's the button with the two little squares one green and one yellow). There you can search the name of the variable to find the assigned register. It will be something like <varname>:<reg> You can even right click on the name to add a watch on the register. Note, that a variable may be mapped somewhere else and not in a register. I hope I provided some help. Yannis Haritakis, Foundation Of Research and Technology Hellas, FORTH
Hello! I have encountered some problems on debugging C source code under the Workbench. I want to 'examine' or 'deposit' the C defined variable in transator's command output window. For instance, ex f0.reg.reg_name_0 While the compiler won't generate the symbol representing the variable, I can only use the following instead: ex f0.reg.@b31
We know that the C compiler provide global_label function to preserve the C label. Is there any similar solution to the variable?!
Thanks a lot. And thanks for your attention.
Thank you very much! But is there a method to preserve the register name before the compilation? -----Original Message----- From: owner-ixp1200@CS.Princeton.EDU [mailto:owner-ixp1200@CS.Princeton.EDU] On Behalf Of Yannis Haritakis Sent: Tuesday, October 22, 2002 6:36 PM To: ixp1200@CS.Princeton.EDU Subject: Re: [ixp1200] Question about Transactor Using the workbench it is possible to see which register is assigned to a variable. Debug the program and in the window that shows the source code, switch in assembly mode. (that's the button with the two little squares one green and one yellow). There you can search the name of the variable to find the assigned register. It will be something like <varname>:<reg> You can even right click on the name to add a watch on the register. Note, that a variable may be mapped somewhere else and not in a register. I hope I provided some help. Yannis Haritakis, Foundation Of Research and Technology Hellas, FORTH
Hello! I have encountered some problems on debugging C source code under the Workbench. I want to 'examine' or 'deposit' the C defined variable in transator's command output window. For instance, ex f0.reg.reg_name_0 While the compiler won't generate the symbol representing the variable, I can only use the following instead: ex f0.reg.@b31
We know that the C compiler provide global_label function to preserve the C label. Is there any similar solution to the variable?!
Thanks a lot. And thanks for your attention.
Thank you very much! But is there a method to preserve the register name before the compilation?
Do you mean to instruct the compiler to use a specific register for a variable ? For example "use @a34 to store fsm_state" ?? No this is not possible. All allocations are done by the compiler. This is true even for assembly code thath is embedded in a microC source file. You can only instruct the compiler that you want a specific variable to be placed in a register. Which ever register the compiler wants. I remember some cases where eventhough I had used the __declspec(gp_reg) for a variable, the compiler kept on mapping it to the scratch with no complains/error messages. If you encounter this problem too, then mosto probably it'll be another compiler bug. Yannis Charitakis, FORTH Foundation of Research and Technology, Hellas
I do want to instruct the compiler to generate a specific register instead of random allocation, or I want the compiler keep the variable name after the compilation. Coz, I wanna exploit these variables in the transactor command window: Ex. dep f0.reg.XXXX_0 = XXXXX And currently I haven't encountered the problem you mentioned yet. Have you try the 2.01a patch provided by Intel? Sincerely yours, Zhangxi Tan -----Original Message----- From: owner-ixp1200@CS.Princeton.EDU [mailto:owner-ixp1200@CS.Princeton.EDU] On Behalf Of Yannis Haritakis Sent: Thursday, October 24, 2002 12:40 AM To: ixp1200@CS.Princeton.EDU Subject: RE: [ixp1200] Question about Transactor
Thank you very much! But is there a method to preserve the register name before the compilation?
Do you mean to instruct the compiler to use a specific register for a variable ? For example "use @a34 to store fsm_state" ?? No this is not possible. All allocations are done by the compiler. This is true even for assembly code thath is embedded in a microC source file. You can only instruct the compiler that you want a specific variable to be placed in a register. Which ever register the compiler wants. I remember some cases where eventhough I had used the __declspec(gp_reg) for a variable, the compiler kept on mapping it to the scratch with no complains/error messages. If you encounter this problem too, then mosto probably it'll be another compiler bug. Yannis Charitakis, FORTH Foundation of Research and Technology, Hellas
participants (2)
-
xtan@mail
-
Yannis Haritakis