mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
* gdb.python/py-symbol.exp: Use lookup_global_symbol for tests
before inferior is started.
This commit is contained in:
parent
1a119f3613
commit
09fa21bd6f
@ -1,3 +1,8 @@
|
||||
2012-02-08 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb.python/py-symbol.exp: Use lookup_global_symbol for tests
|
||||
before inferior is started.
|
||||
|
||||
2012-02-07 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb.python/py-symbol.exp: Test Symbol.needs_frame and
|
||||
|
@ -42,17 +42,18 @@ gdb_py_test_silent_cmd "python main_func = gdb.lookup_global_symbol(\"main\")" "
|
||||
gdb_test "python print main_func.is_function" "True" "Test main_func.is_function"
|
||||
gdb_test "python print gdb.lookup_global_symbol(\"junk\")" "None" "Test lookup_global_symbol(\"junk\")"
|
||||
|
||||
gdb_test "python print gdb.lookup_symbol('main')\[0\].value()" "$hex .main." \
|
||||
gdb_test "python print gdb.lookup_global_symbol('main').value()" "$hex .main." \
|
||||
"print value of main"
|
||||
|
||||
set qq_line [gdb_get_line_number "line of qq"]
|
||||
gdb_test "python print gdb.lookup_symbol('qq')\[0\].line" "$qq_line" \
|
||||
gdb_test "python print gdb.lookup_global_symbol('qq').line" "$qq_line" \
|
||||
"print line number of qq"
|
||||
|
||||
gdb_test "python print gdb.lookup_symbol('qq')\[0\].value()" "72" \
|
||||
gdb_test "python print gdb.lookup_global_symbol('qq').value()" "72" \
|
||||
"print value of qq"
|
||||
|
||||
gdb_test "python print gdb.lookup_symbol('qq')\[0\].needs_frame" "False" \
|
||||
gdb_test "python print gdb.lookup_global_symbol('qq').needs_frame" \
|
||||
"False" \
|
||||
"print whether qq needs a frame"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user