Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Klee Dienes <klee@apple.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Klee Dienes <klee@apple.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFC] add 'save-breakpoints' command
Date: Tue, 18 Dec 2001 01:42:00 -0000	[thread overview]
Message-ID: <E16GGjo-00085m-00@localhost> (raw)
In-Reply-To: Your message of "Fri, 14 Dec 2001 15:48:51 EST." <20011214154851.A25801@nevyn.them.org>


On Fri, Dec 14, 2001 at 03:44:03PM -0500, Klee Dienes wrote:
>> We've been using a variant of this patch at Apple for a little over a
>> year; it seems to be working.  The test suite shows four additional
>> unexpected successes when I run it with this patch, but I figure
>> that's probably OK.
>
> That's odd; the testsuite is mostly (entirely?) compiled with debug
> information.  Which are they?

Ah, you caught me.  The 4 XPASSES were the result of mild version skew
between the times I did the 'cvs update' on the two source trees; they
were unrelated to the code changes.

In fact, when I ran the test suite correctly I discovered a number of
failed tests due to output changes (since now GDB is less aggressive
about guessing the type about symbols without debugging information).

After applying the following patch, I now get identical output from
the test suite before- and after-patch.


Index: gdb/testsuite/gdb.asm/asm-source.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.asm/asm-source.exp,v
retrieving revision 1.14
diff -u -r1.14 asm-source.exp
--- asm-source.exp	2001/12/13 13:42:19	1.14
+++ asm-source.exp	2001/12/18 09:19:04
@@ -206,10 +206,12 @@
 	"Make selected stack frame return now\?.*" "y"
 
 # See if we can look at a global variable
-gdb_test "print globalvar" ".* = 11" "look at global variable"
+gdb_test "print globalvar" ".* = (11|<unknown type>)" "look at global variable"
+gdb_test "print (int) globalvar" ".* = 11" "look at global variable"
 
 # See if we can look at a static variable
-gdb_test "print staticvar" ".* = 5" "look at static variable"
+gdb_test "print staticvar" ".* = (5|<unknown type>)" "look at static variable"
+gdb_test "print (int) staticvar" ".* = 5" "look at static variable"
 
 # See if we can look at a static function
 gdb_test "disassem foostatic" ".*<foostatic>:.*End of assembler dump." \
Index: gdb/testsuite/gdb.base/nodebug.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/nodebug.exp,v
retrieving revision 1.2
diff -u -r1.2 nodebug.exp
--- nodebug.exp	2001/03/06 08:21:50	1.2
+++ nodebug.exp	2001/12/18 09:19:04
@@ -77,23 +77,24 @@
     gdb_test "whatis top" \
 	"(<(text variable|function), no debug info>|short \\(int\\)|short \\(\\))"
     if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" }
-    gdb_test "ptype top" "(short|int) \\((|void|int|<non-float parameter>|<non-float parameter>, <non-float parameter>)\\)"
+    gdb_test "ptype top" "(short|int|<unknown type>) \\((|void|int|<non-float parameter>|<non-float parameter>, <non-float parameter>)\\)"
     
     if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix5*" }
     setup_xfail "mips-sgi-irix6*"
     gdb_test "p middle" \
-	"\{(<(text variable|function), no debug info>|short \\(int\\)|short \\(\\))\} \[0-9a-fx]* <middle(\\(int\\)|)>"
+	"\{(<(text variable|function), no debug info>|<unknown type>|short \\(int\\)|short \\(\\))\} \[0-9a-fx]* <middle(\\(int\\)|)>"
     if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix5*" }
     setup_xfail "mips-sgi-irix6*"
     gdb_test "whatis middle" \
-	"(<(text variable|function), no debug info>|short \\(int\\)|short \\(\\))"
+	"(<(text variable|function), no debug info>|<unknown type>|short \\(int\\)|short \\(\\))"
     setup_xfail "mips-sgi-irix6*"
-    gdb_test "ptype middle" "(short|int) \\((|void|int|<non-float parameter>|<non-float parameter>, <non-float parameter>)\\)"
+    gdb_test "ptype middle" "(short|int|<unknown type>) \\((|void|int|<non-float parameter>|<non-float parameter>, <non-float parameter>)\\)"
     
-    gdb_test "p dataglobal" "= 3"
+    gdb_test "p dataglobal" "(= 3|<unknown type>)"
+    gdb_test "p (int) dataglobal" "= 3"
     gdb_test "whatis dataglobal" \
-	"<(data variable|variable), no debug info>|int"
-    gdb_test "ptype dataglobal" "<(data variable|variable), no debug info>|int"
+	"<(data variable|variable), no debug info>|<unknown type>|int"
+    gdb_test "ptype dataglobal" "<(data variable|variable), no debug info>|<unknown type>|int"
     
     # The only symbol xcoff puts out for statics is for the TOC entry.
     # Possible, but hairy, for gdb to deal.  Right now it doesn't, it
@@ -102,37 +103,40 @@
     setup_xfail "powerpc*-*-aix*"
     if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" }
     if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" }
-    gdb_test "p datalocal" "= 4"
+    gdb_test "p datalocal" "(= 4|<unknown type>)"
+    gdb_test "p (int) datalocal" "4"
     setup_xfail "rs6000*-*-aix*"
     setup_xfail "powerpc*-*-aix*"
     if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" }
     if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" }
-    gdb_test "whatis datalocal" "<(data variable|variable), no debug info>"
+    gdb_test "whatis datalocal" "<(data variable|variable), no debug info>|<unknown type>"
     setup_xfail "rs6000*-*-aix*"
     setup_xfail "powerpc*-*-aix*"
     if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" }
     if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" }
-    gdb_test "ptype datalocal" "<(data variable|variable), no debug info>"
+    gdb_test "ptype datalocal" "<(data variable|variable), no debug info>|<unknown type>"
     
-    gdb_test "p bssglobal" "= 0"
-    gdb_test "whatis bssglobal" "<(data variable|variable), no debug info>|int"
-    gdb_test "ptype bssglobal" "<(data variable|variable), no debug info>|int"
+    gdb_test "p bssglobal" "(= 0|<unknown type>)"
+    gdb_test "p (int) bssglobal" "= 0"
+    gdb_test "whatis bssglobal" "<(data variable|variable), no debug info>|<unknown type>|int"
+    gdb_test "ptype bssglobal" "<(data variable|variable), no debug info>|<unknown type>|int"
     
     setup_xfail "rs6000*-*-aix*"
     setup_xfail "powerpc*-*-aix*"
     if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" }
     if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" }
-    gdb_test "p bsslocal" "= 0"
+    gdb_test "p bsslocal" "(= 0|<unknown type>)"
+    gdb_test "p (int) bsslocal" "= 0"
     setup_xfail "rs6000*-*-aix*"
     setup_xfail "powerpc*-*-aix*"
     if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" }
     if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" }
-    gdb_test "whatis bsslocal" "<(data variable|variable), no debug info>"
+    gdb_test "whatis bsslocal" "<(data variable|variable), no debug info>|<unknown type>"
     setup_xfail "rs6000*-*-aix*"
     setup_xfail "powerpc*-*-aix*"
     if {!$gcc_compiled} then { setup_xfail "hppa*-*-hpux*" }
     if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" }
-    gdb_test "ptype bsslocal" "<(data variable|variable), no debug info>"
+    gdb_test "ptype bsslocal" "<(data variable|variable), no debug info>|<unknown type>"
     
     if {$gcc_compiled} then { setup_xfail "mips-sgi-irix6*" }
     gdb_test "backtrace 10" "#0.*inner.*#1.*middle.*#2.*top.*#3.*main.*" \
@@ -167,7 +171,9 @@
 	    # We need to up this because this can be really slow on some boards.
 	    # (malloc() is called as part of the test).
 	    set timeout 60;    
-	    gdb_test {p/c array_index("abcdef",2)} " = 99 'c'"
+	    gdb_test {p/c (int) array_index("abcdef",2)} " = 99 'c'"
+	    gdb_test {p/c array_index("abcdef",2)} \
+	        "Unable to call function .* no return type information available.*"
 	}
     }
     



  reply	other threads:[~2001-12-18  9:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-04 10:21 Klee Dienes
2001-12-04 10:26 ` Daniel Jacobowitz
2001-12-04 10:44   ` Klee Dienes
2001-12-05 14:06     ` Tom Tromey
2001-12-04 11:22 ` Eli Zaretskii
2001-12-04 13:35   ` Klee Dienes
2001-12-05  0:25     ` Eli Zaretskii
2001-12-04 14:48 ` Michael Snyder
2001-12-04 21:11   ` Klee Dienes
2001-12-11  0:28   ` Klee Dienes
2001-12-11  3:55     ` Eli Zaretskii
2001-12-11  8:35       ` Klee Dienes
2001-12-11  9:09         ` Eli Zaretskii
2001-12-11 13:23           ` Klee Dienes
2001-12-12  0:32             ` Eli Zaretskii
2001-12-14 12:45               ` Klee Dienes
2001-12-14 12:50                 ` Daniel Jacobowitz
2001-12-18  1:42                   ` Klee Dienes [this message]
     [not found] <1007594419.30359.ezmlm@sources.redhat.com>
2001-12-05 17:39 ` Jim Ingham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E16GGjo-00085m-00@localhost \
    --to=klee@apple.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox