* [PATCH] Fixes testsuit/gdb.base/annota1.exp @ 2005-04-07 17:27 Paul Gilliam 2005-04-14 19:36 ` Daniel Jacobowitz 0 siblings, 1 reply; 11+ messages in thread From: Paul Gilliam @ 2005-04-07 17:27 UTC (permalink / raw) To: gdb-patches ping! This patch fixes a problem in annota1.exp First message in annota1.exp thread: http://sources.redhat.com/ml/gdb-patches/2004-09/msg00349.html Last message in in annota1.exp thread: http://sources.redhat.com/ml/gdb-patches/2004-09/msg00374.htm The annota1.exp patch was put on hold, waiting for a set backtrace patch. I submitted a set backtrace patch here: First message in set backtrace thread: http://sources.redhat.com/ml/gdb-patches/2004-10/msg00261.html last message in set backtrace thread: http://sources.redhat.com/ml/gdb-patches/2004-10/msg00443.html Then, like everyone else, I got involved in other things. But an internal bug system just reminded me these where still pending. Where do these patches sit now? -=# Paul #=- ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fixes testsuit/gdb.base/annota1.exp 2005-04-07 17:27 [PATCH] Fixes testsuit/gdb.base/annota1.exp Paul Gilliam @ 2005-04-14 19:36 ` Daniel Jacobowitz 2005-04-15 23:03 ` [PATCH] add new .exp file and a 'c' testfile to test backtrace limits etc Paul Gilliam ` (2 more replies) 0 siblings, 3 replies; 11+ messages in thread From: Daniel Jacobowitz @ 2005-04-14 19:36 UTC (permalink / raw) To: Paul Gilliam; +Cc: gdb-patches On Thu, Apr 07, 2005 at 09:25:11AM -0800, Paul Gilliam wrote: > ping! > > This patch fixes a problem in annota1.exp > > First message in annota1.exp thread: > http://sources.redhat.com/ml/gdb-patches/2004-09/msg00349.html > > Last message in in annota1.exp thread: > http://sources.redhat.com/ml/gdb-patches/2004-09/msg00374.htm > > The annota1.exp patch was put on hold, waiting for a set backtrace patch. > > I submitted a set backtrace patch here: > > First message in set backtrace thread: > http://sources.redhat.com/ml/gdb-patches/2004-10/msg00261.html > > last message in set backtrace thread: > http://sources.redhat.com/ml/gdb-patches/2004-10/msg00443.html > > Then, like everyone else, I got involved in other things. But an > internal bug system just reminded me these where still pending. > > Where do these patches sit now? There are too many assorted attachments in those threads, some of which are outdated. Could you repost, or at least post links to, any patch that you specifically want reviewed? -- Daniel Jacobowitz CodeSourcery, LLC ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] add new .exp file and a 'c' testfile to test backtrace limits etc. 2005-04-14 19:36 ` Daniel Jacobowitz @ 2005-04-15 23:03 ` Paul Gilliam 2005-04-30 18:49 ` Daniel Jacobowitz 2005-04-15 23:38 ` [PATCH] Fixes testsuit/gdb.base/annota1.exp to deal with 'Breakpoint address adjusted' Paul Gilliam 2005-04-15 23:38 ` [PATCH] Fixes testsuit/gdb.base/annota1.exp Paul Gilliam 2 siblings, 1 reply; 11+ messages in thread From: Paul Gilliam @ 2005-04-15 23:03 UTC (permalink / raw) To: gdb-patches; +Cc: Daniel Jacobowitz [-- Attachment #1: Type: text/plain, Size: 918 bytes --] OK. this is in partial responce to: http://sourceware.org/ml/gdb-patches/2005-04/msg00145.html This patch adds a new test file, setbacktrace.exp along with a new 'c' test program, setbacktrace.c. The purpose of this new test is to check backtrace releated features not tested elsewhere in the testsuit: * Check that we know what backtrace options are available. * Check that GDB will only backtrace the requested number of frames. * Check that GDB doesn't backtrace past main unless asked to do so. One problem: I don't know how to add new files in a patch. So I have attached the files and include only the ChangeLog entry here in the body of this e-mail. -=# Paul #=- 2005-04-15 Paul Gililam <pgilliam@us.ibm.com> * gdb.base/setbacktrace.exp (new file): Check backtrace releated features not tested elsewhere. * gdb.base/setbacktrace.c (new file): Test case used by above. [-- Attachment #2: setbacktrace.c --] [-- Type: text/x-csrc, Size: 1199 bytes --] /* This testcase is part of GDB, the GNU debugger. Copyright 2004 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <stdlib.h> int factorial (int n) { if (n > 0) { /* marker: factorial */ return factorial (n - 1) * n; /* marker: factorial recursion */ } else { return 1; } } int main (int argc, char *argv[]) { int depth = 3; if (argc > 1) { depth = atoi(argv[1]); } return factorial (depth); /* marker: main call */ } [-- Attachment #3: setbacktrace.exp --] [-- Type: text/plain, Size: 5550 bytes --] # This file is part of the gdb testsuite. # Copyright 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Check backtrace releated features not tested elsewhere in the testsuit: # * Check that we know what backtrace options are available. # * Check that GDB will only backtrace the requested number of frames. # * Check that GDB doesn't backtrace past main unless asked to do so. if $tracelevel { strace $tracelevel } set prms_id 0 set bug_id 0 set testfile setbacktrace set srcfile ${testfile}.c set escapedsrcfile [string_to_regexp "${srcdir}/${subdir}/${srcfile}"] set binfile ${objdir}/${subdir}/${testfile} if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested "Couldn't compile ${testfile}.c" return -1 } set fact_subr_line_nbr [gdb_get_line_number "marker: factorial"] set fact_recur_line_nbr [gdb_get_line_number "marker: factorial recursion"] set main_subr_line_nbr [gdb_get_line_number "marker: main call"] # Set how deep should we go and build the expected_frames pattern list. set leadin "\[^\r\n\]*\[\r\n\]+" set subr_depth 20 set expected_frames [list "$leadin#0 factorial \\(n=0\\) at $escapedsrcfile:$fact_subr_line_nbr"] for {set ndx 1} {$ndx <= $subr_depth} {incr ndx} { lappend expected_frames [format "$leadin#%-2d $hex in factorial \\(n=$ndx\\) at $escapedsrcfile:$fact_recur_line_nbr" $ndx] } lappend expected_frames [format "$leadin#%-2d $hex in main \\(argc=2, argv=$hex\\) at $escapedsrcfile:$main_subr_line_nbr" [expr $subr_depth + 1]] #for {set ndx 0} {$ndx < [expr $subr_depth + 2]} {incr ndx} { # puts "$ndx: [lindex $expected_frames $ndx]" #} # get things started gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} gdb_test "set args $subr_depth" # Advance to main if { ![runto_main] } then { gdb_suppress_tests; } # Check that someone has not snuck in an extra backtrace option, if # they do they will need to fix this and any such fix should also be # accompanied by a corresponding SET test. set test "set backtrace" send_gdb "set backtrace\n" set backtrace_subcommands [list \ "${leadin}List of set backtrace subcommands:" \ "${leadin}set backtrace limit -- Set an upper bound on the number of backtrace levels" \ "${leadin}set backtrace past-main -- Set whether backtraces should continue past \"main\"" \ "${leadin}Type \"help set backtrace\" followed by set backtrace subcommand name for full documentation." \ "${leadin}Command name abbreviations are allowed if unambiguous."] gdb_expect_list $test ".*$gdb_prompt $" $backtrace_subcommands # Create a simple stack. gdb_test "break factorial if n == 0" gdb_continue_to_breakpoint "factorial" # Check a backtrace to main (ignore any extra). set test "full backtrace, ignore extra" send_gdb "backtrace\n" gdb_expect_list $test ".*$gdb_prompt $" $expected_frames # Check a backtrace to main (don't ignore any extra). #setup_kfail *-*-* gdb/1760 set test "full backtrace, exact" send_gdb "backtrace\n" gdb_expect_list $test "\[\n\r\]+$gdb_prompt $" $expected_frames # Check a backtrace short of main. set test "partial backtrace, via argument" set partial_depth [expr int($subr_depth / 2)] set partial_frames [lrange $expected_frames 0 [expr $partial_depth - 1]] lappend partial_frames "$leadin\\(More stack frames follow\\.\\.\\.\\)" #for {set ndx 0} {$ndx < [expr $partial_depth + 2]} {incr ndx} { # puts "$ndx: [lindex $partial_frames $ndx]" #} send_gdb "backtrace $partial_depth\n" gdb_expect_list $test "$leadin$gdb_prompt $" $partial_frames ## Check a backtrace short of main due to limit. set test "partial backtrace, via limit" set partial_frames [lrange $expected_frames 0 [expr $partial_depth - 1]] lappend partial_frames "^\[\n\r]+Backtrace limit of $partial_depth exceeded" #for {set ndx 0} {$ndx < [llength $partial_frames]} {incr ndx} { # puts "$ndx: [lindex $partial_frames $ndx]" #} gdb_test "set backtrace limit $partial_depth" ".*" "Set the backtrace limit to $partial_depth" setup_kfail *-*-* gdb/1760 send_gdb "backtrace\n" gdb_expect_list $test "\[\r\n]+$gdb_prompt $" $partial_frames # Check a backtrace past main, specify a backtrace limit so it does not fall off the end of the stack. set test "backtrace past main" set bt_limit [expr $subr_depth + 3] gdb_test "set backtrace past-main" ".*" "Set the backtrace past-main" gdb_test "set backtrace limit 0" ".*" "Set the backtrace limit to unlimited" set extra_frames $expected_frames lappend extra_frames [format "$leadin#%-2d $hex in \[^ \]+ \\(\[^\\)]*\\) \[^\r\n]*" [expr $subr_depth + 2]] lappend extra_frames "\\(More stack frames follow\\.\\.\\.\\)" #for {set ndx 0} {$ndx < [llength $extra_frames]} {incr ndx} { # puts "$ndx: [lindex $extra_frames $ndx]" #} send_gdb "backtrace $bt_limit\n" gdb_expect_list $test "$leadin$gdb_prompt $" $extra_frames ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] add new .exp file and a 'c' testfile to test backtrace limits etc. 2005-04-15 23:03 ` [PATCH] add new .exp file and a 'c' testfile to test backtrace limits etc Paul Gilliam @ 2005-04-30 18:49 ` Daniel Jacobowitz 2005-05-28 23:42 ` Daniel Jacobowitz 0 siblings, 1 reply; 11+ messages in thread From: Daniel Jacobowitz @ 2005-04-30 18:49 UTC (permalink / raw) To: Paul Gilliam; +Cc: gdb-patches This test is going to need a little work still. Thanks for starting it. On Fri, Apr 15, 2005 at 03:02:39PM -0800, Paul Gilliam wrote: > OK. this is in partial responce to: > http://sourceware.org/ml/gdb-patches/2005-04/msg00145.html > > This patch adds a new test file, setbacktrace.exp along with a new 'c' test program, > setbacktrace.c. > > The purpose of this new test is to check backtrace releated features not tested > elsewhere in the testsuit: > * Check that we know what backtrace options are available. > * Check that GDB will only backtrace the requested number of frames. > * Check that GDB doesn't backtrace past main unless asked to do so. > > One problem: I don't know how to add new files in a patch. So I have attached the files > and include only the ChangeLog entry here in the body of this e-mail. You diff it against /dev/null; either by hand or by adding a dummy line to CVS/Entries. There's also "cvsdo add" in the cvsutils package, which automates that. > 2005-04-15 Paul Gililam <pgilliam@us.ibm.com> > > * gdb.base/setbacktrace.exp (new file): Check backtrace releated > features not tested elsewhere. > * gdb.base/setbacktrace.c (new file): Test case used by above. > * gdb.base/setbacktrace.exp, gdb.base/setbacktrace.c: New files. > /* This testcase is part of GDB, the GNU debugger. > > Copyright 2004 Free Software Foundation, Inc. > # This file is part of the gdb testsuite. > > # Copyright 2004 Free Software Foundation, Inc. 2005 now. > # This program is free software; you can redistribute it and/or modify > # it under the terms of the GNU General Public License as published by > # the Free Software Foundation; either version 2 of the License, or > # (at your option) any later version. > # > # This program is distributed in the hope that it will be useful, > # but WITHOUT ANY WARRANTY; without even the implied warranty of > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > # GNU General Public License for more details. > # > # You should have received a copy of the GNU General Public License > # along with this program; if not, write to the Free Software > # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. > > # Check backtrace releated features not tested elsewhere in the testsuit: "testsuite". > if $tracelevel { > strace $tracelevel > } > > set prms_id 0 > set bug_id 0 I'm pretty sure this isn't necessary any more. > # Set how deep should we go and build the expected_frames pattern list. > set leadin "\[^\r\n\]*\[\r\n\]+" This is very permissive. Do you really need to allow so much? This will accept garbage at the end of lines. Otherwise the pattern construction is very nice. > # Advance to main > if { ![runto_main] } then { > gdb_suppress_tests; > } Please don't use gdb_suppress_tests. > # Check that someone has not snuck in an extra backtrace option, if > # they do they will need to fix this and any such fix should also be > # accompanied by a corresponding SET test. > set test "set backtrace" > send_gdb "set backtrace\n" > set backtrace_subcommands [list \ > "${leadin}List of set backtrace subcommands:" \ > "${leadin}set backtrace limit -- Set an upper bound on the number of backtrace levels" \ > "${leadin}set backtrace past-main -- Set whether backtraces should continue past \"main\"" \ > "${leadin}Type \"help set backtrace\" followed by set backtrace subcommand name for full documentation." \ > "${leadin}Command name abbreviations are allowed if unambiguous."] > gdb_expect_list $test ".*$gdb_prompt $" $backtrace_subcommands Did you test this testcase? :-) There's "set backtrace past-entry" now. Also, same comment about ${leadin}. > # Check a backtrace to main (don't ignore any extra). > #setup_kfail *-*-* gdb/1760 > set test "full backtrace, exact" > send_gdb "backtrace\n" > gdb_expect_list $test "\[\n\r\]+$gdb_prompt $" $expected_frames I don't think this does what you want it to do. It won't ignore any extra, and it won't ignore garbage between frames. You probably want to construct a single regular expression using string concatenation rather than list append. That's a general comment, it applies to all the uses of gdb_expect_list. > set test "partial backtrace, via limit" > set partial_frames [lrange $expected_frames 0 [expr $partial_depth - 1]] > lappend partial_frames "^\[\n\r]+Backtrace limit of $partial_depth exceeded" > #for {set ndx 0} {$ndx < [llength $partial_frames]} {incr ndx} { > # puts "$ndx: [lindex $partial_frames $ndx]" > #} > gdb_test "set backtrace limit $partial_depth" ".*" "Set the backtrace limit to $partial_depth" > setup_kfail *-*-* gdb/1760 > send_gdb "backtrace\n" > gdb_expect_list $test "\[\r\n]+$gdb_prompt $" $partial_frames It would be better to use gdb_test_multiple and explicitly match the KFAIL. And to document what the problem is. > # Check a backtrace past main, specify a backtrace limit so it does not fall off the end of the stack. Wrap long lines where it's easy to do, please. It's not worth the trouble for most TCL, but comments are easy. > set test "backtrace past main" > set bt_limit [expr $subr_depth + 3] > gdb_test "set backtrace past-main" ".*" "Set the backtrace past-main" > gdb_test "set backtrace limit 0" ".*" "Set the backtrace limit to unlimited" > set extra_frames $expected_frames > lappend extra_frames [format "$leadin#%-2d $hex in \[^ \]+ \\(\[^\\)]*\\) \[^\r\n]*" [expr $subr_depth + 2]] > lappend extra_frames "\\(More stack frames follow\\.\\.\\.\\)" > #for {set ndx 0} {$ndx < [llength $extra_frames]} {incr ndx} { > # puts "$ndx: [lindex $extra_frames $ndx]" > #} > send_gdb "backtrace $bt_limit\n" > gdb_expect_list $test "$leadin$gdb_prompt $" $extra_frames I'm not sure how portable this is... especially since you're requiring there be at least one GDB-detectable frame past main. -- Daniel Jacobowitz CodeSourcery, LLC ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] add new .exp file and a 'c' testfile to test backtrace limits etc. 2005-04-30 18:49 ` Daniel Jacobowitz @ 2005-05-28 23:42 ` Daniel Jacobowitz 0 siblings, 0 replies; 11+ messages in thread From: Daniel Jacobowitz @ 2005-05-28 23:42 UTC (permalink / raw) To: Paul Gilliam, gdb-patches Hi Paul, On Sat, Apr 30, 2005 at 02:49:14PM -0400, Daniel Jacobowitz wrote: > On Fri, Apr 15, 2005 at 03:02:39PM -0800, Paul Gilliam wrote: > > OK. this is in partial responce to: > > http://sourceware.org/ml/gdb-patches/2005-04/msg00145.html > > > > This patch adds a new test file, setbacktrace.exp along with a new 'c' test program, > > setbacktrace.c. > > > > The purpose of this new test is to check backtrace releated features not tested > > elsewhere in the testsuit: > > * Check that we know what backtrace options are available. > > * Check that GDB will only backtrace the requested number of frames. > > * Check that GDB doesn't backtrace past main unless asked to do so. I sent you some comments on this patch in April. Here's another one that may be useful: http://sourceware.org/ml/gdb-patches/2005-05/msg00590.html This patch fixed the bug I originally wanted this test case to test for, and a couple of related bugs. If you don't have time, let me know, and I'll try to update the test myself. -- Daniel Jacobowitz CodeSourcery, LLC ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] Fixes testsuit/gdb.base/annota1.exp to deal with 'Breakpoint address adjusted' 2005-04-14 19:36 ` Daniel Jacobowitz 2005-04-15 23:03 ` [PATCH] add new .exp file and a 'c' testfile to test backtrace limits etc Paul Gilliam @ 2005-04-15 23:38 ` Paul Gilliam 2005-04-27 15:43 ` Daniel Jacobowitz 2005-04-15 23:38 ` [PATCH] Fixes testsuit/gdb.base/annota1.exp Paul Gilliam 2 siblings, 1 reply; 11+ messages in thread From: Paul Gilliam @ 2005-04-15 23:38 UTC (permalink / raw) To: gdb-patches; +Cc: Daniel Jacobowitz OK. this is in partial responce to: http://sourceware.org/ml/gdb-patches/2005-04/msg00145.html There were two problems with gdb.base/annota1.exp. This patch is only for the first one. The problem here is that, in some architectures, a breakpoints in a shared object will be adjusted once the shared object is loaded. This cause two messages not accounted for by gdb.base/annota1.exp: Breakpoint address adjusted from .... Breakpoint <n> address previously adjusted from ... -=# Paul #=- -- 2005-04-15 Paul Gilliam <pgilliam@us.ibm.com> * gdb.base/annota1.exp : Deal with messages caused by breakpoints in shared objects being adjusted. Index: gdb.base/annota1.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v retrieving revision 1.16 diff -c -3 -p -r1.16 annota1.exp *** gdb.base/annota1.exp 20 Jul 2004 00:24:41 -0000 1.16 --- gdb.base/annota1.exp 21 Sep 2004 20:42:29 -0000 *************** send_gdb "break printf\n" *** 229,234 **** --- 229,236 ---- gdb_expect { -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-invalid\r\nBreakpoint.*at $hex.*$gdb_prompt$" \ { pass "breakpoint printf" } + -re "\r\n\032\032post-prompt\r\nwarning: Breakpoint address adjusted from $hex to $hex.\r\n\r\n\032\032breakpoints-invalid\r\nBreakpoint.*at $hex.*$gdb_prompt$" \ + { pass "breakpoint printf"} -re ".*$gdb_prompt$" { fail "break printf" } timeout { fail "break printf (timeout)" } } *************** send_gdb "continue\n" *** 240,245 **** --- 242,249 ---- gdb_expect { -re "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 3\r\n\r\nBreakpoint 3, \r\n\032\032frame-begin 0 $hex\r\n\r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\nprintf\r\n\032\032frame-args\r\n.*\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \ { pass "continue to printf" } + -re "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\nwarning: Breakpoint 3 address previously adjusted from $hex to $hex.\r\n\r\n\032\032breakpoint 3\r\n\r\nBreakpoint 3, \r\n\032\032frame-begin 0 $hex\r\n\r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*.*\032\032frame-function-name\r\n.printf\r\n\032\032frame-args\r\n.*\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \ + { pass "continue to printf" } -re ".*$gdb_prompt$" { fail "continue to printf" } timeout { fail "continue to printf (timeout)" } } ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fixes testsuit/gdb.base/annota1.exp to deal with 'Breakpoint address adjusted' 2005-04-15 23:38 ` [PATCH] Fixes testsuit/gdb.base/annota1.exp to deal with 'Breakpoint address adjusted' Paul Gilliam @ 2005-04-27 15:43 ` Daniel Jacobowitz 2005-04-27 21:47 ` [COMMIT] " Paul Gilliam 0 siblings, 1 reply; 11+ messages in thread From: Daniel Jacobowitz @ 2005-04-27 15:43 UTC (permalink / raw) To: Paul Gilliam; +Cc: gdb-patches On Fri, Apr 15, 2005 at 03:38:04PM -0800, Paul Gilliam wrote: > OK. Â this is in partial responce to: > Â Â Â Â Â Â Â Â http://sourceware.org/ml/gdb-patches/2005-04/msg00145.html > > There were two problems with gdb.base/annota1.exp. This patch is only for the first one. > > The problem here is that, in some architectures, a breakpoints in a shared object will be > adjusted once the shared object is loaded. This cause two messages not accounted > for by gdb.base/annota1.exp: > Breakpoint address adjusted from .... > Breakpoint <n> address previously adjusted from ... > > -=# Paul #=- > > -- > 2005-04-15 Paul Gilliam <pgilliam@us.ibm.com> > > * gdb.base/annota1.exp : Deal with messages caused by breakpoints in > shared objects being adjusted. This is OK. Please update the copyright year in annota1.exp. -- Daniel Jacobowitz CodeSourcery, LLC ^ permalink raw reply [flat|nested] 11+ messages in thread
* [COMMIT] Fixes testsuit/gdb.base/annota1.exp to deal with 'Breakpoint address adjusted' 2005-04-27 15:43 ` Daniel Jacobowitz @ 2005-04-27 21:47 ` Paul Gilliam 0 siblings, 0 replies; 11+ messages in thread From: Paul Gilliam @ 2005-04-27 21:47 UTC (permalink / raw) To: gdb-patches; +Cc: Daniel Jacobowitz Here is the patch I commited. -=# Paul #=- 2005-04-27 Paul Gilliam <pgilliam@us.ibm.com> * gdb.base/annota1.exp : Deal with messages caused by breakpoints in shared objects being adjusted and update copyright. Index: gdb.base/annota1.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v retrieving revision 1.16 diff -c -3 -p -r1.16 annota1.exp *** gdb.base/annota1.exp 20 Jul 2004 00:24:41 -0000 1.16 --- gdb.base/annota1.exp 27 Apr 2005 21:38:32 -0000 *************** *** 1,4 **** ! # Copyright 1999, 2000, 2001, 2002, 2003, 2004 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify --- 1,4 ---- ! # Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software # Foundation, Inc. # This program is free software; you can redistribute it and/or modify *************** send_gdb "break printf\n" *** 229,234 **** --- 229,236 ---- gdb_expect { -re "\r\n\032\032post-prompt\r\n\r\n\032\032breakpoints-invalid\r\nBreakpoint.*at $hex.*$gdb_prompt$" \ { pass "breakpoint printf" } + -re "\r\n\032\032post-prompt\r\nwarning: Breakpoint address adjusted from $hex to $hex.\r\n\r\n\032\032breakpoints-invalid\r\nBreakpoint.*at $hex.*$gdb_prompt$" \ + { pass "breakpoint printf"} -re ".*$gdb_prompt$" { fail "break printf" } timeout { fail "break printf (timeout)" } } *************** send_gdb "continue\n" *** 240,245 **** --- 242,250 ---- gdb_expect { -re "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032breakpoint 3\r\n\r\nBreakpoint 3, \r\n\032\032frame-begin 0 $hex\r\n\r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\nprintf\r\n\032\032frame-args\r\n.*\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \ { pass "continue to printf" } + -re "\r\n\032\032post-prompt\r\nContinuing.\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\nwarning: Breakpoint 3 address previously adjusted from $hex to $hex.\r\n\r\n\032\032breakpoint 3\r\n\r\nBreakpoint 3, \r\n\032\032frame-begin 0 $hex\r\n\r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*.*\032\032frame-function-name\r\n.printf\r\n\032\032frame-args\r\n.*\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \ + { pass "continue to printf" } + -re ".*$gdb_prompt$" { fail "continue to printf" } timeout { fail "continue to printf (timeout)" } } ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH] Fixes testsuit/gdb.base/annota1.exp 2005-04-14 19:36 ` Daniel Jacobowitz 2005-04-15 23:03 ` [PATCH] add new .exp file and a 'c' testfile to test backtrace limits etc Paul Gilliam 2005-04-15 23:38 ` [PATCH] Fixes testsuit/gdb.base/annota1.exp to deal with 'Breakpoint address adjusted' Paul Gilliam @ 2005-04-15 23:38 ` Paul Gilliam 2005-04-27 15:49 ` Daniel Jacobowitz 2 siblings, 1 reply; 11+ messages in thread From: Paul Gilliam @ 2005-04-15 23:38 UTC (permalink / raw) To: gdb-patches; +Cc: Daniel Jacobowitz OK. this is in partial responce to: http://sourceware.org/ml/gdb-patches/2005-04/msg00145.html There were two problems with gdb.base/annota1.exp. This patch is only for the second one. The problem here is that a bug in backtrace was causing a false nagitive in gdb.base/annota1.exp, so the feature being tested was OK, but was being failed due to some other bug that caused the backtrace to not stop at the end. NOTE: this also allows for 'doc symbols' like '.printf'. I understand that these are going away soon, but an extra '\.?' shouldn't hurt anything. -=# Paul #=- -- 2005-04-15 Paul Gilliam <pgilliam@us.ibm.com> * gdb.base/annota1.exp: Deal with backtrace 'skidding' past top-of-stack due to a bug unrealted to annotation. Index: gdb.base/annota1.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota1.exp,v retrieving revision 1.16 diff -c -3 -p -r1.16 annota1.exp *** gdb.base/annota1.exp 20 Jul 2004 00:24:41 -0000 1.16 --- gdb.base/annota1.exp 21 Sep 2004 20:45:39 -0000 *************** send_gdb "backtrace\n" *** 254,259 **** --- 254,261 ---- gdb_expect { -re "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0 \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\nprintf\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1 \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${escapedsrcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032frame-end\r\n(\r\n\032\032frame-begin .*\r\n\r\n\032\032frame-end\r\n)*$gdb_prompt$" \ { pass "backtrace from shlibrary" } + -re "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0 \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\n\.?printf\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1 \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n${escapedsrcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032frame-end\r\n(\r\n\032\032frame-begin .*\r\n\r\n\032\032frame-end\r\n)\r\n\032\032error-begin\r\n.*\032\032error\r\n$gdb_prompt$" \ + { pass "backtrace from shlibrary" } -re "\r\n\032\032post-prompt\r\n\r\n\032\032frame-begin 0 $hex\r\n.0 \r\n(\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n)*\032\032frame-function-name\r\nprintf\r\n\032\032frame-args\r\n \\(.*frame-end\r\n\r\n\032\032frame-begin 1 $hex\r\n.1 \r\n\032\032frame-address\r\n$hex\r\n\032\032frame-address-end\r\n in \r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\r\n \\(\\)\r\n\032\032frame-source-begin\r\n at \r\n\032\032frame-source-file\r\n.*${srcfile}\r\n\032\032frame-source-file-end\r\n:\r\n\032\032frame-source-line\r\n.*\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032frame-end\r\n(\r\n\032\032frame-begin .*\r\n\r\n\032\032frame-end\r\n)*$gdb_prompt$" \ { setup_xfail "*-*-*" 1270 fail "backtrace from shlibrary" } ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fixes testsuit/gdb.base/annota1.exp 2005-04-15 23:38 ` [PATCH] Fixes testsuit/gdb.base/annota1.exp Paul Gilliam @ 2005-04-27 15:49 ` Daniel Jacobowitz 2005-04-27 20:02 ` Paul Gilliam 0 siblings, 1 reply; 11+ messages in thread From: Daniel Jacobowitz @ 2005-04-27 15:49 UTC (permalink / raw) To: Paul Gilliam; +Cc: gdb-patches On Fri, Apr 15, 2005 at 03:37:55PM -0800, Paul Gilliam wrote: > OK. Â this is in partial responce to: > Â Â Â Â Â Â Â Â http://sourceware.org/ml/gdb-patches/2005-04/msg00145.html > > There were two problems with gdb.base/annota1.exp. This patch is only for the second one. > > The problem here is that a bug in backtrace was causing a false nagitive in gdb.base/annota1.exp, > so the feature being tested was OK, but was being failed due to some other bug that caused the > backtrace to not stop at the end. > > NOTE: this also allows for 'doc symbols' like '.printf'. I understand that these are going away > soon, but an extra '\.?' shouldn't hurt anything. > > -=# Paul #=- > > -- > 2005-04-15 Paul Gilliam <pgilliam@us.ibm.com> > > * gdb.base/annota1.exp: Deal with backtrace 'skidding' past > top-of-stack due to a bug unrealted to annotation. I would strongly prefer not to include this one. This isn't a unit testsuite; all GDB tests cover multiple features. Some backtrace bugs only show up in these testcases, because they're so picky. You didn't mention when resubmitting these patches that there were objections to them. That's kind of important. I see that Andrew had the same objection that I do. -- Daniel Jacobowitz CodeSourcery, LLC ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] Fixes testsuit/gdb.base/annota1.exp 2005-04-27 15:49 ` Daniel Jacobowitz @ 2005-04-27 20:02 ` Paul Gilliam 0 siblings, 0 replies; 11+ messages in thread From: Paul Gilliam @ 2005-04-27 20:02 UTC (permalink / raw) To: gdb-patches; +Cc: Daniel Jacobowitz On Wednesday 27 April 2005 08:47, Daniel Jacobowitz wrote: > On Fri, Apr 15, 2005 at 03:37:55PM -0800, Paul Gilliam wrote: > > OK. this is in partial responce to: > > http://sourceware.org/ml/gdb-patches/2005-04/msg00145.html > > > > There were two problems with gdb.base/annota1.exp. This patch is only for the second one. > > > > The problem here is that a bug in backtrace was causing a false nagitive in gdb.base/annota1.exp, > > so the feature being tested was OK, but was being failed due to some other bug that caused the > > backtrace to not stop at the end. > > > > NOTE: this also allows for 'doc symbols' like '.printf'. I understand that these are going away > > soon, but an extra '\.?' shouldn't hurt anything. > > > > -=# Paul #=- > > > > -- > > 2005-04-15 Paul Gilliam <pgilliam@us.ibm.com> > > > > * gdb.base/annota1.exp: Deal with backtrace 'skidding' past > > top-of-stack due to a bug unrealted to annotation. > > I would strongly prefer not to include this one. This isn't a unit > testsuite; all GDB tests cover multiple features. Some backtrace bugs > only show up in these testcases, because they're so picky. OK, I understand. I withdraw this patch. > > You didn't mention when resubmitting these patches that there were > objections to them. That's kind of important. I see that Andrew had > the same objection that I do. > Opps, Sorry. I'll be more carefull next time ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-05-28 22:55 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-04-07 17:27 [PATCH] Fixes testsuit/gdb.base/annota1.exp Paul Gilliam 2005-04-14 19:36 ` Daniel Jacobowitz 2005-04-15 23:03 ` [PATCH] add new .exp file and a 'c' testfile to test backtrace limits etc Paul Gilliam 2005-04-30 18:49 ` Daniel Jacobowitz 2005-05-28 23:42 ` Daniel Jacobowitz 2005-04-15 23:38 ` [PATCH] Fixes testsuit/gdb.base/annota1.exp to deal with 'Breakpoint address adjusted' Paul Gilliam 2005-04-27 15:43 ` Daniel Jacobowitz 2005-04-27 21:47 ` [COMMIT] " Paul Gilliam 2005-04-15 23:38 ` [PATCH] Fixes testsuit/gdb.base/annota1.exp Paul Gilliam 2005-04-27 15:49 ` Daniel Jacobowitz 2005-04-27 20:02 ` Paul Gilliam
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox