This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debugger Question

How do you get the debugger to allow you
to single step by "C" instructions? I do not
want the disassembly window - for what I am
trying to do, debugging in "C" is desired.
The disassembly window keeps popping up, I keep
killing it, and I can't find a way to change
modes... Suggestions?

  • Are you single-stepping thru code that has C source or are youstepping thru the startup code (or other assembly code)?

    When you start the debugger if you type g,main you should see the main C function of your program and you should be able to step thru it.

    If you can't step thru your C code and if you never see the PC arrow on the left side of the window (in your C code) maybe you don't have debug information enabled.

    Jon

  • I set a c-level breakpoint in main.c, start
    the run, it gets there, stops, pops up the disassemly window. Do a step, and it dives
    right back into the disassembled code.
    Pretty sure debug stuff is enabled... I do
    not get the arrow...

  • Yes, I often find that the debugger has a nasty habit of dropping into the disassembler view instead of 'C' source.
    You just have to click the 'C' source file, and the arrow will show where you are.

    You're not using ASM/ENDASM and/or SRC are you...?

  • Clicking the C file isn't doing it.
    In two modules I use ASM/ENDASM, but not
    the one in question.

    It is a bank switched application - I wonder
    if that is contributing?

  • Usually, if everything else is OK, the only reason the debugger doesn't open the source is if it can't figure out where the source is. You can use SET SRC = path in the debugger to specify the path to the source file. This can also occur if you have several source files (in different folders) with the same names.

    Jon

  • Could it also happen when using the top optimisations, where it gets very tricky to know which 'C' source line corresponds to a particular assembler instruction?
    Especially with things like common-tail merging, Linker code packing, etc...?