Jim Laskey | dd347eb | 2006-11-30 15:25:59 +0000 | [diff] [blame^] | 1 | // This is a regression test on debug info to make sure that we can get a |
| 2 | // meaningful stack trace from a C++ program. |
| 3 | // RUN: %llvmgcc -S -O0 -g %s -o - | llvm-as | llc --disable-fp-elim -o Output/Pubnames.s -f |
| 4 | // RUN: as Output/Pubnames.s -o Output/Pubnames.o |
| 5 | // RUN: g++ Output/Pubnames.o -o Output/Pubnames.exe |
| 6 | // RUN: ( echo "break main"; echo "run" ; echo "p Pubnames::pubname" ) > Output/Pubnames.gdbin |
| 7 | // RUN: gdb -q -batch -n -x Output/Pubnames.gdbin Output/Pubnames.exe | tee Output/Pubnames.out | grep '10' |
| 8 | // XFAIL: i[1-9]86|alpha|ia64|arm |
| 9 | |
| 10 | struct Pubnames { |
| 11 | static int pubname; |
| 12 | }; |
| 13 | |
| 14 | int Pubnames::pubname = 10; |
| 15 | |
| 16 | int main (int argc, char** argv) { |
| 17 | Pubnames p; |
| 18 | return 0; |
| 19 | } |