public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/28018] New: internal-error: Assertion 'TYPE_LENGTH(index_type) > 0' failed in create_range_type
@ 2021-06-27 11:00 vsfos at foxmail dot com
  2021-06-27 11:03 ` [Bug breakpoints/28018] " simark at simark dot ca
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: vsfos at foxmail dot com @ 2021-06-27 11:00 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28018

            Bug ID: 28018
           Summary: internal-error: Assertion 'TYPE_LENGTH(index_type) >
                    0' failed in create_range_type
           Product: gdb
           Version: 10.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: breakpoints
          Assignee: unassigned at sourceware dot org
          Reporter: vsfos at foxmail dot com
  Target Milestone: ---

I'm using arm-none-eabi toolchain from ARM to develop a program for a CortexM
device. And while debugging the program, failure assertion in create_range_type
will occur if some breakpoints are triggered. But some other breakpoints are
good.

The toolchain is at:
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads,
Version 10-2020-q4-major. And the debug environment is vscode(with cortex-debug
extension) + arm-none-eabi-gdb + jlink.

Debug console output:
Please check OUTPUT tab (Adapter Output) for output from JLinkGDBServerCL.exe
Launching server: "JLinkGDBServerCL.exe" "-if" "swd" "-port" "50000" "-swoport"
"50001" "-telnetport" "50002" "-device" "Cortex-M4"
Launching GDB: "arm-none-eabi-gdb.exe" "-q" "--interpreter=mi2"
undefinedC:\Program Files (x86)\GNU Arm Embedded Toolchain\10
2020-q4-major\bin\arm-none-eabi-gdb.exe: warning: Couldn't determine a path for
the index cache directory.
Reading symbols from
Z:\vsf\example\template\project\cmake\aic8800\build\vsf_template.elf...
vsf_arch_sleep (mode=0) at
z:/vsf/source/utilities/compiler/arm/3rd-party/CMSIS/CMSIS/Core/Include/cmsis_gcc.h:348
348     
Not implemented stop reason (assuming exception): undefined

Breakpoint 1, __vsf_debug_stream_on_rx () at
Z:/vsf/source/hal/driver/AIC/AIC8800/debug_uart/debug_uart.c:75
75              ch = stdio_uart_rxdata_getf();

Program
 received signal SIGTRAP, Trace/breakpoint trap.
vsf_arch_sleep (mode=0) at
z:/vsf/source/utilities/compiler/arm/3rd-party/CMSIS/CMSIS/Core/Include/cmsis_gcc.h:348
348     

Breakpoint 3, vsh_main (argc=0, argv=0x100044) at
Z:/vsf/source/shell/sys/linux/port/busybox/shell/vsh.c:255
255                 switch (ch) {
/mnt/workspace/workspace/GCC-10-pipeline/jenkins-GCC-10-pipeline-48_20201124_1606180641/src/gdb/gdb/gdbtypes.c:931:
internal-error: type* create_range_type(type*, type*, const dynamic_prop*,
const dynamic_prop*, LONGEST): Assertion `TYPE_LENGTH (index_type) > 0' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

Quit this debugging session? 
(y or n) [answered Y; input not from terminal]

This is a bug, please report it.
  For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.

/mnt/workspace/workspace/GCC-10-pipeline/jenkins-GCC-10-pipeline-48_20201124_1606180641/src/gdb/gdb/gdbtypes.c:931:
internal-error: type* create_range_type(type*, type*, const dynamic_prop*,
const dynamic_prop*, LONGEST): Assertion `TYPE_LENGTH (index_type) > 0' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

Create a core file of GDB? 
(y or n) [answered Y; input not from terminal]

The console information tells me to report the bug here.

And the output from Jlink GDB server:
SEGGER J-Link GDB Server V7.22b Command Line Version

JLinkARM.dll V7.22b (DLL compiled Jun 17 2021 17:22:49)

Command line: -if swd -port 50000 -swoport 50001 -telnetport 50002 -device
Cortex-M4
-----GDB Server start settings-----
GDBInit file:                  none
GDB Server Listening port:     50000
SWO raw output listening port: 50001
Terminal I/O port:             50002
Accept remote connection:      localhost only
Generate logfile:              off
Verify download:               off
Init regs on start:            off
Silent mode:                   off
Single run mode:               off
Target connection timeout:     0 ms
------J-Link related settings------
J-Link Host interface:         USB
J-Link script:                 none
J-Link settings file:          none
------Target related settings------
Target device:                 Cortex-M4
Target interface:              SWD
Target interface speed:        4000kHz
Target endian:                 little

Connecting to J-Link...
J-Link is connected.
Firmware: J-Link V10 compiled Jun 17 2021 16:40:36
Hardware: V10.10
S/N: 260117558
OEM: SEGGER-EDU
Feature(s): FlashBP, GDB
Checking target voltage...
Target voltage: 4.16 V
Listening on TCP/IP port 50000
Connecting to target...
Connected to target
Waiting for GDB connection...Connected to 127.0.0.1
Reading all registers
Read 4 bytes @ address 0x0809A08E (Data = 0xBA404770)
Read 2 bytes @ address 0x0809A08E (Data = 0x4770)
Reading 64 bytes @ address 0x0809A080
Received monitor command: halt
Halting target CPU...
...Target halted (PC = 0x0809A08E)
Reading 64 bytes @ address 0x0809A480
Read 4 bytes @ address 0x0809A4EC (Data = 0x001A1DF0)
Read 2 bytes @ address 0x0809A4CC (Data = 0xF88D)
Reading 64 bytes @ address 0x08001CC0
Read 2 bytes @ address 0x08001CE2 (Data = 0xF0ED)
Read 4 bytes @ address 0x080AD622 (Data = 0xB508BD08)
Reading 64 bytes @ address 0x080AD600
Reading 64 bytes @ address 0x001C7EC0
Read 4 bytes @ address 0x080AD62A (Data = 0x4770BD08)
Read 4 bytes @ address 0x080AD69A (Data = 0xB5F0E7FA)
Reading 64 bytes @ address 0x080AD680
Read 4 bytes @ address 0x080AD342 (Data = 0xB158BD08)
Reading 64 bytes @ address 0x080AD300
Reading 64 bytes @ address 0x080AD340
Read 4 bytes @ address 0x08126CD8 (Data = 0xE7F23601)
Read 4 bytes @ address 0x0800021E (Data = 0x00290020)
Reading 64 bytes @ address 0x080001C0
Read 4 bytes @ address 0x08000238 (Data = 0x001C7F00)
Read 4 bytes @ address 0x0800022E (Data = 0x00000008)
Reading register (MSP = 0x  1C7ED0)
Reading register (PSP = 0x       0)
Reading register (PRIMASK = 0x       0)
Reading register (BASEPRI = 0x       0)
Reading register (FAULTMASK = 0x       0)
Reading register (CONTROL = 0x       0)
Reading register (FPSCR = 0x       0)
Reading register (s0 = 0x       0)
Reading register (s1 = 0x       0)
Reading register (s2 = 0x       0)
Reading register (s3 = 0x       0)
Reading register (s4 = 0x       0)
Reading register (s5 = 0x       0)
Reading register (s6 = 0x       0)
Reading register (s7 = 0x       0)
Reading register (s8 = 0x       0)
Reading register (s9 = 0x       0)
Reading register (s10 = 0x       0)
Reading register (s11 = 0x       0)
Reading register (s12 = 0x       0)
Reading register (s13 = 0x       0)
Reading register (s14 = 0x       0)
Reading register (s15 = 0x       0)
Reading register (s16 = 0x       0)
Reading register (s17 = 0x       0)
Reading register (s18 = 0x       0)
Reading register (s19 = 0x       0)
Reading register (s20 = 0x       0)
Reading register (s21 = 0x       0)
Reading register (s22 = 0x       0)
Reading register (s23 = 0x       0)
Reading register (s24 = 0x       0)
Reading register (s25 = 0x       0)
Reading register (s26 = 0x       0)
Reading register (s27 = 0x       0)
Reading register (s28 = 0x       0)
Reading register (s29 = 0x       0)
Reading register (s30 = 0x       0)
Reading register (s31 = 0x       0)
Reading register (d0 = 0x       0)
Reading register (d1 = 0x       0)
Reading register (d2 = 0x       0)
Reading register (d3 = 0x       0)
Reading register (d4 = 0x       0)
Reading register (d5 = 0x       0)
Reading register (d6 = 0x       0)
Reading register (d7 = 0x       0)
Reading register (d8 = 0x       0)
Reading register (d9 = 0x       0)
Reading register (d10 = 0x       0)
Reading register (d11 = 0x       0)
Reading register (d12 = 0x       0)
Reading register (d13 = 0x       0)
Reading register (d14 = 0x       0)
Reading register (d15 = 0x       0)
Setting breakpoint @ address 0x08001CE2, Size = 2, BPHandle = 0x0001
Setting breakpoint @ address 0x0809A4CC, Size = 2, BPHandle = 0x0002
Starting target CPU...
...Breakpoint reached @ address 0x0809A4CC
Reading all registers
Removing breakpoint @ address 0x08001CE2, Size = 2
Removing breakpoint @ address 0x0809A4CC, Size = 2
Read 4 bytes @ address 0x0809A4CC (Data = 0x3007F88D)
Read 2 bytes @ address 0x0809A4CC (Data = 0xF88D)
Read 2 bytes @ address 0x0809A4CE (Data = 0x3007)
Reading 64 bytes @ address 0x0809A480
Read 4 bytes @ address 0x0809A4EC (Data = 0x001A1DF0)
Reading 64 bytes @ address 0x0809A4C0
Reading register (MSP = 0x  1C7E98)
Reading register (PSP = 0x       0)
Reading register (PRIMASK = 0x       0)
Reading register (BASEPRI = 0x       0)
Reading register (FAULTMASK = 0x       0)
Reading register (CONTROL = 0x       0)
Reading register (FPSCR = 0x       0)
Reading register (s0 = 0x       0)
Reading register (s1 = 0x       0)
Reading register (s2 = 0x       0)
Reading register (s3 = 0x       0)
Reading register (s4 = 0x       0)
Reading register (s5 = 0x       0)
Reading register (s6 = 0x       0)
Reading register (s7 = 0x       0)
Reading register (s8 = 0x       0)
Reading register (s9 = 0x       0)
Reading register (s10 = 0x       0)
Reading register (s11 = 0x       0)
Reading register (s12 = 0x       0)
Reading register (s13 = 0x       0)
Reading register (s14 = 0x       0)
Reading register (s15 = 0x       0)
Reading register (s16 = 0x       0)
Reading register (s17 = 0x       0)
Reading register (s18 = 0x       0)
Reading register (s19 = 0x       0)
Reading register (s20 = 0x       0)
Reading register (s21 = 0x       0)
Reading register (s22 = 0x       0)
Reading register (s23 = 0x       0)
Reading register (s24 = 0x       0)
Reading register (s25 = 0x       0)
Reading register (s26 = 0x       0)
Reading register (s27 = 0x       0)
Reading register (s28 = 0x       0)
Reading register (s29 = 0x       0)
Reading register (s30 = 0x       0)
Reading register (s31 = 0x       0)
Reading register (d0 = 0x       0)
Reading register (d1 = 0x       0)
Reading register (d2 = 0x       0)
Reading register (d3 = 0x       0)
Reading register (d4 = 0x       0)
Reading register (d5 = 0x       0)
Reading register (d6 = 0x       0)
Reading register (d7 = 0x       0)
Reading register (d8 = 0x       0)
Reading register (d9 = 0x       0)
Reading register (d10 = 0x       0)
Reading register (d11 = 0x       0)
Reading register (d12 = 0x       0)
Reading register (d13 = 0x       0)
Reading register (d14 = 0x       0)
Reading register (d15 = 0x       0)
Reading 64 bytes @ address 0x001C7E80
Read 4 bytes @ address 0x080AAF72 (Data = 0x4B04E7F9)
Reading 64 bytes @ address 0x080AAF40
Read 4 bytes @ address 0x080AAF8A (Data = 0x90384004)
Read 4 bytes @ address 0x001C7ECC (Data = 0x61000000)
Reading 64 bytes @ address 0x001C7EC0
Read 4 bytes @ address 0x0809A08E (Data = 0xBA404770)
Reading 64 bytes @ address 0x0809A080
Read 4 bytes @ address 0x080AD622 (Data = 0xB508BD08)
Reading 64 bytes @ address 0x080AD600
Read 4 bytes @ address 0x080AD62A (Data = 0x4770BD08)
Read 4 bytes @ address 0x080AD69A (Data = 0xB5F0E7FA)
Reading 64 bytes @ address 0x080AD680
Read 4 bytes @ address 0x080AD342 (Data = 0xB158BD08)
Reading 64 bytes @ address 0x080AD300
Reading 64 bytes @ address 0x080AD340
Read 4 bytes @ address 0x08126CD8 (Data = 0xE7F23601)
Read 4 bytes @ address 0x0800021E (Data = 0x00290020)
Reading 64 bytes @ address 0x080001C0
Read 4 bytes @ address 0x08000238 (Data = 0x001C7F00)
Read 4 bytes @ address 0x0800022E (Data = 0x00000008)
Setting breakpoint @ address 0x08001CE2, Size = 2, BPHandle = 0x0003
Performing single step...
...Target halted (DBGRQ, PC = 0x0809A4D0)
Reading all registers
Read 4 bytes @ address 0x0809A4D0 (Data = 0xF10D2201)
Read 2 bytes @ address 0x0809A4D0 (Data = 0x2201)
Reading 64 bytes @ address 0x0809A480
Read 4 bytes @ address 0x0809A4EC (Data = 0x001A1DF0)
Reading 64 bytes @ address 0x0809A4C0
Removing breakpoint @ address 0x08001CE2, Size = 2
Read 4 bytes @ address 0x0809A4D0 (Data = 0xF10D2201)
Read 2 bytes @ address 0x0809A4D0 (Data = 0x2201)
Read 4 bytes @ address 0x0809A4EC (Data = 0x001A1DF0)
Reading register (MSP = 0x  1C7E98)
Reading register (PSP = 0x       0)
Reading register (PRIMASK = 0x       0)
Reading register (BASEPRI = 0x       0)
Reading register (FAULTMASK = 0x       0)
Reading register (CONTROL = 0x       0)
Reading register (FPSCR = 0x       0)
Reading register (s0 = 0x       0)
Reading register (s1 = 0x       0)
Reading register (s2 = 0x       0)
Reading register (s3 = 0x       0)
Reading register (s4 = 0x       0)
Reading register (s5 = 0x       0)
Reading register (s6 = 0x       0)
Reading register (s7 = 0x       0)
Reading register (s8 = 0x       0)
Reading register (s9 = 0x       0)
Reading register (s10 = 0x       0)
Reading register (s11 = 0x       0)
Reading register (s12 = 0x       0)
Reading register (s13 = 0x       0)
Reading register (s14 = 0x       0)
Reading register (s15 = 0x       0)
Reading register (s16 = 0x       0)
Reading register (s17 = 0x       0)
Reading register (s18 = 0x       0)
Reading register (s19 = 0x       0)
Reading register (s20 = 0x       0)
Reading register (s21 = 0x       0)
Reading register (s22 = 0x       0)
Reading register (s23 = 0x       0)
Reading register (s24 = 0x       0)
Reading register (s25 = 0x       0)
Reading register (s26 = 0x       0)
Reading register (s27 = 0x       0)
Reading register (s28 = 0x       0)
Reading register (s29 = 0x       0)
Reading register (s30 = 0x       0)
Reading register (s31 = 0x       0)
Reading register (d0 = 0x       0)
Reading register (d1 = 0x       0)
Reading register (d2 = 0x       0)
Reading register (d3 = 0x       0)
Reading register (d4 = 0x       0)
Reading register (d5 = 0x       0)
Reading register (d6 = 0x       0)
Reading register (d7 = 0x       0)
Reading register (d8 = 0x       0)
Reading register (d9 = 0x       0)
Reading register (d10 = 0x       0)
Reading register (d11 = 0x       0)
Reading register (d12 = 0x       0)
Reading register (d13 = 0x       0)
Reading register (d14 = 0x       0)
Reading register (d15 = 0x       0)
Reading 64 bytes @ address 0x001C7E80
Read 4 bytes @ address 0x080AAF72 (Data = 0x4B04E7F9)
Reading 64 bytes @ address 0x080AAF40
Read 4 bytes @ address 0x080AAF8A (Data = 0x90384004)
Read 4 bytes @ address 0x001C7ECC (Data = 0x61000000)
Reading 64 bytes @ address 0x001C7EC0
Read 4 bytes @ address 0x0809A08E (Data = 0xBA404770)
Reading 64 bytes @ address 0x0809A080
Read 4 bytes @ address 0x080AD622 (Data = 0xB508BD08)
Reading 64 bytes @ address 0x080AD600
Read 4 bytes @ address 0x080AD62A (Data = 0x4770BD08)
Read 4 bytes @ address 0x080AD69A (Data = 0xB5F0E7FA)
Reading 64 bytes @ address 0x080AD680
Read 4 bytes @ address 0x080AD342 (Data = 0xB158BD08)
Reading 64 bytes @ address 0x080AD300
Reading 64 bytes @ address 0x080AD340
Read 4 bytes @ address 0x08126CD8 (Data = 0xE7F23601)
Read 4 bytes @ address 0x0800021E (Data = 0x00290020)
Reading 64 bytes @ address 0x080001C0
Read 4 bytes @ address 0x08000238 (Data = 0x001C7F00)
Read 4 bytes @ address 0x0800022E (Data = 0x00000008)
Setting breakpoint @ address 0x08001CE2, Size = 2, BPHandle = 0x0004
Starting target CPU...
Debugger requested to halt target...
...Target halted (PC = 0x0809A08E)
Reading all registers
Removing breakpoint @ address 0x08001CE2, Size = 2
Read 4 bytes @ address 0x0809A08E (Data = 0xBA404770)
Read 2 bytes @ address 0x0809A08E (Data = 0x4770)
Reading 64 bytes @ address 0x0809A080
Reading 64 bytes @ address 0x080B1D00
Read 2 bytes @ address 0x080B1D76 (Data = 0xF89D)
Setting breakpoint @ address 0x08001CE2, Size = 2, BPHandle = 0x0005
Setting breakpoint @ address 0x080B1D76, Size = 2, BPHandle = 0x0006
Starting target CPU...
...Breakpoint reached @ address 0x080B1D76
Reading all registers
Removing breakpoint @ address 0x08001CE2, Size = 2
Removing breakpoint @ address 0x080B1D76, Size = 2
Read 4 bytes @ address 0x080B1D76 (Data = 0x3007F89D)
Read 2 bytes @ address 0x080B1D76 (Data = 0xF89D)
Read 2 bytes @ address 0x080B1D78 (Data = 0x3007)
Reading 64 bytes @ address 0x080B1D00
Reading register (MSP = 0x  101030)
Reading register (PSP = 0x       0)
Reading register (PRIMASK = 0x       0)
Reading register (BASEPRI = 0x       0)
Reading register (FAULTMASK = 0x       0)
Reading register (CONTROL = 0x       0)
Reading register (FPSCR = 0x       0)
Reading register (s0 = 0x       0)
Reading register (s1 = 0x       0)
Reading register (s2 = 0x       0)
Reading register (s3 = 0x       0)
Reading register (s4 = 0x       0)
Reading register (s5 = 0x       0)
Reading register (s6 = 0x       0)
Reading register (s7 = 0x       0)
Reading register (s8 = 0x       0)
Reading register (s9 = 0x       0)
Reading register (s10 = 0x       0)
Reading register (s11 = 0x       0)
Reading register (s12 = 0x       0)
Reading register (s13 = 0x       0)
Reading register (s14 = 0x       0)
Reading register (s15 = 0x       0)
Reading register (s16 = 0x       0)
Reading register (s17 = 0x       0)
Reading register (s18 = 0x       0)
Reading register (s19 = 0x       0)
Reading register (s20 = 0x       0)
Reading register (s21 = 0x       0)
Reading register (s22 = 0x       0)
Reading register (s23 = 0x       0)
Reading register (s24 = 0x       0)
Reading register (s25 = 0x       0)
Reading register (s26 = 0x       0)
Reading register (s27 = 0x       0)
Reading register (s28 = 0x       0)
Reading register (s29 = 0x       0)
Reading register (s30 = 0x       0)
Reading register (s31 = 0x       0)
Reading register (d0 = 0x       0)
Reading register (d1 = 0x       0)
Reading register (d2 = 0x       0)
Reading register (d3 = 0x       0)
Reading register (d4 = 0x       0)
Reading register (d5 = 0x       0)
Reading register (d6 = 0x       0)
Reading register (d7 = 0x       0)
Reading register (d8 = 0x       0)
Reading register (d9 = 0x       0)
Reading register (d10 = 0x       0)
Reading register (d11 = 0x       0)
Reading register (d12 = 0x       0)
Reading register (d13 = 0x       0)
Reading register (d14 = 0x       0)
Reading register (d15 = 0x       0)
Reading 64 bytes @ address 0x00101140
Read 4 bytes @ address 0x080B1A08 (Data = 0xBF00BD38)
Reading 64 bytes @ address 0x080B19C0
Read 4 bytes @ address 0x080B1A0E (Data = 0xB570001A)
Reading 64 bytes @ address 0x00101180
GDB closed TCP/IP connection (Socket 964)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-10-28 21:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-27 11:00 [Bug breakpoints/28018] New: internal-error: Assertion 'TYPE_LENGTH(index_type) > 0' failed in create_range_type vsfos at foxmail dot com
2021-06-27 11:03 ` [Bug breakpoints/28018] " simark at simark dot ca
2021-06-27 11:13 ` vsfos at foxmail dot com
2021-06-27 23:57 ` vsfos at foxmail dot com
2021-06-30  7:17 ` vsfos at foxmail dot com
2021-06-30  8:14 ` vsfos at foxmail dot com
2021-06-30 11:28 ` vsfos at foxmail dot com
2021-06-30 12:41 ` simark at simark dot ca
2021-10-19  2:01 ` kadler at us dot ibm.com
2021-10-25 18:05 ` kadler at us dot ibm.com
2021-10-28 19:10 ` kadler at us dot ibm.com
2021-10-28 19:41 ` simon.marchi at polymtl dot ca
2021-10-28 21:16 ` kadler at us dot ibm.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).