kistlin commented on issue #9200:
URL: https://github.com/apache/nuttx/issues/9200#issuecomment-1541396694

   @anjiahao1 just to be clear.
   
   My setup is running the GDB server on Windows native, to not deal with USB 
and WSL2.
   The GDB client runs in WSL2 (Ubuntu 22.04) and connects to the GDB server.
   
   I now tested the plugin on a native Linux. I see almost the same output as 
in the previous comment, when using the plugin on Windows.
   But for example no `ERROR: error in get_idx_from_pid return -2`.
   Fetching thread information on the command line seems to work.
   
   ```
   Loading RTOS plugin: /home/user/nuttx-project/nuttx/tools/jlink-nuttx.so...
   RTOS plugin (API v1.1) loaded successfully
   RTOS plugin: Loaded
   Received symbol: g_pidhash (0x24002968)
   Received symbol: g_npidhash (0x2400296C)
   Received symbol: g_tcbinfo (0x080D2BE0)
   Received symbol: g_readytorun (0x24002928)
   All mandatory symbols successfully loaded.
   Starting target CPU...
   Debugger requested to halt target...
   ...Target halted (PC = 0x0809EA92)
   WARNING: Failed to read memory @ address 0x010000FC
   ERROR: error in read tcbinfo_s reg_offs ret 0
   npidhash change from 0 to 128!
   Reading common registers: Read register 'r0' (4 bytes) from hardware: 
0x40130024
   Read register 'r1' (4 bytes) from hardware: 0x14000000
   Read register 'r2' (4 bytes) from hardware: 0xFBFFFFFF
   Read register 'r3' (4 bytes) from hardware: 0x00000000
   Read register 'r4' (4 bytes) from hardware: 0x65000000
   Read register 'r5' (4 bytes) from hardware: 0x00000000
   Read register 'r6' (4 bytes) from hardware: 0xC0400030
   Read register 'r7' (4 bytes) from hardware: 0x30BF0030
   Read register 'r8' (4 bytes) from hardware: 0x01000000
   Read register 'r9' (4 bytes) from hardware: 0x00000000
   Read register 'r10' (4 bytes) from hardware: 0xE2380000
   Read register 'r11' (4 bytes) from hardware: 0x00000000
   Read register 'r12' (4 bytes) from hardware: 0x4A000000
   Read register 'sp' (4 bytes) from hardware: 0x30BF0030
   Read register 'lr' (4 bytes) from hardware: 0x2FF00908
   Read register 'pc' (4 bytes) from hardware: 0x92EA0908
   Read register 'xpsr' (4 bytes) from hardware: 0x00000021
   Read 4 bytes @ address 0x0809EA92 (Data = 0xB083B480)
   Read 4 bytes @ address 0x0809F02E (Data = 0x6C3B4602)
   Reading 64 bytes @ address 0x3000BF80
   Reading 64 bytes @ address 0x3000BF00
   WARNING: Failed to read memory @ address 0x30047F1C
   ERROR: error in read tcb name return 0
   Reading common registers: ERROR: regread 0 regidx 0 error 1
   ERROR: Internal error: Register 'r0': RTOS plugin reports 0 bytes register 
size, while GDB Server expects 4 bytes
   Read register 'r0' (4 bytes) from hardware: 0x40130024
   ERROR: regread 0 regidx 1 error 1
   ERROR: Internal error: Register 'r1': RTOS plugin reports 0 bytes register 
size, while GDB Server expects 4 bytes
   Read register 'r1' (4 bytes) from hardware: 0x14000000
   ERROR: regread 0 regidx 2 error 1
   ERROR: Internal error: Register 'r2': RTOS plugin reports 0 bytes register 
size, while GDB Server expects 4 bytes
   Read register 'r2' (4 bytes) from hardware: 0xFBFFFFFF
   ERROR: regread 0 regidx 3 error 1
   ERROR: Internal error: Register 'r3': RTOS plugin reports 0 bytes register 
size, while GDB Server expects 4 bytes
   Read register 'r3' (4 bytes) from hardware: 0x00000000
   ERROR: regread 0 regidx 4 error 1
   ERROR: Internal error: Register 'r4': RTOS plugin reports 0 bytes register 
size, while GDB Server expects 4 bytes
   Read register 'r4' (4 bytes) from hardware: 0x65000000
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to