diff options
author | Doug Evans <dje@google.com> | 2014-12-08 08:50:48 -0800 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2014-12-08 08:50:48 -0800 |
commit | a0be3e44c7f510df608e4a480dd05c173ce280ce (patch) | |
tree | 639476193625c02332874a058e10ca327fad7007 /gdb/testsuite | |
parent | 137d04f77229e4e61098c5595a1edf70c3bc4d28 (diff) | |
download | binutils-a0be3e44c7f510df608e4a480dd05c173ce280ce.zip binutils-a0be3e44c7f510df608e4a480dd05c173ce280ce.tar.gz binutils-a0be3e44c7f510df608e4a480dd05c173ce280ce.tar.bz2 |
New "owner" attribute for gdb.Objfile.
gdb/ChangeLog:
* NEWS: Mention gdb.Objfile.owner.
* python/py-objfile.c (objfpy_get_owner): New function.
(objfile_getset): Add "owner".
gdb/doc/ChangeLog:
* python.texi (Objfiles In Python): Document Objfile.owner.
gdb/testsuite/ChangeLog:
* gdb.python/py-objfile.exp: Add tests for objfile.owner.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-objfile.exp | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c389d7d..0e973f7 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-12-08 Doug Evans <dje@google.com> + + * gdb.python/py-objfile.exp: Add tests for objfile.owner. + 2014-12-05 Yao Qi <yao@codesourcery.com> * gdb.guile/scm-error.exp: Remove the third argument to diff --git a/gdb/testsuite/gdb.python/py-objfile.exp b/gdb/testsuite/gdb.python/py-objfile.exp index 6c36f8e..f3a8a6c 100644 --- a/gdb/testsuite/gdb.python/py-objfile.exp +++ b/gdb/testsuite/gdb.python/py-objfile.exp @@ -76,6 +76,9 @@ if ![runto_main] { gdb_py_test_silent_cmd "python objfile = gdb.objfiles()\[0\]" \ "Get no-debug objfile file" 1 +gdb_test "python print (objfile.owner)" "None" \ + "Test owner of real objfile." + gdb_test "p main" "= {<text variable, no debug info>} $hex <main>" \ "print main without debug info" @@ -85,5 +88,8 @@ gdb_py_test_silent_cmd "python objfile.add_separate_debug_file(\"${binfile}\")" gdb_py_test_silent_cmd "python sep_objfile = gdb.objfiles()\[0\]" \ "Get separate debug info objfile" 1 +gdb_test "python print (sep_objfile.owner.filename)" "${testfile}2" \ + "Test owner of separate debug file" + gdb_test "p main" "= {int \\(\\)} $hex <main>" \ "print main with debug info" |