File tree 2 files changed +46
-1
lines changed
2 files changed +46
-1
lines changed Original file line number Diff line number Diff line change @@ -906,7 +906,7 @@ impl<'tcx> StructMemberDescriptionFactory<'tcx> {
906
906
907
907
MemberDescription {
908
908
name : name,
909
- llvm_type : type_of:: type_of ( cx, fty) ,
909
+ llvm_type : type_of:: in_memory_type_of ( cx, fty) ,
910
910
type_metadata : type_metadata ( cx, fty, self . span ) ,
911
911
offset : offset,
912
912
flags : DIFlags :: FlagZero ,
Original file line number Diff line number Diff line change
1
+ // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ // compile-flags:-g
12
+
13
+ // === GDB TESTS ===================================================================================
14
+
15
+ // gdb-command:run
16
+
17
+ // gdb-command:print *a
18
+ // gdbg-check:$1 = {value = [...] "abc"}
19
+ // gdbr-check:$1 = unsized::Foo<[u8]> {value: [...]}
20
+
21
+ // gdb-command:print *b
22
+ // gdbg-check:$2 = {value = {value = [...] "abc"}}
23
+ // gdbr-check:$2 = unsized::Foo<unsized::Foo<[u8]>> {value: unsized::Foo<[u8]> {value: [...]}}
24
+
25
+
26
+ #![ feature( omit_gdb_pretty_printer_section) ]
27
+ #![ omit_gdb_pretty_printer_section]
28
+
29
+ struct Foo < T : ?Sized > {
30
+ value : T
31
+ }
32
+
33
+ fn main ( ) {
34
+ let foo: Foo < Foo < [ u8 ; 4 ] > > = Foo {
35
+ value : Foo {
36
+ value : * b"abc\0 "
37
+ }
38
+ } ;
39
+ let a: & Foo < [ u8 ] > = & foo. value ;
40
+ let b: & Foo < Foo < [ u8 ] > > = & foo;
41
+
42
+ zzz ( ) ; // #break
43
+ }
44
+
45
+ fn zzz ( ) { ( ) }
You can’t perform that action at this time.
0 commit comments