Live Watch only shows element zero of an array.

Sysprogs forums Forums VisualGDB Live Watch only shows element zero of an array.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #33896
    murrellr
    Participant

    The Globals and Watch modes are only showing the first element of arrays.  I can enter individual elements in the Watch window, but I can’t view the whole array.  My project is an imported Keil uVision project using the Keil compiler toolchain.  I’m debugging with OpenOCD and ST-link V2.

     

    #33897
    support
    Keymaster

    Hi,

    The contents of the Live Watch window is derived from the DWARF debugging symbols inside the ELF file produced by the compiler. It could be that for some data layouts the array size is recorded in an unsupported way, or is reported to be 1.

    The easiest way to track the root cause would be to create a new project from scratch, copy the minimal repro code there, verify that the problem still persists, and then attach:

    1. The source file or the code snippet
    2. The exact ELF file used for debugging (typically ProjectName.elf or ProjectName without extension)

    You can also have a quick peek into the debugging symbols by running arm-none-eabi-objdump.exe -g <ELF file> (objdump is a part of the GCC for ARM toolchain and will also work with Keil executables). If the array definition does not mention the size, or the size is 1, VisualGDB would not have sufficient information to display the entire array.

    #33899
    murrellr
    Participant

    Attached is a short source code file and elf file.  The array under test is “int arry[10];”.  I tried many command line switches to Keil armclang and armlink executables but could not get Live Watch to display “arry”.

     

    Attachments:
    You must be logged in to view attached files.
    #33905
    support
    Keymaster

    Thanks, we have reproduced and fixed the problem. Indeed, the Keil compiler was reporting the array size in a slightly different format from the one expected by VisualGDB. Please try this build: VisualGDB-5.6.109.4825.msi

    #33910
    murrellr
    Participant

    Thank you for your quick response, but this version causes my build to fail.  We are using armasm to build assembly language files.  when armasm runs, it returns the following error:

    Fatal error: A3900U: Unrecognized option ‘-asm=auto’.

    The argument ” -masm=auto ” is being added to the command line.

     

    #33911
    support
    Keymaster

    Sorry about that. The new build came from our development branch that was recently updated to support the new built-in ARMClang assembler, and it looks like it was adding armclang-specific flags to the legacy armasm executable. We have fixed it in the following build: VisualGDB-5.6.109.4826.msi

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.