diff options
author | Siva Chandra Reddy <sivachandra@sourceware.org> | 2013-01-23 19:59:13 +0000 |
---|---|---|
committer | Siva Chandra Reddy <sivachandra@sourceware.org> | 2013-01-23 19:59:13 +0000 |
commit | bea883fd928f283b41d10b02f2b92f28bfb634cf (patch) | |
tree | 5ce9b05bc33513798f72a321846ef1da66bb2586 /gdb/testsuite | |
parent | 796a7ff8234cfaa8ad1ab884c1c8dafe29b18d42 (diff) | |
download | gdb-bea883fd928f283b41d10b02f2b92f28bfb634cf.zip gdb-bea883fd928f283b41d10b02f2b92f28bfb634cf.tar.gz gdb-bea883fd928f283b41d10b02f2b92f28bfb634cf.tar.bz2 |
Add a new class gdb.Architecture which exposes GDB's
internal representation of architecture via GDB Python API.
* Makefile.in: Add entries corresponding to the new file
python/py-arch.c.
* NEWS (Python Scripting): Add entries for the new class
gdb.Architecture and the new method gdb.Frame.architecture.
* python/py-arch.c: Implement gdb.Architecture class.
* python/py-frame.c (frapy_arch): Implement the method
gdb.Frame.architecture().
(frame_object_methods): Add 'architecture' to the method table.
* python/python-internal.h: Add declarations of new utility
functions.
* python/python.c (_initialize_python): Initialize
gdb.Architecture class.
* doc/gdb.texinfo (Architectures In Python): New sub-sub-section
describing the gdb.Architecture class.
(Frames In Python): Add description about the new method
gdb.Frame.architecture().
* testsuite/gdb.python/frame.exp: Add a test for
gdb.Frame.architecture() method.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-frame.exp | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 53f734f..3da0f06 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-01-23 Siva Chandra Reddy <sivachandra@google.com> + + * testsuite/gdb.python/frame.exp: Add a test for + gdb.Frame.architecture() method. + 2013-01-22 Pedro Alves <palves@redhat.com> * gdb.base/annota1.exp (signal sent): No longer expect diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp index aa4d937..806da94 100644 --- a/gdb/testsuite/gdb.python/py-frame.exp +++ b/gdb/testsuite/gdb.python/py-frame.exp @@ -38,6 +38,10 @@ gdb_breakpoint [gdb_get_line_number "Block break here."] gdb_continue_to_breakpoint "Block break here." gdb_py_test_silent_cmd "python bf1 = gdb.selected_frame ()" "get frame" 0 +# Test Frame.architecture() method. +gdb_py_test_silent_cmd "python show_arch_str = gdb.execute(\"show architecture\", to_string=True)" "show arch" 0 +gdb_test "python print bf1.architecture().name() in show_arch_str" "True" "test Frame.architecture()" + # First test that read_var is unaffected by PR 11036 changes. gdb_test "python print (bf1.read_var(\"i\"))" "\"stuff\"" "test i" gdb_test "python print (bf1.read_var(\"f\"))" "\"foo\"" "test f" |