Bug 83199 - [8 Regression] FAIL: gdb.base/async.exp & gdb.base/skip.exp
Summary: [8 Regression] FAIL: gdb.base/async.exp & gdb.base/skip.exp
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: debug (show other bugs)
Version: 8.0
: P3 normal
Target Milestone: 8.0
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-debug
Depends on:
Blocks:
 
Reported: 2017-11-28 18:06 UTC by Thomas Preud'homme
Modified: 2017-11-29 17:05 UTC (History)
2 users (show)

See Also:
Host:
Target: arm-none-eabi
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Executable async and skip produced by GCC trunk (51.50 KB, application/x-xz)
2017-11-29 11:51 UTC, Thomas Preud'homme
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Preud'homme 2017-11-28 18:06:37 UTC
Hi,

The following tests regressed on arm-none-eabi targets after r254010:

PASS->FAIL: gdb.base/async.exp: nexti&
PASS->FAIL: gdb.base/async.exp: finish&
PASS->FAIL: gdb.base/skip.exp: step after disabling 3: step 3
PASS->FAIL: gdb.base/skip.exp: step after disabling 3: step 5
PASS->FAIL: gdb.base/skip.exp: step using -fu for baz: step 3
PASS->FAIL: gdb.base/skip.exp: step using -fu for baz: step 5
PASS->FAIL: gdb.base/skip.exp: step using -rfu for baz: step 3
PASS->FAIL: gdb.base/skip.exp: step using -rfu for baz: step 5

GCC was configured as: --target=arm-none-eabi --with-newlib --with-mode=thumb --with-cpu=cortex-m3

The 2 async tests fail because the addresses are missing:

-(gdb) 0x00008172        9        x = 5; x = 5; x = 5;
+(gdb) 9  x = 5; x = 5; x = 5;

-Run till exit from #0  0x00008172 in foo ()
+Run till exit from #0  foo ()

The skip tests fail because the wrong line is shown by gdb after doing step.
Comment 1 Richard Biener 2017-11-29 08:30:47 UTC
Are we sure this is not gdbs fault?
Comment 2 Thomas Preud'homme 2017-11-29 09:50:27 UTC
(In reply to Richard Biener from comment #1)
> Are we sure this is not gdbs fault?

GDB version was fixed when I did my bisect. That said, I don't know what sort of change happened in DWARF so it may well be that the new DWARF is correct but GDB just cannot deal with it.
Comment 3 Jan Kratochvil 2017-11-29 10:00:17 UTC
Addresses are missing when the function is inlined.
But these testfiles do not use -O optimization so I find wrong if GCC has inlined anything.
Sorry I have not built trunk GCC (moreover on arm) to check it, maybe submitter can attach the binary files here?
Comment 4 Jakub Jelinek 2017-11-29 10:14:26 UTC
The only change has been that with -gcolumn-info which is now the default GCC emits extra attributes: DW_AT_decl_column and DW_AT_call_column, and emits .loc with column numbers rather than always hardcoded 0.
Comment 5 Thomas Preud'homme 2017-11-29 11:51:50 UTC
Created attachment 42742 [details]
Executable async and skip produced by GCC trunk
Comment 6 Jan Kratochvil 2017-11-29 17:05:51 UTC
The Comment 5 binaries SEGV and do not start on Fedora 26 armv7l.
But I do not see some wrong DWARF there.

(In reply to Jan Kratochvil from comment #3)
> Addresses are missing when the function is inlined.
> But these testfiles do not use -O optimization so I find wrong if GCC has
> inlined anything.

I was sure wrong here, in this case the address is not displayed when it matches the first instruction of a source line.

It could be rather bugreported to GDB how to make it reproducible (I haven't built GCC trunk on that Fedora 26 armv7l, though).