srinivas@srinivas-desktop:~/Desktop/IMSPRIME-ESP32$ ./xtensa-esp32-elf-gdb build/IMSPRIME.elf
Python Exception <type 'exceptions.ImportError'> No module named gdb:
./xtensa-esp32-elf-gdb: warning:
Could not load the Python gdb module from `/builds/idf/crosstool-NG/builds/xtensa-esp32-elf/share/gdb/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.
GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-build_pc-linux-gnu --target=xtensa-esp32-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<
http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<
http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from build/IMSPRIME.elf...done.
(gdb) list *0x4008ed0e
0x4008ed0e is in xQueueGenericCreate (/home/srinivas/Desktop/IMSPRIME-ESP32/components/freertos/queue.c:391).
386 /* Allocate enough space to hold the maximum number of items that
387 can be in the queue at any time. */
388 xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
389 }
390
391 pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) + xQueueSizeInBytes );
392
393 if( pxNewQueue != NULL )
394 {
395 /* Jump past the queue structure to find the location of the queue
(gdb) q
srinivas@srinivas-desktop:~/Desktop/IMSPRIME-ESP32$ ./xtensa-esp32-elf-gdb build/IMSPRIME.elf
Python Exception <type 'exceptions.ImportError'> No module named gdb:
./xtensa-esp32-elf-gdb: warning:
Could not load the Python gdb module from `/builds/idf/crosstool-NG/builds/xtensa-esp32-elf/share/gdb/python'.
Limited Python support is available from the _gdb module.
Suggest passing --data-directory=/path/to/gdb/data-directory.
GNU gdb (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 7.10
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <
http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-build_pc-linux-gnu --target=xtensa-esp32-elf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<
http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<
http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from build/IMSPRIME.elf...done.
(gdb) list *0x4011972a
0x4011972a is in uart_pattern_queue_reset (/home/srinivas/Desktop/IMSPRIME-ESP32/components/driver/uart.c:441).
436 esp_err_t uart_pattern_queue_reset(uart_port_t uart_num, int queue_length)
437 {
438 UART_CHECK((uart_num < UART_NUM_MAX), "uart_num error", ESP_FAIL);
439 UART_CHECK((p_uart_obj[uart_num]), "uart driver error", ESP_ERR_INVALID_STATE);
440
441 int* pdata = (int*) malloc(queue_length * sizeof(int));
442 if(pdata == NULL) {
443 return ESP_ERR_NO_MEM;
444 }
445 UART_ENTER_CRITICAL(&uart_spinlock[uart_num]);
(gdb)
446 int* ptmp = p_uart_obj[uart_num]->rx_pattern_pos.data;
447 p_uart_obj[uart_num]->rx_pattern_pos.data = pdata;
448 p_uart_obj[uart_num]->rx_pattern_pos.len = queue_length;
449 p_uart_obj[uart_num]->rx_pattern_pos.rd = 0;
450 p_uart_obj[uart_num]->rx_pattern_pos.wr = 0;
451 UART_EXIT_CRITICAL(&uart_spinlock[uart_num]);
452 free(ptmp);
453 return ESP_OK;
454 }
455
(gdb) list *0x400904ad
0x400904ad is in xTaskCreatePinnedToCore (/home/srinivas/Desktop/IMSPRIME-ESP32/components/freertos/tasks.c:806).
801 #else /* portSTACK_GROWTH */
802 {
803 StackType_t *pxStack;
804
805 /* Allocate space for the stack used by the task being created. */
806 pxStack = ( StackType_t * ) pvPortMallocStackMem( ( ( ( size_t ) usStackDepth ) * sizeof( StackType_t ) ) ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */
807
808 if( pxStack != NULL )uart_obj[uart_num] = (uart_obj_t*) calloc(1, sizeof(uart_obj_t));
809 {
810 /* Allocate space for the TCB. */
(gdb) q
srinivas@srinivas-desktop:~/Desktop/IMSPRIME-ESP32$ echo $IDF_PATH
/home/srinivas/Desktop/Testidf/esp-idf
srinivas@srinivas-desktop:~/Desktop/IMSPRIME-ESP32$ cd /home/srinivas/Desktop/Testidf/esp-idf
srinivas@srinivas-desktop:~/Desktop/Testidf/esp-idf$ git describe
v3.1.2
srinivas@srinivas-desktop:~/Desktop/Testidf/esp-idf$