Problems on debugging ARM assembly code

C

Cornel Gligan

Hello!

I am working on a project (a library) for Windows Mobile 5 and I really need
to optimise a function using assembly language for ARM.

I wrote an .asm file where I placed the assembly code for my function. I
managed to compile that file (using a custom build command line - help found
here: http://blogs.msdn.com/jeffabraham/archive/2005/03/31/404283.aspx) and
to link the resulted obj to the library. I run in debug mode a test
application that used my library. I managed to debug my assembly code using
"Disassembly" window. It is very difficult to understand the optimised code
and to debug it; this is why I commented the code very well. Unfortunately I
can not see any of my comments in "Disassembly" window and it is very
difficult in this case to find the bugs.

Is there a possibility to see all my comments when I debug in assembly code?

Here is the custom build command line used to compile the .asm file:

armasm -o "Windows Mobile 5.0 Pocket PC SDK (ARMV4I)\Debug\MyAsmFile.obj"

I am using Windows XP PRO, Visual Studio 2005 (Visual C++).

Thank you in advance!

Best regards,
Cornel Gligan
 
V

Volodymyr Shcherbyna

Is there a possibility to see all my comments when I debug in assembly

Of course, no! Comments are just a human readable text, and they have
nothing to do in the machine code. If you have any problems with
understanding of the code, I suggest you to convert comments into log
strings. i.e., let the comments be passed into OutputDebugString function
( or what is the analog in Windows CE? ). So you can see in the resulting
code calls to OutputDebugString (...) and you will see the value which is
passed to stack (an pointer to a log string).
 
C

Cornel Gligan

I run in debug the C++ version of the function in Visual Studio and when I
opened the "Disassembly" window I saw there the comments to the code.

I used other debug tools for different processors and all of these tools
shown me the comments on debugging. I know that there are some compling or
linking options that allow this. But I don't know what are these options in
my case.

Regards,
Cornel Gligan
 
P

Paul G. Tobey [eMVP]

Wow! You targeted a bunch of off-topic groups there.

FYI, OutputDebugString() is the same in CE as in XPe.

Since it sounds like you simply have the wrong options on your build command
line. Did you set /Zi, for example?

Paul T.
 
L

Leonard Mosescu [MS]

Hello Cornel,

Unfortunately the current ARM assembler included in the Microsoft tool chain
doesn't output debug information so the debugger can't use your assembly
source file. It's something we're planning to fix but I can't give you a
specific release date.
 
M

Marcus Venturi

Hi Leonard,

I'm having the same problems as Cornel. I want do debug in my original code
to be able to see all labels and comments.
Especially for assembler code this is very helpful otherwise I always have
to compare the debugged code with
my sourcecode in a second window which is not very productive.

As a workaround Cornel could try to export not only the function names, but
also all labels:

EXPORT FunctionName, Label1, Label2, Label3

Then he is able to see at least the labels of the source code while
debugging.

Nevertheless I'm waiting for a full ARM assembler support through the IDE,
including inline assembler.

Regards
Marcus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top