• While I'm searching for a suitable gdb tutorial or suggested command line instruction set,

    I have made a bit of progress with attaching the gdb process, but I'm not sure this is going to get me to setting breakpoints within the .c source, similar to how one might debug a Visual Studio C#/C/CPP project.

    From the web page content, link post #1, my mental model is that the .c source seen within the VSCode app would be the launch point to start a main.c file there. Several failed attempts at tasks.json and launch.json
    left me a bit bewildered, and had gotten to the hardware debug stage with SEGGER and SWD. This still seems to be the subsequent next step, before gaining the experience debugging with the Espruino Linux executable, which should be first, shouldn't it?


    For example, should I need to set a BP at (inside fcn):

    L958 jshardware.c
    JsSysTime jshGetSystemTime()

    what is the process to get from Javascript instruction

    https://www.espruino.com/Reference#l__gl­obal_getTime

    presumeably run from the Espruino Linux exectuable running inside the VSCode Terminal, through to the call

    jswrap_interactive.c#L362 on to the call to jshGetSystemTime()



    Still seeking the solution there, maybe sample tasks.json and launch.json are needed, but in the meantime:

    Entry point: 0x26554
            0x00026000 - 0x0006ace0 is .text
            0x0006ace0 - 0x0006ad10 is .sdh_ble_observers
            0x0006ad10 - 0x0006ad30 is .sdh_soc_observers
            0x0006ad30 - 0x0006ad50 is .sdh_state_observers
            0x0006ad50 - 0x0006ad60 is .sdh_stack_observers
            0x0006ad60 - 0x0006ad68 is .sdh_req_observers
            0x0006ad68 - 0x0006ad7c is .nrf_queue
            0x0006ad7c - 0x0006ad84 is .ARM.exidx
            0x20003720 - 0x200039a0 is .data
            0x200039a0 - 0x200039b4 is .fs_data
            0x2003fff0 - 0x20040000 is .noinit
            0x200039b8 - 0x200332d0 is .bss
    (gdb) nexti
    0x000140d4 in ?? ()
    (gdb) nexti
    0x000140d6 in ?? ()
    (gdb) nexti
    0x000140d8 in ?? ()
    


    https://www.gnu.org/software/gdb/documen­tation/

    Although I'm not entirely certain at how to interpret the above, it appears the .elf file is being decoded and it appears the instruction(s) is being stepped into, until I learn the gdb commands, am I on the right path to get at the source? The above seems more of a hardware register debug process.

About

Avatar for Robin @Robin started