This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Streamline debug info for up-level references


> Looks good to me.  Rather than removing dwarf2/pr37726.c can you try
> turning that into a guality test that verifies the debug experience is the
> same (or better) than before?  I realize guality stuff is fragile but you
> can restrict it to -O0 if you like (not sure if dg-skip-if supports that).

Yes, it does, I have attached the final testcase.  It passes with e.g. the 
system debugger on OpenSuSE Leap 42.3.


	* gcc.dg/debug/dwarf2/pr37726.c: Move to...
	* gcc.dg/guality/pr37726.c: ...here and turn into GDB test.

-- 
Eric Botcazou
/* PR debug/37726 */
/* { dg-do run } */
/* { dg-options "-g" } */
/* { dg-skip-if "" { *-*-* }  { "*" } { "-O0" } } */

int foo (int parm)
{
  int var = 0;
  int bar (void)
  {
    return parm + var; /* BREAK */
  }
  parm++;              /* BREAK */
  var++;
  return bar ();
}

int
main (void)
{
  return foo (4) - 6;
}

/* { dg-final { gdb-test 11 "parm" "5" } } */
/* { dg-final { gdb-test 11 "var"  "1" } } */
/* { dg-final { gdb-test 13 "parm" "4" } } */
/* { dg-final { gdb-test 13 "var"  "0" } } */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]