Created attachment 14158
rustc debuginfo test sample #1
1. Compile the attached test file `rustc -g associated-types.rs`.
2. Run `gdb -x dbg.script ./associated-types`, dbg.script as follows:
~~~~
set charset UTF-8
show version
add-auto-load-safe-path /home/infinity0/rustc/./src/etc
set print pretty off
directory /home/infinity0/rustc/./src/etc
file /home/infinity0/rustc/build/armv7-unknown-linux-gnueabihf/test/debuginfo/associated-types.gdb/a
set language rust
break 'associated-types.rs':111
break 'associated-types.rs':118
break 'associated-types.rs':122
break 'associated-types.rs':130
break 'associated-types.rs':137
break 'associated-types.rs':140
run
print arg
continue
print inferred
print explicitly
continue
print arg
continue
print arg
continue
print a
print b
continue
print a
print b
continue
quit
~~~~
This works for all rustc versions (I was able to test 1.13 - 1.59) on gdb 10 but fails with SIGILL on gdb 11.2 armhf Debian.
Created attachment 14158
rustc debuginfo test sample #1
1. Compile the attached test file `rustc -g associated- types.rs` . types`, dbg.script as follows:
2. Run `gdb -x dbg.script ./associated-
~~~~ load-safe- path /home/infinity0 /rustc/ ./src/etc /rustc/ ./src/etc /rustc/ build/armv7- unknown- linux-gnueabihf /test/debuginfo /associated- types.gdb/ a types.rs' :111 types.rs' :118 types.rs' :122 types.rs' :130 types.rs' :137 types.rs' :140
set charset UTF-8
show version
add-auto-
set print pretty off
directory /home/infinity0
file /home/infinity0
set language rust
break 'associated-
break 'associated-
break 'associated-
break 'associated-
break 'associated-
break 'associated-
run
print arg
continue
print inferred
print explicitly
continue
print arg
continue
print arg
continue
print a
print b
continue
print a
print b
continue
quit
~~~~
This works for all rustc versions (I was able to test 1.13 - 1.59) on gdb 10 but fails with SIGILL on gdb 11.2 armhf Debian.
Other rustc debuginfo tests fail with other signals, SIGSEGV, SIGABRT, etc. More specific details here: https:/ /github. com/rust- lang/rust/ issues/ 96983