1*e93f7393SniklasThe highest priority item is not on this list: Fix bugs in the 2*e93f7393Sniklasexisting testsuite, fix the GDB/compiler/shell/etc bugs which it 3*e93f7393Sniklasdetects (particularly when they are hard to XFAIL), make it run 4*e93f7393Sniklasreliably without unexpected failures on the "standard" machines, etc. 5*e93f7393SniklasThis list exists largely as "tests we can add when we are ready to 6*e93f7393Sniklasrisk destabilizing it again". 7*e93f7393Sniklas 8*e93f7393SniklasThere are some tests which are only run on some platforms because they 9*e93f7393Sniklashave not been tested on more platforms. Enable them and fix any 10*e93f7393Sniklasproblems. A partial list: recurse.exp, watchpoint.exp 11*e93f7393Sniklas(test_watchpoint_triggered_in_syscall, test_complex_watchpoint). 12*e93f7393Sniklas 13*e93f7393SniklasTest printing of structures passed by value, for the 7th, 8th, and 9th 14*e93f7393Sniklasarguments (PR 1714). Test printing structure arguments of 15*e93f7393Sniklas2,4,6,8,12,16,and 20 bytes. Same for structure return of all those 16*e93f7393Sniklassizes ("return", "finish", and call function). 17*e93f7393Sniklas 18*e93f7393SniklasGet crossload tests to use --enable-targets and reenable them. 19*e93f7393Sniklas 20*e93f7393Sniklascorefile.exp: 21*e93f7393SniklasTest ability to run program when there is a core target, then go 22*e93f7393Sniklasback to the core file when the program exits. 23*e93f7393Sniklas 24*e93f7393SniklasTest handling of floating point variables 25*e93f7393Sniklas1. float, double, or long double 26*e93f7393Sniklas2. in register or saved register or memory. Also the case where a 27*e93f7393Sniklasdouble is in two float registers and only one of them is saved. 28*e93f7393Sniklas3. print them or set them 29*e93f7393Sniklas4. (Alpha) integer (32 or 64 bit) in floating point register. 30*e93f7393Sniklas 31*e93f7393SniklasPrint registers--"p $r5", "p sizeof ($r5)". Test that they print 32*e93f7393Sniklasappropriately (integer registers in decimal, registers which always 33*e93f7393Sniklascontain addresses (pc, probably sp and fp, maybe others) in hex, 34*e93f7393Sniklasfloating point). 35*e93f7393Sniklas 36*e93f7393SniklasTest completer. Test that it completes a variety of things correctly 37*e93f7393Sniklas(see the list of test cases in main.c in the gdb source). Test TAB, 38*e93f7393SniklasM-?, and the "complete" command. 39*e93f7393Sniklas 40*e93f7393SniklasTest "info line" with all kinds of linespecs. Test that the last line 41*e93f7393Sniklasof the file works right. 42*e93f7393Sniklas 43*e93f7393Sniklasweird.exp--test that unrecognized cross-reference types or 44*e93f7393Sniklasunrecognized visibility or virtual characters get skipped properly 45*e93f7393Sniklas(see stabs.texinfo). 46*e93f7393Sniklas 47*e93f7393SniklasTest C++ nested types (especially if PR 1954 is fixed; even if not 48*e93f7393Sniklas*some* things already should work even in the presence of nested 49*e93f7393Sniklastypes). Test classes nested more than 9 levels deep (g++ mangles 50*e93f7393Sniklasthese differently) (both a demangle test and some tests which also 51*e93f7393Sniklastest the compiler). Test calling a method of a class nested more than 52*e93f7393Sniklas9 levels (for gdb_mangle_name and demangling). 53*e93f7393Sniklas 54*e93f7393SniklasTest static member functions (C++). Test that "ptype" shows them 55*e93f7393Sniklascorrectly, both before and after they have been converted from stub 56*e93f7393Sniklasmethods. Test that we can call them. 57*e93f7393Sniklas 58*e93f7393SniklasTest printing complicated types, including functions, pointers to 59*e93f7393Sniklasarrays of pointers of functions, functions which return pointers to 60*e93f7393Sniklasfunctions, etc. 61*e93f7393Sniklas 62*e93f7393Sniklasprintcmd.exp--test printing enum values. Test printing an enum 63*e93f7393Sniklasvariable whose value is out of range. Test "p (int)enum_var", "p/x 64*e93f7393Sniklasenum_var". Test that in something like "enum {FOO, LAST_THING=FOO}" 65*e93f7393Sniklaswe print FOO, not LAST_THING. 66*e93f7393Sniklas 67*e93f7393SniklasTest GDB expressions--test all operators (and overloaded operators for 68*e93f7393SniklasC++). Test integer constants which are signed or unsigned int, long, 69*e93f7393Sniklasor long long. Test detection of overflow of an integer constant. 70*e93f7393SniklasHere are a few integer constants to test (test they get the right 71*e93f7393Sniklastypes): 5, 5LL, 5LuL, 5L6u (invalid), 5LU. Maybe things like 72*e93f7393Sniklas0x12345678, 0x87654321, etc., but their types depend on sizes of int, 73*e93f7393Sniklaslong, etc. 74*e93f7393Sniklas 75*e93f7393SniklasTest that printing const-qualified versions of various types works. 76*e93f7393SniklasIn particular, on the sparc and probably other machines, "double" is 77*e93f7393Sniklashandled differently from most types because it requires more alignment 78*e93f7393Sniklasand thus goes in a different section (there is a gcc 2.4.5 bug with 79*e93f7393Sniklas"const double" on sparc). 80*e93f7393Sniklas 81*e93f7393SniklasTest that GDB's "source" command works and that things work if stdin 82*e93f7393Sniklasis redirected (to a file or a pipe). Test user defined command. Run 83*e93f7393Sniklasan inferior each of these ways (to test that inflow.c works). Test 84*e93f7393Sniklasthat GDB works if the last line of stdin or a source'd file lacks a 85*e93f7393Sniklasnewline. 86*e93f7393Sniklas 87*e93f7393SniklasTest that unmatched single quotes produce error messages, both in 88*e93f7393Sniklasexpressions and linespecs. 89*e93f7393Sniklas 90*e93f7393SniklasTest "cd". "foo/bar/.." should get simplified to "foo". "/../.." 91*e93f7393Sniklasshould not get simplified (for Mach). "/.." should not get simplified 92*e93f7393Sniklas(for other networked OSes; POSIX.1 section B.2.3.7). All these 93*e93f7393Sniklasexamples should continue to work with trailing slashes. 94*e93f7393Sniklas 95*e93f7393SniklasTest scoping; here is a start 96*e93f7393Sniklas 1 int i=2; 97*e93f7393Sniklas 2 int j=3; 98*e93f7393Sniklas 3 main() 99*e93f7393Sniklas 4 { 100*e93f7393Sniklas 5 int i; 101*e93f7393Sniklas 6 for (i=600; i>0; i--) 102*e93f7393Sniklas 7 print_line(i); 103*e93f7393Sniklas 8 } 104*e93f7393Sniklas 9 105*e93f7393Sniklas10 print_line(i) 106*e93f7393Sniklas11 int i; 107*e93f7393Sniklas12 { 108*e93f7393Sniklas13 h(); 109*e93f7393Sniklas14 printf("%d\n",i); 110*e93f7393Sniklas15 } 111*e93f7393Sniklas16 112*e93f7393Sniklas17 h() 113*e93f7393Sniklas18 { 114*e93f7393Sniklas19 printf("In h..."); 115*e93f7393Sniklas20 } 116*e93f7393SniklasSet a breakpoint in h, and print i, print_line::i, and main::i. Set a 117*e93f7393Sniklasbreakpoint in main (or don't run the program), and test that 118*e93f7393Sniklasprint_line::i is an error. But if i were static, "p main::i" should 119*e93f7393Sniklaswork even if the program is not being run. 120*e93f7393Sniklas 121*e93f7393SniklasWrite a test for the reentracy bug with rs6000_struct_return_address 122*e93f7393Sniklasin rs6000-tdep.c. 123*e93f7393Sniklas 124*e93f7393SniklasTest "return" from dummy frames. Test "return" from non-innermost 125*e93f7393Sniklasframe. Test that "return" from a non-innermost frame restores 126*e93f7393Sniklasregisters which are saved not in that frame but in a frame more inner 127*e93f7393Sniklas(I believe this currently works on few if any architectures). 128*e93f7393Sniklas 129*e93f7393SniklasFORTRAN common blocks (a.out and xcoff--weird.exp has the start of 130*e93f7393Sniklasone but it is not quite right as of 19 Nov 1993). 131*e93f7393Sniklas 132*e93f7393SniklasTest that "x" command sets $_ and $__. Test $_ in general. 133*e93f7393Sniklas 134*e93f7393SniklasTest that "p/a" works when given addresses in text, data, and bss 135*e93f7393Sniklassegments. Test that it works if program is compiled with or without 136*e93f7393Sniklas-g. Test that it works if preceding symbol is static or if it is 137*e93f7393Sniklasextern. 138*e93f7393Sniklas 139*e93f7393SniklasGiven `char abc[] = "abc\0def";' test "x/s abc" followed by "x/s" 140*e93f7393Sniklas(should display "abc" followed by "def"). Test this works with no 141*e93f7393Sniklaserror message even if this is the last thing in the section (tests 142*e93f7393Sniklasthat val_print_string ignores an error if the error occurs after the 143*e93f7393Sniklas'\0'). 144*e93f7393Sniklas 145*e93f7393SniklasTest ability to process NMAGIC a.out files. 146*e93f7393Sniklas 147*e93f7393SniklasTest shared libraries: "next" over printf, "step" into a function in 148*e93f7393Sniklasa shared library which has line number info, breakpoint in a function 149*e93f7393Sniklasin a shared library (either before or after the program is run and the 150*e93f7393Sniklasshared libraries are loaded--also maybe write a test where the PLT 151*e93f7393Sniklaswill be in an unloaded state even though the shared library is loaded). 152*e93f7393Sniklas 153*e93f7393SniklasIf there are two breakpoints in the same place, and exactly one of 154*e93f7393Sniklasthem has its condition true, test that the correct breakpoint gets 155*e93f7393Sniklasprinted. 156*e93f7393Sniklas 157*e93f7393SniklasTest "jump" including jump to a breakpoint (the latter will need an 158*e93f7393Sniklasxfail for UDI and probably VxWorks (PR 1786 for vxworks; PR 2416 159*e93f7393Sniklascontains some info for 29k). 160*e93f7393Sniklas 161*e93f7393SniklasSet a watchpoint on a local variable (to be interesting, make a few 162*e93f7393Sniklascalls, to be more interesting, make a recursive call). Test that it 163*e93f7393Sniklasgets disabled when leaving that scope. 164*e93f7393Sniklas 165*e93f7393SniklasTest calling a function, hitting a breakpoint in the called function, 166*e93f7393Sniklascalling another function, and hitting a breakpoint. Test backtrace 167*e93f7393Sniklasworks in the presence of multiple dummy frames. Test that "continue" 168*e93f7393Sniklaswill get you out of the inner called function, and "continue" again 169*e93f7393Sniklaswill get you back to where you were when you called the first one. 170*e93f7393Sniklas 171*e93f7393SniklasTest special longjmp handling in wait_for_inferior (need to figure out 172*e93f7393Sniklasin detail what the proper behavior in each case is). Test longjmp to 173*e93f7393Sniklasa place where there is a breakpoint (such that 174*e93f7393SniklasBPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE happens). In general, test 175*e93f7393Sniklasinteractions between longjmp and watchpoints, breakpoints, stepping, 176*e93f7393Sniklascall function, etc. 177*e93f7393Sniklas 178*e93f7393SniklasTest jumping right past a breakpoint (the case where wait_for_inferior 179*e93f7393Sniklaspasses not_a_breakpoint to bpstat_stop_status). Might already be 180*e93f7393Sniklastested by some of the sun3 tests. Probably want a .s test to avoid 181*e93f7393Sniklascompiler dependencies. 182*e93f7393Sniklas 183*e93f7393SniklasTest more obscure wait_for_inferior cases, expanding on the tests in 184*e93f7393Sniklaswatchpoint.exp, signals.exp, etc. 185*e93f7393Sniklas 186*e93f7393SniklasTest stepping into functions which are one line long and functions 187*e93f7393Sniklaswhich are on line 1 of the source file. (there is a class of bugs in 188*e93f7393Sniklaswhich gdb doesn't find the line number information, and thus doesn't 189*e93f7393Sniklasstep into the function). 190*e93f7393Sniklas 191*e93f7393SniklasTest that prologue recognition, backtrace, printing locals, etc., 192*e93f7393Sniklasstill work in the presence of large frames (the point being that at 193*e93f7393Sniklassome point immediate fields in RISC instructions will overflow and 194*e93f7393Sniklasprologues will need to look different. For sparc, the immediate field 195*e93f7393Sniklasis 13 bits (signed), so I believe the threshold would be 4K bytes in a 196*e93f7393Sniklasframe). 197*e93f7393Sniklas 198*e93f7393Sniklas 199*e93f7393Sniklas(this is for editing this file with GNU emacs) 200*e93f7393SniklasLocal Variables: 201*e93f7393Sniklasmode: text 202*e93f7393SniklasEnd: 203