diff options
author | Pedro Alves <palves@redhat.com> | 2013-03-20 11:28:55 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-03-20 11:28:55 +0000 |
commit | 3f1175a995f09c90a2e026afae3602c33e1e3e19 (patch) | |
tree | 471394e7b6f936d8366b274d1713fa0318596ada /gdb/testsuite/gdb.trace/tfile.c | |
parent | 35a7120b8ccbd9e58daf8a9d108923a8cf4fdc98 (diff) | |
download | gdb-3f1175a995f09c90a2e026afae3602c33e1e3e19.zip gdb-3f1175a995f09c90a2e026afae3602c33e1e3e19.tar.gz gdb-3f1175a995f09c90a2e026afae3602c33e1e3e19.tar.bz2 |
tfile.exp: Test printing a non-const global that is not covered by the trace frame; test disassembling.
Make sure we don't fallback to printing the initial value of a
non-const variable in the executable.
Also make sure we can do 'disassemble', as another test that GDB is
able to read read-only parts from the executable (the existing test of
printing constglob also covers that case).
gdb/testsuite/
2013-03-20 Pedro Alves <palves@redhat.com>
Yao Qi <yao@codesourcery.com>
* gdb.trace/tfile.c: Add comments.
(nonconstglob): New global.
* gdb.trace/tfile.exp: Add comments. Test printing a non-const
global that is not covered by the trace frame. Test
disassembling.
Diffstat (limited to 'gdb/testsuite/gdb.trace/tfile.c')
-rw-r--r-- | gdb/testsuite/gdb.trace/tfile.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.trace/tfile.c b/gdb/testsuite/gdb.trace/tfile.c index 11c79d9..7c0c774 100644 --- a/gdb/testsuite/gdb.trace/tfile.c +++ b/gdb/testsuite/gdb.trace/tfile.c @@ -13,12 +13,18 @@ char trbuf[1000]; char *trptr; char *tfsizeptr; +/* These globals are put in the trace buffer. */ + int testglob = 31415; int testglob2 = 271828; +/* But these below are not. */ + const int constglob = 10000; +int nonconstglob = 14124; + int start_trace_file (char *filename) { |