Skip to content

Commit 83ada89

Browse files
---
yaml --- r: 63779 b: refs/heads/snap-stage3 c: 2f5e33d h: refs/heads/master i: 63777: e8e8d17 63775: 27622dd v: v3
1 parent 2cd6f41 commit 83ada89

File tree

4 files changed

+17
-30
lines changed

4 files changed

+17
-30
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 42dbae7f2a7dbdc414646e706eeffacdf7d4b338
4+
refs/heads/snap-stage3: 2f5e33d02f0103a40de2493f824627effaedc6e0
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/trans/debuginfo.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -559,31 +559,6 @@ impl StructContext {
559559
roundup(self.total_size, self.align)
560560
}
561561

562-
//fn verify_against_struct_or_tuple_type(&self, t: ty::t, ccx: &mut CrateContext) {
563-
// let repr = adt::represent_type(ccx, t);
564-
565-
// match *repr {
566-
// Univariant(*) =>
567-
// {
568-
// let size_with_alignment = self.get_total_size_with_alignment();
569-
570-
// if st.size != size_with_alignment {
571-
// ccx.sess.bug("StructContext(%s)::verify_against_struct_or_tuple_type:
572-
// invalid type size. Expected = %u, actual = %u",
573-
// st.size, size_with_alignment);
574-
// }
575-
576-
// if st.align != self.align {
577-
// ccx.sess.bug("StructContext(%s)::verify_against_struct_or_tuple_type:
578-
// invalid type alignment. Expected = %u, actual = %u",
579-
// st.align, self.align);
580-
// }
581-
// },
582-
// _ => ccx.sess.bug(fmt!("StructContext(%s)::verify_against_struct_or_tuple_type:
583-
// called with invalid type %?", self.name, t))
584-
// }
585-
//}
586-
587562
fn finalize(&self) -> DICompositeType {
588563
debug!("StructContext(%s)::finalize: total_size=%u, align=%u",
589564
self.name, self.total_size, self.align);

branches/snap-stage3/src/test/debug-info/reference-to-managed-basic.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
// xfail-win32 Broken because of LLVM bug: http://llvm.org/bugs/show_bug.cgi?id=16249
1212

13-
// Gdb doesn't know
14-
// about UTF-32 character encoding and will print a rust char as only
13+
// Gdb doesn't know about UTF-32 character encoding and will print a rust char as only
1514
// its numerical value.
1615

1716
// compile-flags:-Z extra-debug-info

branches/snap-stage3/src/test/debug-info/struct-with-destructor.rs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct WithDestructorGuarded {
4949

5050

5151
// The compiler adds a 'destructed' boolean field to structs implementing Drop. This field is used
52-
// at runtime to prevent finalize() to be executed more than once (see middle::trans::adt).
52+
// at runtime to prevent drop() to be executed more than once (see middle::trans::adt).
5353
// This field must be incorporated by the debug info generation. Otherwise the debugger assumes a
5454
// wrong size/layout for the struct.
5555
fn main() {
@@ -63,7 +63,20 @@ fn main() {
6363

6464
// If the destructor flag field is not incorporated into the debug info for 'WithDestructor'
6565
// then the debugger will have an invalid offset for the field 'guard' and thus should not be
66-
// able to read its value correctly.
66+
// able to read its value correctly (dots are padding bytes, D is the boolean destructor flag):
67+
//
68+
// NoDestructorGuarded = 0000....00000000FFFFFFFF
69+
// <--------------><------>
70+
// NoDestructor guard
71+
//
72+
//
73+
// withDestructorGuarded = 0000....00000000D.......FFFFFFFF
74+
// <--------------><------> // How debug info says it is
75+
// WithDestructor guard
76+
//
77+
// <----------------------><------> // How it actually is
78+
// WithDestructor guard
79+
//
6780
let withDestructor = WithDestructorGuarded {
6881
a: WithDestructor { x: 10, y: 20 },
6982
guard: -1

0 commit comments

Comments
 (0)