public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM]  gdb_7_2-branch: 2010-12-14  Yao Qi  <yao@codesourcery.com>
@ 2010-12-14 17:14 jkratoch
  0 siblings, 0 replies; only message in thread
From: jkratoch @ 2010-12-14 17:14 UTC (permalink / raw)
  To: archer-commits

The branch, gdb_7_2-branch has been updated
       via  67d41c5740f9041e3bdffb0b2b33d19a159d5acf (commit)
       via  70638ff1887512a0aac40f3e3bd9600975afa4bc (commit)
       via  2c487271754c50895ba17719f0561d20cf06594d (commit)
       via  f4a936f169cf0fef7f9d9376302e6d83a7523ca6 (commit)
       via  5edc3ddd045bc6d7dcdeb0aec301a9f3f419f86d (commit)
       via  a3ab7ec48d1fe5563a6415a7640b5a3d0a6f676e (commit)
      from  6ff9de0b1273f2ba406c58540efd498c78504498 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 67d41c5740f9041e3bdffb0b2b33d19a159d5acf
Author: qiyao <qiyao>
Date:   Tue Dec 14 01:11:00 2010 +0000

    2010-12-14  Yao Qi  <yao@codesourcery.com>
    
            Backport from mainline:
    
            2010-09-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
            * gdb.base/printcmds.exp (test_float_accepted): Import gdb_prompt.
            Move here, negate and extend by XFAIL the "p 0x1.1" test from ...
            (test_float_rejected): ... here.

commit 70638ff1887512a0aac40f3e3bd9600975afa4bc
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Tue Dec 14 00:00:03 2010 +0000

    *** empty log message ***

commit 2c487271754c50895ba17719f0561d20cf06594d
Author: Stan Shebs <shebs@apple.com>
Date:   Mon Dec 13 05:58:51 2010 +0000

    2010-12-12  Stan Shebs  <stan@codesourcery.com>
    
    	* value.c (value_of_internalvar): Add case for trace state
    	variables.
    
    	* gdb.trace/tsv.exp: Test print command on trace state variables.

commit f4a936f169cf0fef7f9d9376302e6d83a7523ca6
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Mon Dec 13 00:00:34 2010 +0000

    *** empty log message ***

commit 5edc3ddd045bc6d7dcdeb0aec301a9f3f419f86d
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Sun Dec 12 00:00:33 2010 +0000

    *** empty log message ***

commit a3ab7ec48d1fe5563a6415a7640b5a3d0a6f676e
Author: gdbadmin <gdbadmin@sourceware.org>
Date:   Sat Dec 11 00:00:03 2010 +0000

    *** empty log message ***

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog                        |    5 ++
 gdb/testsuite/ChangeLog              |   13 ++++++
 gdb/testsuite/gdb.base/printcmds.exp |   13 ++++++-
 gdb/testsuite/gdb.trace/tsv.exp      |   70 ++++++++++++++++++++++++++++++---
 gdb/value.c                          |   18 +++++++++
 gdb/version.in                       |    2 +-
 6 files changed, 112 insertions(+), 9 deletions(-)

First 500 lines of diff:
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 193998e..ef0b0a7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2010-12-12  Stan Shebs  <stan@codesourcery.com>
+
+	* value.c (value_of_internalvar): Add case for trace state
+	variables.
+
 2010-12-09  Marc Khouzam  <marc.khouzam@ericsson.com>
 
 	* mi/mi-parse.c (mi_parse): Wrong error message.
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 86286c4..93f1a88 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-14  Yao Qi  <yao@codesourcery.com>
+
+	Backport from mainline:
+
+	2010-09-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
+	* gdb.base/printcmds.exp (test_float_accepted): Import gdb_prompt.
+	Move here, negate and extend by XFAIL the "p 0x1.1" test from ... 
+	(test_float_rejected): ... here.
+
+2010-12-12  Stan Shebs  <stan@codesourcery.com>
+
+	* gdb.trace/tsv.exp: Test print command on trace state variables.
+
 2010-12-09  Tom Tromey  <tromey@redhat.com>
 
 	* gdb.base/interp.exp: Add regression test.
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index c602a8b..bc3cd6a 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -85,6 +85,18 @@ proc test_integer_literals_accepted {} {
     gdb_test "p 0b1111" " = 15"
     gdb_test "p 0B1111" " = 15"
     gdb_test "p -0b1111" " = -15"
+
+    # Test hexadecimal floating point.
+    set test "p 0x1.1"
+    gdb_test_multiple $test $test {
+	-re " = 1\\.0625\r\n$gdb_prompt $" {
+	    pass $test
+	}
+	-re "Invalid number \"0x1\\.1\"\\.\r\n$gdb_prompt $" {
+	    # Older glibc does not support hex float, newer does.
+	    xfail $test
+	}
+    }
 }
 
 proc test_character_literals_accepted {} {
@@ -128,7 +140,6 @@ proc test_integer_literals_rejected {} {
     test_print_reject "p 123DEADBEEF"
     test_print_reject "p 123foobar.bazfoo3"
     test_print_reject "p 123EEEEEEEEEEEEEEEEE33333k333"
-    test_print_reject "p 0x1.1"
     gdb_test "p 123.4+56.7" "180.(099\[0-9]*|100\[0-9\]*)" "check for floating addition"
 
     # Test various octal values.
diff --git a/gdb/testsuite/gdb.trace/tsv.exp b/gdb/testsuite/gdb.trace/tsv.exp
index 96c330b..7a80078 100644
--- a/gdb/testsuite/gdb.trace/tsv.exp
+++ b/gdb/testsuite/gdb.trace/tsv.exp
@@ -27,15 +27,10 @@ set srcfile ${testfile}.c
 set binfile $objdir/$subdir/tsv
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
 	  executable {debug nowarnings}] != "" } {
-    untested tracecmd.exp
+    untested tsv.exp
     return -1
 }
-gdb_reinitialize_dir $srcdir/$subdir
-
-# If testing on a remote host, download the source file.
-# remote_download host $srcdir/$subdir/$srcfile
-
-gdb_file_cmd $binfile
+gdb_load $binfile
 
 gdb_test "tvariable \$tvar1" \
   "Trace state variable \\\$tvar1 created, with initial value 0." \
@@ -72,6 +67,9 @@ gdb_test "info tvariables" \
 \\\$tvar3\[\t \]+1234567000000\[\t \]+.*<undefined>.*" \
   "List tvariables"
 
+gdb_test "print \$tvar2" " = void" \
+    "Print a trace state variable before run"
+
 gdb_test_no_output "delete tvariable \$tvar2" \
   "delete trace state variable"
 
@@ -91,4 +89,62 @@ gdb_test "info tvariables" \
   "No trace state variables.*" \
   "List tvariables after deleting all"
 
+# Now try running a trace.
+
+runto_main
+gdb_reinitialize_dir $srcdir/$subdir
+
+# The rest of the testing needs actual tracing to work.
+if { ![gdb_target_supports_trace] } then {
+    pass "Current target does not support trace"
+    return 1;
+}
+
+# define relative source line numbers:
+# all subsequent line numbers are relative to this first one (baseline)
+
+set baseline  [gdb_find_recursion_test_baseline $srcfile];
+if { $baseline == -1 } then {
+    fail "Could not find gdb_recursion_test function"
+    return;
+}
+
+set testline1 [expr $baseline + 7]
+
+gdb_delete_tracepoints
+set trcpt1 [gdb_gettpnum gdb_c_test];
+set trcpt2 [gdb_gettpnum gdb_asm_test];
+set trcpt3 [gdb_gettpnum $testline1];
+if { $trcpt1 <= 0 || $trcpt2 <= 0 || $trcpt3 <= 0 } then {
+    fail "setting tracepoints"
+    return;
+}
+
+gdb_test "tvariable \$tvar5 = 15" \
+  "Trace state variable \\\$tvar5 created, with initial value 15." \
+  "Create a trace state variable tvar5"
+
+gdb_trace_setactions "collect tsv for first tracepoint" \
+	"$trcpt1" \
+	"collect \$tvar5 += 1" "^$"
+
+gdb_test "tstart" ".*" ""
+
+gdb_test "print \$tvar5" " = 15" \
+    "Print a trace state variable at start of run"
+
+# Be sure not to fall off the end of the program.
+gdb_test "break end" ".*" ""
+gdb_test "continue" \
+    "Continuing.*Breakpoint $decimal, end.*" \
+    "run trace experiment"
+
+gdb_test "print \$tvar5" " = 16" \
+    "Print a trace state variable during run"
+
+gdb_test "tstop" ".*" ""
+
+gdb_test "print \$tvar5" " = 16" \
+    "Print a trace state variable after run"
+
 
diff --git a/gdb/value.c b/gdb/value.c
index d552402..e771715 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -42,6 +42,8 @@
 
 #include "python/python.h"
 
+#include "tracepoint.h"
+
 /* Prototypes for exported functions. */
 
 void _initialize_values (void);
@@ -1163,6 +1165,22 @@ struct value *
 value_of_internalvar (struct gdbarch *gdbarch, struct internalvar *var)
 {
   struct value *val;
+  struct trace_state_variable *tsv;
+
+  /* If there is a trace state variable of the same name, assume that
+     is what we really want to see.  */
+  tsv = find_trace_state_variable (var->name);
+  if (tsv)
+    {
+      tsv->value_known = target_get_trace_state_variable_value (tsv->number,
+								&(tsv->value));
+      if (tsv->value_known)
+	val = value_from_longest (builtin_type (gdbarch)->builtin_int64,
+				  tsv->value);
+      else
+	val = allocate_value (builtin_type (gdbarch)->builtin_void);
+      return val;
+    }
 
   switch (var->kind)
     {
diff --git a/gdb/version.in b/gdb/version.in
index ede42de..9a0a463 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-7.2.0.20101210-cvs
+7.2.0.20101214-cvs


hooks/post-receive
--
Repository for Project Archer.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-14 17:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-14 17:14 [SCM] gdb_7_2-branch: 2010-12-14 Yao Qi <yao@codesourcery.com> jkratoch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).