Posts by sckare

    Hi!
    Actually, everything you need is in mentioned project. It contains both elf-file and Ozone project file. No need in flashing elf/hex to evaluation board nor even eval board itself. Just open "StructUnionBitfield.jdebug", right click "enumVal1" (line 69, " _Enumerator = enumVal1;"), then click on Show Definition or Show Declaration. Only message "Show.Definition ("enumVal1"): No source code definition information." will appear, whereas an expected outcome would be cursor jump to line 21 ( enumVal1 = 1,) where actual enum value locates:


    2. Same with structure field: right click exactly on "Byte" (line 75, " _Structure.Byte = 0x42;"), then click on Show Definition or Show Declaration. Same message. Expected jump to line 43.

    3. Local variable: "i" (line 81, " for (i = 0; i < 100; i++) {"). Everything is the same. Expected jump to line 60:


    Same behavior with ArmCC compiled elf (debug info included) and same with GNU Arm compiler (-Og -g3 -gdwarf-4). You can flash it to a board and run debug session or not, but nothing changes.
    Is that how it was intended? Or I did something wrong?

    Regards,
    scare

    Hi!
    Some time ago I raised a problem regarding poor navigation in Ozone project. That time I used Keil MDK with ArmCC. AlexD stated that they "do not support the 3rd party tool chain" however even provided by him SeggerStudio project showed a number of issues like:
    - No proper navigation on enumeration symbols (see enumVal1, enumVal2, enumVal3 in tat project),
    - No proper navigation on structure fields (Bit1, Bit2, Bit3, Bit4, Bit5, Bit6, Bit16, Byte, Halfword, Word),
    - No proper navigation on local variables (int i).
    "No proper navigation" means that if you right click on corresponding symbol (I mentioned in parentheses above) and choose "Show definition/declaration" you get only something like "Show.Definition ("Bit1"): No source code definition information." or "Show.Declaration ("enumVal1"): No source code declaration information." despite that information exists in the elf file (can be verified using readelf app).


    Recently I downloaded new version of Ozone (3.38g) but the things haven't changed! Or maybe I do something wrong way? But almost everything is in its default state as it was installed and I can't see any setting that can affect the problem (spent hours reading User Guide, browsing settings etc).
    It is sad that the debugger looked so powerful lacks so basic functions. Even Keil IDE seems more convenient in terms of text navigation (I don't mention free Qt Creator).

    Regards,
    scare

    Hi Alex.

    Thank you for response and the sample project. Enum declaration is really navigable (actually, only variable itself but not enum values like enumValX. As well as Struture_t fields.)

    And I understand that it is very difficult to provide support for lots of toolchains. But in that case it would be fair to mention that there is only partial support of Keil/Armcc toolchain (as it has issues due to incomplete DWARF file generation). Because now one might get the impression that it was tested and all features are supported as it is mentioned here.

    So, if there is no solution, please close the thread.

    Best regards
    sckare

    Hi Alex.

    Thank you for info. That sheds some light on the issue. But there are some questions remain. I used fromelf utility of Keil bundle and tried to analyze guts of the ELF (axf) file. Indeed, there are no "decl_file", "decl_line" ("decl_column" too) attributes for "DW_TAG_variable" data. So that is clear to me why Ozone doesn't show a variable position. But what I found else:


    Enum AnotherEnumT has data to show its placement but still Ozone refuses to do that. Any suggestion?

    Also I tried to find appropriate compiler option to overcome the issue but had no success. Initially, the project has settings like this:


    I.e. debug information is already added (this corresponds to compiler option -g) but no file/line data is there as we could see earlier. Armcc User Guide gives no clue (the only option of interest: "--debug" does nothing useful to me).


    So could you please give some advice what is possible to do? (as Keil v.5 toolchain is considered as supported, according to this).

    P.S. "Browse information" makes it possible navigation in Keil IDE itself (also creates additional crf files) but doesn't affect ELF (axf) file.

    Best regards
    sckare

    Hi Alex. Happy New Year!

    Actually, I said that only variables and (macro) definitions couldn't be shown. I didn't mention functions because these are mostly ok (so there's no point to check the functions window). At the same time the global variables window is not working properly - double click doesn't show variable's definition/declaration in source code (Show.Source ("Var"): No source info).
    I have prepared a project with same issue (please find in attachment). Not global nor local variables work (No source code definition information etc) as well as macro definitions. The only information I can retrieve of these is tooltip when hovering on it.

    Regards,
    sckare

    Hi Alex. Thank you for your reply.


    If you right-click onto a function invocation in the source window and select "Show Definition" the expected behavior is that Ozone opens the source file where that callee-function is implemented and moves the cursor the 1st line of that function. Ozone can do so only in case that file name is known and exists.

    "Show Definition" works only if corresponding function definition exists in the same file it is invoked from. Meanwhile "Show Declaration" works regardless where function definition is. Except of those which are macro substitution but it is not a big deal.

    please open the functions window, navigate to the line containing the information for that callee-function and check the column "Source". Is there a proper file name displayed? If so, please check what happens in case you double-click onto that line. The expected behavior is that the source file is opened and the cursor is moved to the 1st line of that function. Does that happen?

    This feature works right, exactly like you said.

    It might be that you built your binary on a remote build server and the file paths in the AXF/ELF file are those from the build server. If debugging takes place on a different machine (e.g. your local desktop PC) the paths for the same source file is likely to be different. Ozone does know only the locations at build time but not those you use at execution time.

    No, the project was built locally. I looked into axf file and all the paths seem correct,
    Regarding Section 5.14 I found some odd lines in the Ozone project:

    Code
    Project.AddPathSubstitute ("C:/Work/Path", "$(ProjectDir)");
      Project.AddPathSubstitute ("c:/work/path", "$(ProjectDir)");

    I.e. these lines are almost the same, the only difference that the second one has low case. Is it all right?
    There's no other file aliases nor search paths in the Ozone project file. Only File.Open for the axf file.
    Anyway, functions resolution works good so it is not sources/paths issue.

    Hello

    Just bumped into strange behaviour of Ozone debugger (I am a new user). I created a project on the base of Keil (v5.30) 'axf' file and tried to navigate thru source project variables and definitions but was unable to do it. Right click and 'Show definition' or 'Show declaration' failed to show anything. The only I could get is 'Show.Declaration ("VarName"): No source code declaration information.' and 'Show.Definition ("VarName"): No source code definition information.'. Some variables have an option 'Show value in Source' but it fails too. The same goes for symbol definitions (#define Something).
    In the same time when I hover mouse pointer on specific variable the tooltip appears and shows correct information (see attached picture) but not all #definitions show such tooltip and what is more strange, ver 3.10j shows tooltips while ver 3.30d doesn't for the same definition.
    All source files are loaded ('Source File' widget) so entire information is available. Debug and browse information is enabled for this Keil project ('axf' file contains all the symbols). I am a bit confused of this. Maybe I missed something? Google and forum reading couldn't help me.

    Regards,
    sckare