Skip to content

Commit

Permalink
debuginfo: Add test case for limited debuginfo
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Mar 6, 2014
1 parent e15fd40 commit a5b4d94
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions src/test/debug-info/limited-debuginfo.rs
@@ -0,0 +1,52 @@
// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-android: FIXME(#10381)

// compile-flags:-g1

// Make sure functions have proper names
// debugger:info functions
// check:static void limited-debuginfo::main();
// check:static void limited-debuginfo::some_function();
// check:static void limited-debuginfo::some_other_function();
// check:static void limited-debuginfo::zzz();

// debugger:rbreak zzz
// debugger:run

// Make sure there is no information about locals
// debugger:finish
// debugger:info locals
// check:No locals.
// debugger:continue


#[allow(unused_variable)];

struct Struct {
a: i64,
b: i32
}

fn main() {
some_function(101, 202);
}


fn zzz() {()}

fn some_function(a: int, b: int) {
let some_variable = Struct { a: 11, b: 22 };
let some_other_variable = 23;
zzz();
}

fn some_other_function(a: int, b: int) -> bool { true }

5 comments on commit a5b4d94

@bors
Copy link
Contributor

@bors bors commented on a5b4d94 Mar 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at michaelwoerister@a5b4d94

@bors
Copy link
Contributor

@bors bors commented on a5b4d94 Mar 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging michaelwoerister/rust/limited-debuginfo = a5b4d94 into auto

@bors
Copy link
Contributor

@bors bors commented on a5b4d94 Mar 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

michaelwoerister/rust/limited-debuginfo = a5b4d94 merged ok, testing candidate = 14c6207

@bors
Copy link
Contributor

@bors bors commented on a5b4d94 Mar 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on a5b4d94 Mar 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 14c6207

Please sign in to comment.