Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master: GDB test failures #1190

Open
dnadlinger opened this issue Nov 3, 2015 · 8 comments
Open

master: GDB test failures #1190

dnadlinger opened this issue Nov 3, 2015 · 8 comments

Comments

@dnadlinger
Copy link
Member

If you look at a Travis log for the currently red master, you'll see that there are some failing tests that use a GDB script to check for debug info generation. Some of these fail with "unknown symbol" error messages. However, I can't reproduce those on an Ubuntu 14.04 box with

gdb --version
GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1

Does anybody else have more luck?

@kinke
Copy link
Member

kinke commented Nov 3, 2015

Same gdb as you, gdb-related failures using LLVM 3.7 when invoking ctest -R dmd-testsuite:

dmd-testsuite-debug:

  • runnable/gdb14313.d: expected regex .*4000065002, actual $1 = -294902294

dmd-testsuite:

  • runnable/gdb14276.d: expected .*1234, actual Error in sourced command file: value has been optimized out ;)
  • runnable/gdb14330.d: expected .*something, actual $1 = <error reading variable>
  • runnable/gdb4149.d: expected .*33, actual $1 = 32

@dnadlinger
Copy link
Member Author

The following tests are now temporarily disabled on master (some already have been for quite some time):

DISABLED_TESTS += gdb1
DISABLED_TESTS += gdb4149
DISABLED_TESTS += gdb4181
DISABLED_TESTS += gdb10311
DISABLED_TESTS += gdb14225
DISABLED_TESTS += gdb14276
DISABLED_TESTS += gdb14313
DISABLED_TESTS += gdb14330

Somebody needs to sit down and spend some time on debug info soon. Now that we only support 3.5+ this should be quite a bit easier.

@kinke
Copy link
Member

kinke commented Jul 31, 2016

With gdb 7.11.1, LDC master, LLVM 3.9 and Linux x64 (Xubuntu 16.04), all gdb tests pass when performed manually EXCEPT for gdb10311 (captured local showing up as <optimized out> - it shows up correctly in line 18 though).

@kinke
Copy link
Member

kinke commented Jul 31, 2016

Inside dmd-testsuite-debug they all fail though, due to:

No line <N> in the current file.
Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal]

If I execute the two commands in the tests/d2/dmd-testsuite directory (compile + gdb batch run), it all works:

(gdb) b 19
Breakpoint 1 at 0x401e44: file gdb10311.d, line 19.

???

@dnadlinger
Copy link
Member Author

Maybe an issue with absolute/relative source paths?

@rainers
Copy link
Contributor

rainers commented Sep 3, 2016

No line in the current file.

The trouble is that the current file is usually "." at startup. If I change that bad default in ldc::DIBuilder::CreateFile to IR->dmodule->srcfile->toChars(), I get __entrypoint.d as the current file ;-(

Most gdb scripts pass if I add a switch to the actual test file in d_do_test, e.g. list gdb1.d:1,1.

I still see 2 errors:

  • gdb10311: captured local showing up as <optimized out>. Inside the delegate, gdb prints Cannot access memory at address 0x0
  • gdb14313: variable of type uint is displayed as signed. ushort works correctly.

@kinke
Copy link
Member

kinke commented Sep 26, 2016

With #1784, only gdb10311 remains disabled. Shall we close this issue?

@Apteryks
Copy link

Don't know if that's related, but there are still some tests failure with GDB 11.1.

Failed Tests (2):
LDC :: debuginfo/classtypes_gdb.d
LDC :: debuginfo/print_gdb.d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants