4b32ca3777b4ffea020e206da0d510e0e7271c45
[platform/framework/web/crosswalk.git] / src / native_client / tests / gdb / call_from_gdb.py
1 # -*- python -*-
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 from gdb_test import AssertEquals
7 import gdb_test
8
9
10 def test(gdb):
11   gdb.Command('break main')
12   gdb.ResumeAndExpectStop('continue', 'breakpoint-hit')
13   AssertEquals(gdb.Eval('test_call_from_gdb(1)'), '3')
14   AssertEquals(gdb.Eval('global_var'), '2')
15
16
17 if __name__ == '__main__':
18   gdb_test.RunTest(test, 'call_from_gdb')